Package Module Breakdown
Explains the current packages/agent layout around SDK, core, executor, plugin, runtime, and shared types
Package Module Breakdown
The single-agent execution kernel lives in packages/agent/.
The cleanest way to understand it now is to follow the real top-level structure:
sdk/: public local and remote APIcore/: instance assembly centerexecutor/: session execution engine, composers, tools, and persistenceplugin/: plugin definitions, hook dispatch, and built-in plugin runtimesruntime/: host, HTTP/RPC, sandbox, transport, and runtime infrastructureconfig/,types/,utils/: support domains
Current directory map
Main dependency story
sdkexposes the public surfacecoreassembles oneAgentCoreexecutorowns turn executionpluginowns capability and runtime augmentationruntimeconnects the agent to the host environment
1. sdk/
This is the public API of @downcity/agent.
Agent.ts: local embedded entrypointRemoteAgent.ts: remote HTTP clientSession.ts: session facadeAgentSdkTypes.ts: SDK-facing types
2. core/
This is the assembly center for one agent instance.
AgentCore.ts: assembles config, session access, plugins, and runtime hooksAgentCoreTypes.ts: instance runtime viewAgentContextTypes.ts: shared execution surface consumed by plugin runtimes
3. executor/
This is the execution axis.
- execution engine
- history and system composers
- tools and tool-runtime adapters
- persistence and step facts
This is where the real model and tool loop lives.
4. plugin/
This is the capability layer.
- built-in plugins such as
chat,task,memory,shell,schedule,skill,web, andauth - plugin registration and hook dispatch
- plugin runtime-local types
The boundary here is simple:
- session executes
- plugins expose or augment capability
5. runtime/
This is the infrastructure layer.
- host integration
- HTTP server
- local RPC server
- transport contracts
- sandbox runtime
These are runtime facilities, not product-level workflow domains.
6. types/
This directory holds stable shared contracts:
- config types
- runtime protocol types
- SDK-facing execution types
- common JSON and utility contracts
7. config/ and utils/
config/owns project configuration and initialization supportutils/holds low-level helpers such as logging and storage support
Public API boundary
src/index.ts is the only public entrypoint.
It should expose:
- SDK APIs
- plugin author APIs
- runtime integration APIs
- stable shared protocol types
It should not expose internal router wiring, sandbox runners, or private runtime helpers.