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.

An Agent ecosystem where residents live inside distinct product Cities that share capabilities through Federation.

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

agent.ts
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

import { Agent } from "@downcity/agent";import { City } from "@downcity/city";

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.

01

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 docs
02

Keep work continuous

Sessions preserve conversations, tool calls, task state, and results so agents can continue from existing context.

Explore Agent SDK docs
03

Give 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 docs
04

Keep 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 docs
05

Organize 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 docs
06

Connect 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 docs

Product 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.

01

Software creation City

Agents take on development, review, testing, and release roles to move software from idea to delivery.

02

Research and knowledge City

Agents continuously gather information, analyze material, organize knowledge, and turn research into useful outcomes.

03

Team operations City

Agents handle monitoring, support, coordination, and recurring work to keep teams running smoothly.

04

Personal work City

Agents are organized around a person's files, tools, and daily workflows while the user controls data and runtime.

Create a City. Put agents to work.

Install Downcity, create an agent product, and start its runtime.

Create and start
npm install -g downcity

downcity agent create ./my-city
city federation login
city on