Plugin
What a Downcity Plugin is and how it extends Agent capabilities
Plugin
A Plugin is Downcity's single extension product unit. City provides and owns it, projecting runtime capabilities into Agent/Session scopes while also supporting host management logic, a Sidebar + Mainview workspace, and Config.
Plugin
├── main optional: City instances, lifecycle, management logic, and actions
└── renderer optional: Sidebar + Mainview and/or ConfigWhat a plugin does
- Exposes tools the Agent can call during execution
- Hooks into City Plugin lifecycle (
initialize,dispose) - Manages its own state, connections, and background tasks
- Provides a Sidebar + Mainview workspace and edits configuration in a separate Config on its Catalog detail page
- Runs inside the City process boundary, not as a separate service
Each Plugin ID maps to one instance and one configuration inside a City. The host persists Config and
projects an immutable PluginContext.config snapshot for each execution. Agents own neither Plugins,
configuration, nor lifecycle. Plugins model multiple accounts in their own Config instead of using a
generic named-configuration layer.
Built-in plugins
Downcity ships several built-in plugins that cover common agent needs:
- Chat — connects messaging channels (Telegram, Feishu, QQ, etc.)
- Task — schedules and runs background tasks
- Memory — persists conversation history and context
- Shell — executes local commands in a sandboxed environment
- Schedule — cron-style job scheduling
- Web — browses the web and extracts content
- Skill — composes reusable tool chains
Writing a plugin
In the SDK, provide a Plugin instance directly without using the install protocol:
const city = new City({ plugins: [github_plugin], workspaces: [workspace] });
city.agents.add(agent);Add a plugin.json with a unified main and optional renderer entry only when the Plugin must be installed and managed by CLI or Desktop.
Where to learn more
- Agent Plugins Docs — built-in plugin manuals and examples
- Agent SDK — how to register and use plugins programmatically
- Custom Plugin — the unified main install protocol