Skip to main content

Contitext

Project continuity for AI agents.

Agents record decisions, checkpoints and handoffs in a shared project. Another agent, session or machine reads that history and continues the work. Contitext provides eight MCP tools and a REST API, with no LLM API key or embedding service required.

contitext: use team/launch
... work ...
contitext: handoff API design approved; next, implement the first endpoint.

In another agent, select the same project with contitext: use team/launch, then run contitext: status to read the handoff and next action. Each conversation selects its project explicitly; another conversation's selection is not a default.

Get started

Both paths use the same Core tools and project portability format.

  • Contitext Cloud — official hosting in invitation beta. Visit contitext.com for availability or contact support@contitext.org. Once approved, save the supplied credential in a private file and enroll the official instance:

    contitext connection add contitext-cloud --preset contitext-cloud \
      --credential-file /absolute/path/cloud-credential.json
    

    Continue with client setup.

  • Self-host — install with brew install jessysw/tap/contitext, python -m pip install contitext, or the published OCI image. Follow the self-hosting guide or first-use tutorial.

Current stable release: 0.12.0. See the CHANGELOG and upgrade guide.

Common chat commands

Use contitext: <command> at the start of your message.

Command Purpose
list Show projects accessible through the selected connection.
use team/launch Select the project for this conversation and read its context.
status Read the selected project's current context and latest handoff.
checkpoint <summary> [next-action] Save a progress checkpoint.
handoff <summary> <next-action> Save what changed and the next executable action.
search <query> Search the selected project's history.

See all chat commands for exact syntax and permissions.

Connections

A connection is your local name for one account on a Core instance; a host is the agent application, such as Codex or Claude Code. For example, keep your self-hosted instance as personal and official hosting as contitext-cloud. Selection uses an explicit connection, then the conversation's existing route, then your chosen default, then the sole configured connection; otherwise it asks you to choose. Changing the default never redirects an existing conversation. See connections for setup and list --all.

Documentation · CHANGELOG · Security · Apache-2.0 license

Installation options

An alpha npm launcher is available for macOS/Linux users with Node.js and uv. That separately versioned alpha does not provide the current stable feature set. Use a stable installation path below.

The stable options below run the same Contitext Core implementation and expose the same eight MCP tools.

Option Requirements Operation
Homebrew Homebrew on Apple Silicon macOS / x86-64 Linux and your PostgreSQL 16+ database brew install jessysw/tap/contitext; isolated native CLI/MCP
Python package Standard CPython 3.11–3.14 and your PostgreSQL 16+ database Install contitext==0.12.0 from PyPI; run native stdio MCP and optionally REST
Docker Compose Docker with Compose, Git, and Python 3.11–3.14 for bootstrap Build the release source; Compose runs Contitext and PostgreSQL together
Remote Core OCI image Docker, a separately managed PostgreSQL database and TLS proxy Pin the published ghcr.io/contitext/contitext:0.12.0 digest; remote self-hosting

Use the installation guide for setup and the Homebrew guide for package upgrades. Native installation does not require Docker. The database is required in every case; Contitext is not a standalone in-memory or SQLite store. A native MCP client can launch contitext mcp directly without a REST process. A remote client connects to an operator-provided MCP endpoint without local database access. The optional local connector keeps the client session alive through SSH/HTTP outages; new offline writes fail explicitly and are not queued.

Docker Compose quick start

Requires Docker with Compose, Git, and standard CPython 3.11–3.14.

git clone --branch v0.12.0 --depth 1 https://github.com/contitext/contitext.git
cd contitext
python3 scripts/bootstrap.py
docker compose up --build -d --wait
curl --fail http://127.0.0.1:18791/health/ready
docker compose exec -T app python -m contitext.demo

The bootstrap script creates fresh local credentials in a private .env, seeds a demo project, and preserves existing configuration. The demo writes synthetic events to that project and demonstrates two agents handing work over through the real HTTP API. Its final output includes:

