namzu.aidocs

Runtime

Reference map for the runtime building blocks exposed by @namzu/sdk.

The SDK exports a broad runtime surface, but the pieces follow a consistent shape: providers supply model calls, agents orchestrate runs, registries and managers own definitions plus lifecycle, and stores persist mutable state.

1. Runtime Map

AreaMain exportsUse it when you need...
ProvidersProviderRegistry, LLMProvider typesA vendor-neutral model boundary
AgentsReactiveAgent, PipelineAgent, RouterAgent, SupervisorAgentDifferent execution patterns over the same runtime
Low-level kernelquery, drainQueryDirect control over event streaming, verification, sandboxing, and runtime-only features
LifecycleAgentManager, RunPersistence, EmergencySaveManager, PlanManagerRun orchestration, persistence, and review hooks
StoresRunDiskStore, DiskTaskStore, conversation and memory storesLocal durability for runtime data
Session hierarchyInMemorySessionStore, DiskSessionStore, handoff, summary, workspace, retention exportsTenant-scoped project and delegation state
SandboxingLocalSandboxProvider, SandboxProviderFactoryIsolated command execution
Persona and skillsSkillRegistry, assembleSystemPrompt, mergePersonas, withSessionContextStable prompt composition and reusable instructions
RetrievalDefaultKnowledgeBase, DefaultRetriever, createRAGToolRetrieval-augmented context
Plugins and registriesPluginRegistry, ToolRegistry, AgentRegistry, PluginLifecycleManagerExtensibility and catalog-style registration
Connectors and MCPConnectorRegistry, ConnectorManager, MCPClient, MCPToolDiscovery, MCPConnectorBridge, MCPServerExternal system integration and MCP interoperability
Wire bridgesmapRunToStreamEvent, A2A helpersObservability ships from @namzu/telemetry as of 0.4.0
Plugin runtimePluginLifecycleManager, discoverPlugins, loadPluginManifest, PluginResolverNamespaced extensions, hook execution, and plugin-managed MCP tools

2. Agent Families

The public agent classes are distinct runtime shapes rather than separate products:

Agent classIntended role
ReactiveAgentGeneral-purpose tool-using loop
PipelineAgentSequential staged execution
RouterAgentRoute to a target path or downstream agent based on input
SupervisorAgentCoordinate or delegate across sub-agents

If you are starting fresh, begin with ReactiveAgent unless you already know you need routing or supervision.

3. Provider Boundary

Every provider package plugs into the same LLMProvider contract:

  • chat(params) returns a normalized completion result.
  • chatStream(params) yields normalized stream chunks.
  • listModels() and healthCheck() are optional.

This is why you can swap provider packages without rewriting agent setup code.

Read Provider Operations if you want direct provider-call patterns instead of the agent loop.

4. Persistence and Local State

The SDK exports both in-memory and disk-backed implementations so you can start simple and add durability later:

SurfaceExamples
Generic storeInMemoryStore
Runs and checkpointsRunDiskStore
TasksInMemoryTaskStore, DiskTaskStore
Conversation stateInMemoryConversationStore
MemoryInMemoryMemoryIndex, InMemoryMemoryStore, DiskMemoryStore

5. When to Add Optional Capability Packages

The SDK is intentionally not the only published package in the system:

  • Add a provider package when you need a real model backend.
  • Add @namzu/computer-use when your tool registry needs screenshots or desktop input.
  • Stay on the SDK alone if you are building mocks, tests, or package-level abstractions first.

6. Architecture Deep Dives

If you are implementing against the SDK rather than only consuming the public API, use the architecture set alongside this runtime page:

If you need to understand...Read
Why each top-level folder existsFolder Reference
Provider registration and provider creationProvider Registry
Direct provider calls and preflight methodsProvider Operations
Agent class selection and delegation boundariesSDK Agents
Personas, skill files, and prompt layeringSDK Prompting
Knowledge-base ingestion and retrieval toolsSDK Retrieval
Project-session-sub-session persistence and archivalSDK Sessions
Required IDs and identity mappingRuntime Identities
Agent config and runtime limitsRuntime Configuration
query() and drainQuery() wiringLow-Level Runtime
Plugin manifests, namespacing, and hook orderPlugins and MCP Servers
The shipped tool setBuilt-In Tools
Verification, plan mode, and sandbox behaviorTool Safety
Connector lifecycle and MCP bridgingConnectors and MCP
SSE and A2A wire mappingEvent Bridges
Telemetry startup and metricsSDK Observability
Foundation modules such as types/ and constants/Foundation Folders
Agent execution, runtime/, manager/, and compaction/Execution Folders
session/, store/, and gateway/ boundariesSession and Store Folders
Providers, connectors, bridges, tools, plugins, personas, and RAGIntegration Folders

On this page