Reference
The agent format
An agent is a folder. Its role is a git repo you can share. Its memory, data and files sit beside the role and stay with you.
The folder
Every agent lives in the agents folder, one folder each. kith paths prints where that is on your Mac. kith new <name> "<description>" makes one.
agents/reading/
role/ what the agent is: its own git repo, shareable
agent.md who it is and how it works
capabilities.yaml the services and programs it needs, by name
settings.json Claude Code settings for its runs
skills/ its skills, one folder each
skills/learned/ skills it wrote itself
tools/ scripts its skills run
memory/ what it remembers: yours only
MEMORY.md the long-term index, loaded on every call
projects/<id>.md its notes on one project
sessions/<id>.md where the last call on that project stopped
data/ its databases
files/ what it made
jobs.json its schedules
The split is the point of the format. The role says what the agent is. Everything beside it is what the agent has lived. Sharing an agent shares the role and nothing else, and updating or restoring a role never touches memory.
agent.md
agent.md is the agent's instructions: a short frontmatter block, then plain markdown. The markdown becomes the start of the prompt for every run.
---
name: reading
description: tracks what I read
model: sonnet
effort: medium
harness: claude
---
You keep track of what I read. Save each article with one line on why it
matters. On Fridays, list what I finished.
## Your skills
| Task | Skill |
|---|---|
| The Friday list | `weekly-list/SKILL.md` |
Frontmatter fields
Each field is one line, key: value. Only description is required.
- name
- The agent's name. Lowercase letters, digits and dashes, starting with a letter.
kith newwrites it to match the folder. - description
- One line on what the agent is for. Required: a role without it fails its checks. It is the line your main session sees for this agent, and what
kith lsand a shared repo show. - model
- A model name or alias of the agent's engine, such as
sonnet. Leave it out to use your own default. - effort
- Reasoning effort:
low,medium,high,xhighormax. Any other value fails the checks. Leave it out to use your own default. - harness
- The engine the agent runs on. Leave it out for Claude Code. See Engines.
- display_name
- The name the agent posts under in Discord, when you want one other than
name. - memory_cap
- The most characters of memory loaded at the start of a conversation. The default is 8000.
You can edit these by hand, or let Kith write and commit the line:
kith reading set model sonnet # or: default, to remove the line
kith reading set effort high
kith reading set harness codex
Placeholders
Paths differ from Mac to Mac, so a role never writes one down. Use these in agent.md and settings.json. They are filled in when a run starts. A placeholder Kith does not know fails the checks.
| Placeholder | Becomes |
|---|---|
{{AGENT_DIR}} | The version of the role this run is pinned to. Read skills and run tools from here. |
{{PACKAGE}} | The live role/ folder, where the agent writes a learned skill. |
{{HOME_DIR}} | The agent's own folder: memory, data and files. |
{{HOME_REAL}} | The same folder with symlinks resolved. Use it in permission rules. |
{{AGENTS}} | The agents folder, to reach another agent's tools. |
{{STATE}} | Kith's state folder: your profile and the shared project notes. |
{{USER_HOME}} | Your home folder. |
{{AGENT}} | The agent's name. |
Other role files
- capabilities.yaml
- What the agent needs, by name and never by credential.
needs: [notion, jev-browser]lists services as a one-line list.requires:lists programs it runs, one per line asffmpeg: brew install ffmpeg. - settings.json
- Claude Code settings merged over your global ones for this agent's runs: permissions, hooks and plugins.
permissions.defaultModeis the mode the author suggests. It applies to runs on Claude Code. - mcp.json
- Optional. MCP servers that belong to this agent alone.
- skills.json
- Optional. Skills linked from other GitHub repos, each pinned to a commit.
- services/
- Optional. The definition of a service Kith does not ship, as
services/<name>.json: its kind and the names of its secrets.
An agent carries no accounts. It names a service in needs:, and each person who runs it grants one of their own accounts with kith auth grant. Two people can run the same role with their own logins. Give it an account has the steps.
Skills
A skill is a folder with a SKILL.md: a name and description in its frontmatter, then the steps. Skills are not loaded up front. agent.md lists them in a table, and the agent reads one when the task calls for it. That keeps each run small, and it keeps one agent's skills out of every other agent's context.
| Kind | Where | Shared with the role |
|---|---|---|
| Its own | role/skills/<name>/SKILL.md | Yes |
| Learned | role/skills/learned/<name>/SKILL.md | Yes |
| Linked | Named in role/skills.json, fetched into role/skills/<name>/ | The link is. The files are fetched again on install. |
| Private | agents/<name>/skills/learned/, beside the role | No |
Learned skills
When an agent solves something it will need again, it writes the solution down as a skill in role/skills/learned/. That is an edit to the role like any other: checked on the next run, committed, and yours to read, change or roll back.
A skill you would rather not share goes in the private folder beside the role. To share it later, move its folder into role/skills/learned/.
Linked skills
A skill from another GitHub repo is linked, not copied. skills.json records its repo, path and commit, and Kith fetches only that folder. To upgrade one, change its commit.
kith skills available # the catalog at github.com/anthropics/skills
kith reading skill add pdf # or owner/repo/path, or owner/repo/path@ref
kith reading skill remove pdf
kith reading skills # own, learned and linked
If agent.md names a SKILL.md that does not exist, or a linked skill has not been fetched, the role fails its checks and the last good version runs.
Tools
A tool is a script in role/tools/ that a skill tells the agent to run. It is an ordinary file in the role: versioned, shared and installed with it. Refer to it as {{AGENT_DIR}}/tools/<file> so the path holds on any Mac.
- A program the tool runs goes in
requires:. Installing the agent lists what is missing and offers to add it.kith deps <agent> --installdoes it later. - A key the tool needs comes from a granted service, never from the role. The tool runs under
kith auth exec --for <agent> <service> -- CMD, which puts the secret in that process only. - An MCP server the agent needs is a service in
needs:. A run starts only the servers the agent both needs and is granted.
Memory, data and files
These three folders are what the agent has lived. They are never part of the role.
- memory/
- Markdown the agent writes for itself.
MEMORY.mdis the long-term index and loads on every call.projects/<id>.mdholds its notes on one project.sessions/<id>.mdholds where the last call on that project stopped, which is how a fresh session picks up the thread. - data/
- The agent's databases.
- files/
- What the agent made, by project: renders, images, exports.
Memory is the agent's notes, not the truth. Current facts such as a calendar or a balance are read from their source each time. To search what your agents wrote down:
kith memory search <words>
When you invite someone to an agent, their runs get a memory of their own under memory/people/<id>/ and their own outputs under files/people/<id>/. They cannot read yours. memory/shared/ holds craft that every person's run may read. Sharing covers the rest.
What is in git
| What | Where it is kept | Who sees it |
|---|---|---|
role/ | Its own git repo. Every version that passes its checks is committed. | Only you, until you share it. |
memory/, jobs.json, private skills | Your agents repo, one private repo for all your agents. | Only you. |
data/ | Your agents repo, as text dumps. The database files themselves are ignored. | Only you. |
files/ | On disk only. Back it up with the rest of your Mac. | Only you. |
| Grants and keys | Grants in ~/.kith/secrets/, keys in the macOS Keychain. Never in any repo. | Only you. |
Nothing leaves your Mac unless you say so. To keep a copy on GitHub, kith backup run makes a private repo for each piece that has none, then commits and pushes everything. kith backup run --nightly does that every night at 03:00.
Share and install
Sharing publishes the role. The person who installs it gets your skills and tools and starts with an empty memory.
Publish a role
kith share reading # a private repo, <you>/kith-agent-reading
kith share reading --public # public, with its history
kith share reading --public --fresh # a public copy with no history, at <you>/kith-reading
Sharing uses the GitHub CLI, gh. A public share first checks the role and its whole history for home paths, email addresses and the words you list in ~/.kith/private-words, and refuses while it finds any. --fresh publishes the role as it is now, one commit per publish, while your own repo keeps every version and stays private. Each shared repo gets the GitHub topic kith-agent, which is how others find it.
Install one
kith install owner/repo # or a github.com URL
kith install owner/repo --as books # under another name
kith install owner/repo --preview # show what it would do, keep nothing
kith market # agents people shared, most starred first
kith search <words> # find agents on GitHub
Any GitHub repo with an agent.md at its root installs. For one agent inside a bigger repo, give the folder: owner/repo/tree/main/folder.
Before an agent is kept, Kith shows what it would do on your Mac and asks: its suggested permission mode, what it may run without asking, its hooks, MCP servers, tools and skills, the services it asks for and the programs it needs. Nothing is granted by installing. The author's permission mode is a suggestion, and your answer is saved on your Mac, so a later update cannot change it.
kith update books # pull the author's changes, fast-forward only
kith update --all # Kith first, then every agent
An update never overwrites your own edits. If you share your copy, the author's repo stays as its upstream, so updates keep coming.
Versions
Every run is pinned to a snapshot of the role, so anyone can change an agent at any time, including the agent itself, without breaking a run in progress.
- On each run Kith fingerprints the role. If nothing changed, the run uses the snapshot it already has.
- If it changed, Kith checks it: the frontmatter, the JSON files, the placeholders, that the skills named in
agent.mdexist, and that the services inneeds:are defined. - A version that passes is snapshotted and committed to the role's repo. A version that fails is never used. The last good one runs and the reason is printed.
kith history reading # every committed version, newest first
kith restore reading COMMIT # bring one back, as a new commit
kith versions reading # snapshots on this Mac: current, good, pinned
kith rollback reading # pin the previous good version
kith pin reading VERSION # run this version until unpinned
kith unpin reading # follow the latest edits again
history and restore work on the role's git history, which is kept for good. A restore is a new commit, so another restore undoes it. pin and rollback choose among the snapshots on this Mac without changing any file. Old snapshots are cleared after two days unless they are pinned, good or in use.
For an edit that spans several files, create an empty role/.editing file first and delete it when you are done. Runs keep the last good version in the meantime. A marker older than an hour is ignored.
Engines
An engine is the coding agent a run uses. Kith gives every engine the same prompt, memory, project and folders.
Per agent
Set harness: in agent.md, or let Kith write it:
kith reading set harness codex
kith reading set harness codex --model MODEL # with a model of that engine
| Value | Engine |
|---|---|
claude | Claude Code. The default when the field is absent. |
codex | OpenAI Codex CLI |
pi | pi |
The command also accepts agy, hermes, qwen, dsh and opencode. The app's engine picker lists Claude Code and Codex.
Per run
kith reading -H codex "what did I finish?"
kith ask reading -H pi "what did I finish?"
kith schedule add reading "0 8 * * 5" "List what I finished" -H codex
-m MODEL and -e EFFORT override the model and effort the same way. A model: in agent.md names a model of the agent's own engine, so a run on another engine uses that engine's default unless you pass -m. A conversation you continue with kith ask -c stays on the engine it started on.
kith engines # which engines are installed on this Mac
What only Claude Code runs have
- The agent's
settings.json: its permission rules and hooks. - Cost recorded per request. Other engines record one row per run.
- Runs for people you invite. They always use Claude Code, whatever
harness:says. - Calls from inside a Claude Code session as
kith:<name>, which run in that session.