Skip to main content

Contexer

The decision and enforcement layer for AI coding agents.

PyPI version License: MIT Python 3.12+ GitHub stars Discord

Quick start · How it works · Enforcement · Console · FAQ · Benchmark · Docs · Discord

New: Contexer Personal Cloud & Teams: sync decisions across machines, share a team decision layer.


Train your AI agents to work exactly how you want. And enforce it.

If you work with AI agents every day, you already know these:

  • "My agent ignores my instructions the moment the context window fills up, and I'm back to re-explaining what it must never do."
  • "I switched to a new agent and every rule and decision I'd built up stayed behind with the old one."
  • "I run a whole stack of AI tools, and I still can't drive what they decide, let alone enforce it."
  • "The answer is in there somewhere, buried under a thousand lines of session slop."
  • "I have no idea what my team's agents are being told, or why they built it that way."

Contexer is the decision and enforcement layer: it captures engineering decisions as you work and keeps them current as your architecture evolves. It selectively injects the relevant decision, constraint, or convention the moment the agent needs it. At commit time, staged changes that violate an approved decision get flagged, or blocked outright for rules you arm. The settled answer arrives before the agent starts reasoning; it stops re-exploring and just builds.

Questions about capture accuracy, privacy, supported agents, instruction files, or the difference between open source and Teams? Read the public FAQ →

What it solves

Contexer gives developers one reviewable, versioned decision store across Claude Code, Cursor, Codex, and Gemini CLI. It brings approved context back into later sessions and can check staged changes against decisions before they land. The open-source product is local and individual; Contexer Teams adds reviewed shared decisions and GitHub workflows.

Benchmarks

Benchmarks, Sonnet 5 medians across 548 published live agent sessions: 6x fewer tokens per session (32,804 vs 198,864 with no memory); right answer in 1 turn vs 6 turns of guessing; 8/8 stored rules followed vs 0/8 bare (Opus); $0.043 per session with right answers vs $0.116 with wrong ones

The honest part: a complete, up-to-date CLAUDE.md ties Contexer on cost. The difference is that nobody has to write that file or keep it perfect. Every number is recomputable from raw session rows, scored by code (no LLM judge), independently validated, negative findings included. Read the benchmark →


Quick start

Requires Python 3.12+ and uv. Under two minutes.

uv tool install contexer   # 1. install
contexer install           # 2. wire into your AI assistants

contexer install auto-detects Claude Code, Cursor, Codex, and Gemini CLI, and wires everything it finds. Restart your assistant and open any git repo. On first use, Contexer analyzes the repo and proposes its starting knowledge. It runs silently from there.

Details: installation & verification · per-tool integration notes


How it works

  1. Capture: Contexer records engineering decisions and supporting provenance while you work.
  2. Review: Developers decide which proposed decisions become trusted.
  3. Replay: Relevant approved context is delivered to supported coding agents in later sessions.
  4. Check: Optional safeguards compare changes with approved decisions.

Read How Contexer works for the mechanism and the FAQ for capture limitations, authority, lifecycle, relevance, agent parity, privacy, and product boundaries. Day-to-day commands live in Usage & CLI.


Enforcement / guardrails

The local Guard is an optional pre-commit safeguard:

contexer guard --install-hook   # wires .git/hooks/pre-commit for this repo (opt-in, not run by `install`)

It is advisory by default. Blocking requires an approved decision that the developer explicitly arms with a machine-checkable rule. See the FAQ for behavior and limits, the mechanism for design, and the CLI reference for commands.


See every decision, with its evidence

contexer ui --open

A local web console over every repo on your machine, not just the one you're in, because "what does my agent actually know?" is a question you shouldn't have to answer by reading JSON.

Contexer console per-repo dashboard: stored decisions by subtype and status, review queue, global rules, cached team context, and recent decisions

  • Read it, then fix it. Browse and search every stored decision with its full revision history. Edit one; history is kept, nothing is overwritten. Delete one for good: a delete sticks, instead of quietly reappearing next session from a memory file or a mined conversation. Restore it if you change your mind.
  • See the whole review queue at once, not one terminal prompt at a time: what's pending, and proposed changes to decisions you already approved shown as before/after diffs. The graphical counterpart to contexer review.
  • The whole picture. Per-repo dashboard, global rules, cached team context, deleted decisions, and your settings: one switcher, seven views.

