Downcity

City SDK

Create, deploy, and call City with the City SDK: host Agent instances inside a local runtime, then expose them to many product clients behind a stable service boundary.

Open City SDK Docs

Federation owns the server-side runtime; Embassy is the unified user and admin client entry.

Local Agent host

City keeps Agent instances in memory and owns two HTTP/RPC transport ports, forwarding requests to the right Agent by agent_id.

A stable product-facing boundary

Internally capabilities are organized as Service, Action, and AIService; product clients only call text(), stream(), and image() instead of raw provider APIs.

One City, many products

A single Federation can serve web apps, extensions, desktop tools, and internal tools, so each product stops rebuilding the same AI backend.

Typical Scenarios

  • Hosting agents: call city.agents.add(agent) to admit an existing Agent and route it through City's HTTP/RPC forwarding.
  • Product client access: reach services in City through Embassy User and a user_token that carries bureau_id.
  • Clear boundaries: model catalogs, identity, usage, and billing belong to Federation and Embassy; City owns the host and forwarding.

Facts

  • Core package: @downcity/city
  • Core source directory: packages/city/
  • Client entry: City / Embassy User