Auggyv0.5.0
PublishedDocs / Runtime

Architecture

How Auggy's small turn kernel and composable augments form a self-hosted agent runtime.

System shape

LayerOwns
KernelTurn execution, context allocation, model calls, validated tool execution, history, and turn results.
AugmentsTools, memory, context, skills, transports, policy, lifecycle hooks, and integrations.
Your systemsFrontend, database, auth provider, payments, durable jobs, approvals, and external APIs.

The kernel stays small. Augments connect it to the systems your application already uses.

Runtime kernel

Kernel partResponsibility
Turn loopOrchestrates a single model turn end to end.
Context allocatorAssembles history, context blocks, and tool definitions within a token budget.
Capability tableTracks exposed tools, blocked tools, trust rules, and tool-call counters.
History managerMaintains thread history and keeps tool_use/tool_result pairs coherent.
Tool selectorFilters tools through capability policy before the engine sees them.
Lifecycle managerBoots augments, runs shutdown hooks, and reports health.
Transport admissionRate-limits and bounds concurrent inbound turns per transport.
Trace recordsCapture context, tool, inference, cost, timing, and validation events in each TurnResult.

Runtime data is not the same as console UI

TurnResult records more than the current console renders. See Console for the UI available today.

What augments contribute

ContributionWhat it provides
ToolsTyped actions the model can select during a conversation.
Skills and contextOn-demand guidance and scoped prompt context.
MemoryDurable state providers and retrieval tools.
TransportsInbound channels such as web chat, AG-UI, and Telegram.
Lifecycle and policyBoot validation, migrations, cleanup, auth requirements, rates, budgets, and operator controls.

An augment can provide one or several of these. Group behavior by capability, not by individual function.

Turn execution

Normal runtime pathtext
User message
  -> transport
  -> kernel assembles context and tools
  -> model requests a tool
  -> runtime validates and executes it
  -> transport returns the result

Optional app integration is separate

Advanced preview augment routes can serve an existing frontend or webhook without a model turn. They are not required for a normal agent and do not turn Auggy into a general web framework.

Inside one turn

  1. AdmissionResolve caller trust, queue, rate, and budget checks.
  2. AssemblyBuild context from history, hooks, memory, and tool schemas.
  3. InferenceCall the configured model provider.
  4. ExecutionValidate and authorize selected tools, then append their results.
  5. FinalizationValidate output, compact history, record trace data, and run end hooks.

Inference and tool execution may repeat until the model finishes or maxInferenceLoops is reached. Tool results stay paired with their tool calls in thread history.

What is not in the kernel

  • No planner component. The model plans by choosing tools.
  • No retrieval engine. Retrieval belongs in memory or knowledge augments.
  • No general web framework. Keep the application's normal API in its existing stack.
  • No durable workflow engine or persistent job queue. Keep long-running orchestration in a workflow system or application service.
  • No automatic policy inheritance. Each capability declares and enforces its own trust and operational limits.

Related