{
  "agent_b_resumed": "demo",
  "next_action": "Implement and test the first endpoint.",
  "idempotent_retry": "passed"
}

The API listens on localhost. PostgreSQL has no published host port. Data persists in a Compose volume; docker compose down stops the service and preserves it. See installation for Python-package setup, administration, backup, and remote access.

For a real project, use python3 scripts/bootstrap.py --project research --name "Research" and skip the synthetic demo. The self-hosting workflow covers project creation, access management, client setup, and backup recovery. These commands are included in both the PyPI package and the Compose release.

Connect an MCP client

The MCP Registry identifier is io.github.contitext/contitext. The Registry setup guide explains the PyPI/stdio installation and required database configuration.

After the quick start, add this server to a client that supports stdio MCP. Replace the directory with your own absolute checkout path:

{
  "mcpServers": {
    "contitext": {
      "command": "docker",
      "args": ["compose", "--project-directory", "/absolute/path/to/contitext", "exec", "-T", "app", "contitext", "mcp"]
    }
  }
}

Client configuration formats differ. The same command can be used by any stdio MCP client. Load the agent protocol into the client's instruction mechanism and restart its MCP session. Client settings are changed only when you explicitly run the adapter installer. The MCP server runs locally inside the existing app container and shares its database.

Tool Purpose
project_list List projects accessible to the authenticated caller
project_create Create a project owned by the caller without selecting it
project_bind Explicitly select a project for a caller's conversation scope
project_current Read that scope's current project
context_get Get a bounded project overview, checkpoint, questions, decisions, and handoff
context_record Append a note, decision, question, or checkpoint with provenance
context_handoff Record completed work, current work, blockers, and the next action
context_search Search project events using PostgreSQL full-text search

Each caller uses a stable conversation scope. By default, select a project with contitext: use. With trusted local mappings and an enabled lifecycle adapter, Contitext can resolve and bind an unbound scope automatically from a configured full Git remote or directory. Existing selections take precedence; unmatched or ambiguous mappings do not bind a project. Agents read the resulting binding and never guess a project from a repository name. Workspace membership and project ACLs are enforced on the server. API contracts and limits describe what the server enforces and what the agent protocol requires.

Commands

Terminal commands use the contitext executable:

contitext --help
contitext --version
contitext init --project research --name "Research"
contitext project list
contitext doctor
contitext migrate
contitext admin seed
contitext serve --host 127.0.0.1 --port 18791
contitext mcp

Top-level help includes common commands such as contitext project list. Use contitext project --help to discover project actions, then contitext project create --help for that action's arguments. -h and --help work at each level without service configuration or a database connection.

Use the agent adapter installer to configure your clients with backups and a shared protocol. After installation, use these chat instructions in a conversation with the agent:

contitext: help
contitext: list
contitext: create my-project --name "My Project"
contitext: use my-project
contitext: status
contitext: search publishing
contitext: checkpoint Documented the publishing workflow.

contitext: is the only chat prefix. Prefix and command names are case-insensitive; an input-method full-width colon is accepted. Empty commands show help and unknown commands show an error with available commands. Arguments are preserved without Unicode normalization. These are agent instructions, not terminal subcommands. The terminal CLI currently runs and administers the service; it does not implement chat actions such as use, status, or search, and it does not set a global default project. See the command reference for CLI options, compatibility entry points, and conversation scope behavior.

Optional automation

Automatic project resolution and startup context loading are supported and opt-in. Start with the explicit workflow above, then configure trusted project mappings and enable the lifecycle adapter for your client. Manual selections always win. Context assembly selects effective decisions, open questions and the relevant task handoff within a documented budget. Candidate checkpoints add opt-in progress capture and durable retry; they do not create approved decisions.

Native command hooks cover Codex, Claude Code, Copilot CLI, Cursor desktop and Gemini CLI on macOS/Linux. Hermes, OpenClaw and OpenCode 2 have optional native plugin adapters; Zed retains explicit MCP. See coverage for runtime-specific capture, activation and validation boundaries. A Docker server can use the local Python client for hooks without exposing PostgreSQL.

