Skip to main content

(/)(°,,°)(/)

ExoProtocol

PyPI Python License: MIT

Governance kernel for multi-agent development. Treats AI-agent sessions the way an OS treats processes — with enforceable scope, lifecycle control, audit trails, and crash recovery. Everything lives in your git repo.

Why

When multiple AI agents vibe-code on the same repo, things go wrong silently: scope collisions, forgotten context, ungoverned commits, duplicated work. ExoProtocol gives each agent session a ticket, a scope fence, and a paper trail — without leaving git.

Install

pip install exoprotocol

Quickstart

# 1. One-shot setup (init + compile + adapters + hooks + gitignore)
exo install

# 2. Dispatch a ticket
exo next --owner your-name

# 3. Start a governed session
EXO_ACTOR=agent:claude exo session-start \
  --ticket-id TICKET-001 \
  --vendor anthropic --model claude-code \
  --context-window 200000 \
  --task "implement the feature described in the ticket"

# 4. Finish the session
EXO_ACTOR=agent:claude exo session-finish \
  --summary "implemented feature, added tests" \
  --set-status review

Session start generates a bootstrap prompt with governance rules, scope constraints, sibling awareness, and operational learnings from prior sessions. Session finish runs drift detection (scope compliance, file budget, boundary violations), feature tracing, and writes a closeout memento.

Spec-to-gates traceability

# .exo/requirements.yaml
requirements:
  - id: REQ-AUTH-01
    title: "User authentication"
    acceptance:
      - ACC-AUTH-LOGIN     # User can log in with email/password
      - ACC-AUTH-LOCKOUT   # Account locks after 5 failed attempts
# tests/test_auth.py
# @acc: ACC-AUTH-LOGIN
def test_login_with_valid_credentials():
    ...
exo trace-reqs --check-tests  # verifies every acceptance criteria has a test

Requirements declare acceptance criteria. Tests annotate which criteria they verify with @acc: comments (language-agnostic). trace-reqs --check-tests cross-references the manifest against test annotations — untested criteria and orphan annotations are flagged as errors. The spec becomes the gate.

Agent handoff

# Agent A hands off to Agent B
EXO_ACTOR=agent:claude-opus exo session-handoff \
  --to agent:claude-sonnet --ticket-id TICKET-001 \
  --summary "Built API endpoints" --next-step "Write tests"

# Agent B starts — handoff context auto-injected into bootstrap
EXO_ACTOR=agent:claude-sonnet exo session-start --ticket-id TICKET-001 ...

Claude Code hooks

exo hook-install --all   # session lifecycle + enforcement + git pre-commit

Installs all six hook types:

  • SessionStart/SessionEnd — auto-start/finish governed sessions with bootstrap injection
  • PreToolUse (Bash) — gate git commit/git push on exo check
  • PreToolUse (Write|Edit) — block writes outside ticket scope (real enforcement, not advisory)
  • PostToolUse (Write|Edit) — auto-format Python files + budget tracking with warnings
  • Notification — audit trail logging to .exo/audit/notifications.jsonl
  • Stop — session hygiene warning before agent stops
  • Git pre-commit — runs exo check before every commit

Parallel instances get unique actor IDs via CLAUDE_ENV_FILE, so multiple Claude Code windows can work on different tickets without session clashes. Auto-branch creates exo/<ticket-id> branches on session-start.

Agent adapters

exo adapter-generate                    # all targets
exo adapter-generate --target codex     # OpenAI Codex
exo adapter-generate --target claude    # CLAUDE.md
exo adapter-generate --target ci        # GitHub Actions workflow

Generates governance-aware config for Claude Code (CLAUDE.md), Cursor (.cursorrules), AGENTS.md, OpenAI Codex (codex.md), and CI (.github/workflows/exo-governance.yml). All adapters reflect the current governance state — deny patterns, budgets, checks, lifecycle commands, and active intent provenance with scope boundaries.

SDK integrations

# OpenAI Agents SDK
from exo.integrations.openai_agents import ExoRunHooks
hooks = ExoRunHooks(repo=".", ticket_id="TKT-...", actor="agent:openai")
result = await Runner.run(agent, hooks=hooks)
pip install exoprotocol[openai-agents]  # OpenAI Agents SDK
pip install exoprotocol[claude]         # Claude Code hooks (auto-installed)

What session-start does

When an agent session starts, ExoProtocol:

  1. Compiles governance rules from the repo constitution
  2. Loads the ticket's scope, budget, and constraints
  3. Scans for sibling sessions and warns about scope conflicts
  4. Checks for unmerged work on other branches that overlaps your scope
  5. Injects operational learnings from prior sessions
  6. Produces a bootstrap prompt that the agent sees first

The agent works within these boundaries. At session-finish, drift detection scores how well the work stayed in scope.

Architecture

CLI / MCP  →  Orchestrator  →  Stdlib  →  Control  →  Kernel (frozen, 10 functions)

The kernel is intentionally small and frozen — governance compilation, ticket locks, audit log, rule checks. Everything else (session lifecycle, drift detection, feature tracing, dispatch, GC) lives in the stdlib. See docs/architecture.md.

MCP server

pip install exoprotocol[mcp]
exo-mcp
{
  "mcpServers": {
    "exo": {
      "command": "exo-mcp",
      "args": [],
      "env": { "EXO_ACTOR": "agent:claude" }
    }
  }
}

Works with Claude Code, Cursor, and any MCP-compatible client. Every CLI command has a matching MCP tool.

Documentation

Guides (for humans)

Agent Reference

Shared

License

MIT License. See LICENSE.

Metadata

Release files for exoprotocol 0.2.3

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

Source distribution (sdist)

Source distribution for exoprotocol 0.2.3
File Size Uploaded
exoprotocol-0.2.3.tar.gz 379.1 kB Details

Built distribution (wheel)

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

Total release size: 639.8 kB

Release files / exoprotocol-0.2.3.tar.gz

Download URL exoprotocol-0.2.3.tar.gz
Size 379.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e7c5f069f6c3bcfc86cc53e9a26013d870a324424a6d4bf5bb3f0b5710f48189
BLAKE2b-256 checksum
How to use checksums
570be735598f9e3bc9ef7bc99e3328af73e0ca33bda2ef76d03cef39ee68b569
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / exoprotocol-0.2.3-py3-none-any.whl

Download URL exoprotocol-0.2.3-py3-none-any.whl
Size 260.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
506044536ce8176a6e86921a92fc789f94c524b29e612eeb270dec99c6ab1195
BLAKE2b-256 checksum
How to use checksums
82216eb8d33e3c76df5c074cf0d29017a1b2bd239d679fa8c1d43e53736f39eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.29

2 release files

0.1.28

2 release files

0.1.27

2 release files

0.1.26

2 release files

0.1.25

2 release files

0.1.24

2 release files

0.1.23

2 release files

0.1.22

2 release files

0.1.21

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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