It binds 127.0.0.1, every route is authenticated, and the server itself never reaches the network. It is also off until you ask for it: contexer ui starts it on demand, and the printed link is short-lived on purpose. Set [ui] autostart = true and every session start hands you the URL for the repo you just opened.

Details, the [ui] settings, and the security model: the local console


Documentation

FAQ Product questions, capture limits, authority, privacy, Guards, OSS and Teams
Installation Install, verify, update, uninstall
Integrations Claude Code, Cursor, Codex, Gemini CLI: wiring and parity notes
How it works Capture, bootstrap, session injection, review/versioning, cost, privacy
Usage & CLI Natural-language commands, CLI reference, teams login, troubleshooting, limitations
Local console contexer ui, the seven views, [ui] settings, security model
Benchmark Live-session A/B methodology, findings (including negative ones), raw data

Contributing

Bug reports, fixes, and documentation improvements are welcome. See CONTRIBUTING.md for setup, code style, and the PR process. Questions or ideas? Join the community on Discord.

License

MIT. See LICENSE for full terms.

The Contexer name and logo are trademarks of Contexer.ai. The MIT license does not grant rights to use the Contexer name, logo, or brand in any way that implies official affiliation.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

contexer-0.45.3.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

contexer-0.45.3-py3-none-any.whl (641.1 kB view details)

Uploaded Python 3

File details

Details for the file contexer-0.45.3.tar.gz.

File metadata

  • Download URL: contexer-0.45.3.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for contexer-0.45.3.tar.gz
Algorithm Hash digest
SHA256 b6cb2df753932aa5484e669cce3e5db6af8ef95c5abb0a8ff4c18030b811202b
MD5 378c05068db7cbba79efcc905bed5510
BLAKE2b-256 51fabc25b70d5617ebafc24e5c300a82d22af9c2b49ad5862ce93c7c635d7729

See more details on using hashes here.

Provenance

The following attestation bundles were made for contexer-0.45.3.tar.gz:

Publisher: release-please.yml on bhargavamin/contexer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file contexer-0.45.3-py3-none-any.whl.

File metadata

  • Download URL: contexer-0.45.3-py3-none-any.whl
  • Upload date:
  • Size: 641.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for contexer-0.45.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3b195b11b184e076345470dca4926f6f447554aa5d5e253dfb1e36f5c920fded
MD5 8000ae7073513c7981d116a801d0f208
BLAKE2b-256 ddf3b7c480c20ecbed41f73a3827cb8467c50cce8fe08e8773891671e6952857

See more details on using hashes here.

Provenance

The following attestation bundles were made for contexer-0.45.3-py3-none-any.whl:

Publisher: release-please.yml on bhargavamin/contexer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.46.0

2 files

0.45.4

2 files

This release

0.45.3 This release

2 files

0.45.2

2 files

0.45.1

2 files

0.45.0

2 files

0.44.0

2 files

0.43.0

2 files

0.42.0

2 files

0.41.0

2 files

0.40.0

2 files

0.39.0

2 files

0.38.0

2 files

0.37.0

2 files

0.36.1

2 files

0.36.0

2 files

0.35.0

2 files

0.34.2

2 files

0.34.1

2 files

0.34.0

2 files

0.33.3

2 files

0.33.2

2 files

0.33.1

2 files

0.33.0

2 files

0.32.0

2 files

0.31.0

2 files

0.30.0

2 files

0.29.1

2 files

0.29.0

2 files

0.28.0

2 files

0.27.0

2 files

0.26.1

2 files

0.26.0

2 files

0.25.0

2 files

0.24.0

2 files

0.23.1

2 files

0.23.0

2 files

0.22.0

2 files

0.21.0

2 files

0.20.1

2 files

0.20.0

2 files

0.19.0

2 files

0.18.0

2 files

0.17.2

2 files

0.17.1

2 files

0.17.0

2 files

0.16.1

2 files

0.16.0

2 files

0.15.0

2 files

0.14.2

2 files

0.14.1

2 files

0.14.0

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page