What it includes

  • Private initialization, project and permission administration, diagnostics, and portable native/Docker/SSH MCP client configuration.
  • Project discovery filtered by caller access, and atomic creation owned by the authenticated caller without an owner UUID or implicit conversation switch.
  • Opt-in deterministic project resolution, startup context loading, bounded context assembly, and candidate checkpoints through supported lifecycle adapters.
  • Atomic validation that every event or handoff write matches the caller's conversation binding.
  • A durable, append-only event store with caller identity and source provenance.
  • Reader, writer, and owner project ACLs shared by REST and MCP.
  • Idempotent retries; conflicting reuse of an event key is rejected.
  • PostgreSQL full-text retrieval with pagination, without an embedding dependency.
  • Optional Markdown projection for local inspection and note-taking tools.
  • Synthetic tests for isolation, concurrency, restart recovery, projection, and real MCP stdio calls.

Use Contitext when you need explicit project continuity across tools and machines. It does not automatically capture every conversation, consolidate memories, build a knowledge graph, or decide which facts are true. The default context call retains the project-wide handoff; task-aware assembly selects a matching task or global fallback. Lifecycle changes require explicit metadata, not inferred agreement.

Read your context without an agent

Enable the optional Markdown reader to browse project state, decisions, notes, questions, and handoffs in Obsidian or any Markdown reader. No Obsidian plugin, subscription, or account is required for local viewing.

After a fresh Docker setup:

mkdir -p reader-vault
docker compose --profile reader up --build -d --wait

Open reader-vault as an Obsidian vault and start with README.md. The exporter refreshes every 60 seconds and shows the last successful snapshot and refresh status. Native installs use contitext --env-file /absolute/private.env export --output /absolute/reader-vault --watch 60.

This is a generated, one-way reading copy. Edits are not imported. Keep personal notes elsewhere. See the reader guide for existing-install permissions, remote copies, and troubleshooting.

Maintainer and engineering approach

Created and maintained by Jessy Wang, who leads product definition, architecture and AI-assisted engineering. Contitext grew from the need to carry decisions and next steps between projects, sessions and agents without repeatedly reconstructing the context by hand.

The workflow combines discussion with multiple AI systems, maintainer judgment, agent implementation and cross-model review of code and requirements. Read how the project is developed and the design overview for responsibilities and technical reading paths.

Synauta coordinates work between existing agents. Contitext preserves the project context needed to continue that work. The projects address complementary needs and can be used independently.

Development

See CONTRIBUTING.md for the isolated PostgreSQL test setup. See SECURITY.md for trust boundaries and vulnerability reporting. Repository: contitext/contitext.

License

Apache License 2.0.

Metadata

Release files for contitext 0.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for contitext 0.12.0
File Size Uploaded Provenance Actions
contitext-0.12.0.tar.gz 699.0 kB With provenance Details for contitext-0.12.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for contitext 0.12.0
File Interpreter ABI Platform Actions
contitext-0.12.0-py3-none-any.whl Python 3 none any Details for contitext-0.12.0-py3-none-any.whl

Total release size: 998.4 kB

Release files / contitext-0.12.0.tar.gz

Download URL contitext-0.12.0.tar.gz
Size 699.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7d4908215802cdb4436abe0c393f59aa32763e6b69a29ce06b90b6704a1f3387
BLAKE2b-256 checksum
How to use checksums
8d31e468cf84e0866b32fcb0c19437d35cd083f40a32a38c7c250f86c002a847
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.

Transparency log

Release files / contitext-0.12.0-py3-none-any.whl

Download URL contitext-0.12.0-py3-none-any.whl
Size 299.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef21471d490cdc877fa07255205d7dbdc50818122381acdd74c67d4ac732f408
BLAKE2b-256 checksum
How to use checksums
486ce393665d83e0e25b47b24765255021cce686de338e5fde3cb42fa993e4cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.

Transparency log

Security for contitext 0.12.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for contitext-0.12.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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