Open-source agent infrastructure
Build your own system of agent applications.
Downcity gives independent builders and small teams the runtime, tools, and interfaces to build and manage agent applications — with a reusable foundation for what comes next.
SDK preview
Read the API before you scroll
Pick a scenario to see what the real calls look like. The same code runs against the packages in this repository.
Try the SDK
import { Agent, Workspace } from "@downcity/agent";const workspace = new Workspace({ id: "project", path: process.cwd() });const agent = new Agent({ id: "repo-helper", instruction: "You are a reliable project assistant.",});const session = await agent.sessions.create({ workspace });const turn = await session.prompt({ query: "Summarize this repository" });const result = await turn.finished;console.log(result.text);Three core SDKs
From Agent to City to Federation.
An Agent uses a Bureau-scoped CityModel and Plugins, binds a Workspace through its Session, collaborates through Groups inside a City, and accesses shared Federation Services through Embassy.
Agent
What is an agent harness?
An agent harness is the runtime layer around a model: it owns the execution loop, tool calls, context and memory, permissions, and recovery. The model reasons; the harness makes that reasoning executable, observable, and repeatable. Downcity ships that harness together with the productization kits — City, Federation, SDKs, and UI — so a working agent can become a product that keeps running.
Features
Build applications. Keep the foundation.
Define your application's workflow, organize its agents and resources, and reuse the tools and services that fit your next project. These are the building blocks behind that work.
Define the agent's workspace
Set the boundaries for files, tools, and permissions so the agent knows where it works, what it can do, and where its output belongs.
Explore Agent SDK docsKeep work continuous
Sessions preserve conversations, tool calls, task state, and results so agents can continue from existing context.
Explore Agent SDK docsGive agents the ability to act
Use tools, skills, and powers so agents can search, write, execute, record, and connect to the services a product needs.
Explore Agent SDK docsKeep work moving
Use tasks, memory, and schedules so agents can follow up, check progress, and complete long-running work beyond a single conversation.
Explore Agent SDK docsOrganize agents by role
Configure agents with different roles inside one City. They share a product boundary and services while handling creation, analysis, review, or operations.
Explore Agent SDK docsConnect interfaces and stay in control
Interact through CLI, Console, SDKs, or product interfaces while inspecting status, approving actions, and managing the runtime.
Explore Agent SDK docsProduct shapes
Build a City around the work.
Organize agents, capabilities, and product interfaces around a clear field of work, turning each City into a product that keeps running.
Software creation City
Agents take on development, review, testing, and release roles to move software from idea to delivery.
Research and knowledge City
Agents continuously gather information, analyze material, organize knowledge, and turn research into useful outcomes.
Team operations City
Agents handle monitoring, support, coordination, and recurring work to keep teams running smoothly.
Personal work City
Agents are organized around a person's files, tools, and daily workflows while the user controls data and runtime.
Go deeper
Long-form explanations of the agent runtime layer, and how it differs from the frameworks and protocols around it.
What is an agent harness?
The runtime layer that turns a language model into a working agent, and how it differs from a framework or MCP.
The anatomy of an agent harness
One request traced end to end, the ten subsystems behind it, and a diagnostic table for production symptoms.
Agent harness vs MCP
Why they are different layers rather than rivals, and how they compose for a single tool call.
Agent Harness whitepaper
When agents enter production: human control, collaboration, and context.
Create a City. Put agents to work.
Install Downcity, create an agent product, and start its runtime.
npm install -g downcity
downcity agent create ./my-city
city federation login
city on