Architecture
Workspace Architecture
Repo structure, package boundaries, and documentation ownership across the current workspace
Workspace Architecture
The repository is organized around the agent runtime, city control plane, shared city infrastructure, and deployable surfaces.
Primary workspaces
packages/agent/: local agent kernel, session execution, plugin runtime, HTTP/RPC host, SDKcli/city/: control plane, CLI, project orchestration, model pool, console-facing gatewaypackages/city/: City runtime for services, actions, auth, env, studio-scoped access, and routingpackages/services/: public services such as accounts, balance, usage, payment, and Stripe flowspackages/gate/: user and admin SDK for service callspackages/ui/: reusable UI primitives and app-facing componentscities/: deployable City compositions that assemble city runtime and services for Node or edge runtimesproducts/console/: browser control surfaceproducts/chrome-extension/: extension that sends live page context into agentshomepage/: marketing site, user docs, devdocs, SDK docs, and plugin docs
Boundary rules
/docsis user-facing only/devdocsis contributor-facing onlypackages/agentowns single-agent executioncli/cityowns control-plane and multi-project coordinationpackages/cityowns reusable service runtime infrastructurepackages/servicesowns public service capabilitiespackages/gateowns service access over HTTP- product surfaces should consume runtime APIs instead of duplicating runtime logic
Current architecture philosophy
consoleowns global governanceagent hostowns one project runtimesessionowns executionpluginowns capability exposure and augmentation- durable traces stay close to the workspace
Build relationships
packages/agent build -> SDK and runtime package
packages/city build -> infrastructure runtime package
packages/services build -> public services package
packages/gate build -> service SDK package
cli/city build -> CLI and control-plane package
cities/node typecheck -> Node service block
cities/edge typecheck -> edge service block
products/console build -> browser control surface
products/chrome-extension build -> extension bundle
homepage build -> docs and marketing site