City
City
What City is and how it provides shared AI infrastructure to Agents
City
City is Downcity's local Agent host container. It keeps Agent instances in memory and forwards HTTP/RPC requests to the selected Agent.
What City owns
- Agent collection —
city.agents.add(agent)admits an existing Agent,city.agents.get(agent_id)reads one, andcity.agents.list()lists them. - HTTP/RPC forwarding — City owns two transport ports and forwards requests by
agent_id. - Host lifecycle — CLI/Desktop create and dispose City, Agent, Workspace, and platform resources; City owns its server lifecycle.
What City does not own
- Model catalogs, identity, usage, and billing, which belong to Federation/Embassy.
- Database adapters for Agent configuration and Workspace assembly, which belong to the host composition root.
- Concrete Plugin storage, which belongs to the selected Plugin Provider/Adapter.
These belong to the Agent runtime.
How Agents connect to City
When you run city on, the CLI reads configuration from the global DB, explicitly creates every Agent, registers them with one City, and starts City's HTTP/RPC servers.
When you use the SDK directly, create an Agent yourself. Call city.agents.add(agent) when you need unified HTTP/RPC forwarding.