City
What City is and how it provides shared AI infrastructure to Agents
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/Federation.
- Database adapters for Agent configuration and Workspace assembly, which belong to the host composition root.
- Concrete Power storage, which belongs to the selected Power Provider/Adapter.
These belong to the Agent runtime.
How Agents connect to City
When you explicitly run city on, the CLI acquires the data-root lease before opening configuration databases, reads Agent definitions and Workspace registrations, assembles resources and starts transport. Desktop follows the same single-host ownership rule. Registry entries persist independently of loaded runtime instances.
city agent, city workspace and city session use shared local resource services. Agent creation does not initialize a project; Agent defaults affect new Sessions, preserving existing snapshots and overrides. Workspace removal preserves project files and Session history. The CLI connects to the current verified host for execution; offline operations support configuration management and pure historical browsing. See Resource Management.
When you use the SDK directly, create an Agent yourself. Call city.agents.add(agent) when you need unified HTTP/RPC forwarding.