Host your own agent source
Any GitHub repository can be an agent source. Publish your agents in one, and anyone can add its link in Settings → Tools → Agent sources, browse your agents, review their code and install them. The official Agent City source works exactly this way.
Repository layout
Section titled “Repository layout”Each agent is a folder with a SOUL.md and a tools.py, as described in Agent files:
my-agents/├── hive.json ← optional: names the collection, picks which folders are offered├── README.md└── agents/ ├── recipes/ │ ├── SOUL.md │ ├── tools.py │ ├── README.md │ └── evals.json └── garden/ ├── SOUL.md └── tools.pyWithout a hive.json, Agent City offers every folder it finds with a SOUL.md and tools.py. A repository with those two files at its root is treated as a single agent.
hive.json
Section titled “hive.json”Put it at the root of the repository to name the collection and choose exactly which folders are offered:
{ "name": "Ann's agents", "description": "Small helpers for home", "author": "Ann Lee", "agents": ["agents/recipes", "agents/garden"]}| Field | What it’s for |
|---|---|
name |
The collection’s name, shown in Browse. |
description |
A line about the collection. |
author |
Used for any agent whose SOUL.md has no author. Without either, the repository owner is shown. |
agents |
The folders to offer. Anything not listed is ignored. |
Limits
Section titled “Limits”| Limit | Value |
|---|---|
| Files in one agent’s folder | 40 |
| Size of one file | 256 KB |
| Size of one agent | 2 MB |
Hidden files and folders, and __pycache__, are skipped.
How people install from it
Section titled “How people install from it”- They paste your repository’s link in Settings → Tools → Agent sources:
https://github.com/you/my-agents, orhttps://github.com/you/my-agents/tree/<branch>for a branch. - Agent City reads the repository through GitHub’s API. Reading never runs your code. Names, descriptions, tools and needed keys are parsed from the files as text.
- Your agents appear on Agents → Browse. Review & install shows every file, starting with
tools.py. - Install copies the folder into their data folder at
memory/agents/<name>/, with a.source.jsonrecording your repository and the exact commit. Their card says from you/my-agents.
Private repositories work too, for people who add a GITHUB_TOKEN with access to them on Connections.
Publishing updates
Section titled “Publishing updates”- Change the agent and bump
version:in itsSOUL.md(1.0.0→1.1.0). - Push to the branch people added.
When they press Refresh, the agent shows Update available with the new version. Review shows a diff of exactly what changed, and Update installs it. Nothing updates on its own, and changes elsewhere in the repository don’t count. A changed folder is offered even if you forget to bump the version, but people can’t tell what they’re getting.
Installed agents can’t be edited in Agent City, since an update would replace the changes. People can still rename them.
Sharing an agent you built
Section titled “Sharing an agent you built”Agents you build live in ~/Library/Application Support/Agent City/agents/<name>/. To publish one, copy its folder into your repository under agents/, add it to hive.json if you have one, and push. To suggest it for someone else’s source, open a pull request there.
Your keys are never stored in an agent’s folder; they’re in Agent City’s key store. Still, check for anything you pasted into the code by hand before you push.
Being a good source
Section titled “Being a good source”- Prefer services that need no API key. When one does, list it in
NEEDSwith a hint on where to get it. - Put an
approve()call before anything that acts as the user. - Include an
evals.jsonand aREADME.md. - Use the standard library where you can. Agent City can’t install extra packages for an agent.
