What your agent learns shouldn't die with the session, stay locked in one AI tool, or live on one laptop. keepctx keeps it constantly updated and available — across sessions, across Claude, Codex and other AI agents, and across your team.
Every session, you re-explain how to log in to your servers, where the logs live, and what runs where. Every next session, it's forgotten. The fix isn't a bigger context window — it's writing things down once, in a place the next session reads automatically.
Correct Claude on Monday and Codex knows on Tuesday — and so does any other agent that
reads AGENTS.md. Context is plain markdown behind that file, so there's no
plugin per tool and nothing to migrate when you switch.
When you correct your agent, it records the correction. The next session — yours or a teammate's — starts already knowing.
A new hire clones the repo and their agent already knows how to get into prod, where the logs are, and which docs are lying.
Every change is versioned server-side and one revert away. A weak model can add noise; it can't destroy what your team already established.
.ctx/ ignores itself, so context never pollutes diffs and never goes stale
on a branch. Your AGENTS.md gets a short pointer and nothing else.
Facts are readable text. Run our server or your own. Uninstalling is deleting
.ctx/.
A context is a list of facts. The bolded lead is the key, and the value can be an IP, a command, or a sentence.
# .ctx/example-project/facts.md
- **prod.access** — SSO, then jump host `bastion.example.com`, then `aws --profile prod-ro`. Never direct SSH. `[verified]`
- **network.proxy** — internal hosts only resolve through the corporate proxy; set `HTTPS_PROXY` first
- **logs.location** — Splunk, index `app_prod`. Not CloudWatch, whatever the old runbook says.
- **api.runs-on** → Cloud Foundry (`cf logs api --recent`), not Kubernetes
- **api.depends-on** → auth-service, for session validation
Everything you'd tell a sharp new teammate on day one. Your agent fills it in as it learns, in whatever order the work turns things up.
| Purpose | why this exists, and who it's for |
|---|---|
| Parts | what it's made of — components, stack, tools |
| Where | where things run and live, and where to look — logs, dashboards, files |
| How | the routines, done the way this place does them — deploy, operate, maintain |
| Vocabulary | internal names no model could guess |
| Gotchas | what looks wrong but is intentional, and what looks right but breaks |
| Sources of truth | which doc wins when two disagree |
| Decisions | what was chosen, why, and what was ruled out — so it stops being re-suggested |
| Rules | standards, compliance, budgets, never-do-X |
| People & access | who owns what, who to ask, and how to get in — never the credentials themselves |
Not just code. Anything you keep explaining to an AI is a context.
Your thesis, entry criteria, sizing rules, which account holds what for tax reasons, sources you trust — and what you've ruled out, and why.
Characters, voice rules, the timeline, what's canon and what got cut.
Customers, pricing logic, vendors, tone of voice, the promises you've made.
Sources, what's been ruled out, and the questions still open.
Your agent opens facts.md with the same tools it uses for any
other file, and edits it as it learns. There's no write command to forget and no ceremony to
skip — which is exactly why capture actually happens.
Changes sync per key, not per file. Two people learning different things both land. Two people changing the same fact means the later one wins, and every version is kept — so a bad change is one revert away rather than an argument.
| Syntax | Means |
|---|---|
— value | an attribute |
→ value | a relationship — what your architecture diagram is drawn from |
[verified] | a human settled it; stop re-deriving it |
Two minutes to local. An account only matters when you want to share.
Python 3.9 or newer, no dependencies. The app is keepctx, and it also
installs ctx as a short alias, which is what the examples below use. If
another ctx is already on your PATH the alias is skipped and
keepctx works the same.
curl -fsSL https://keepctx.com/install.sh | sh
Creates .ctx/, adds a short pointer to AGENTS.md, and ignores itself
in git. The name defaults to your directory.
cd ~/work/example-project
ctx init
Initialized `example-project`
.ctx/example-project/facts.md your facts
.ctx/instructions.md how the agent maintains them
AGENTS.md pointer added at the top
Tell your AI to re-read AGENTS.md.
Your agent reads .ctx/instructions.md, learns the rules, and starts
recording what matters — corrections, hard-won findings, decisions. Nothing else to do.
Local works forever with no account. ctx remote puts it on a server so
your team gets it — and so it survives a dead laptop.
ctx remote # one time, creates it on the server
ctx sync # two-way. mostly automatic after this
ctx clone your-org:your-context
Shown as ctx; keepctx works the same everywhere.
ctx | status |
|---|---|
ctx init [name] | set up here. local, no account, no network |
ctx remote | one-time. create this context on a server |
ctx clone org:name | get a context you don't have |
ctx sync | upload local changes, download remote ones |