Skip to main content

Autonomous conduction and mediated adversarial deliberation between AI agents, pluggable into any project.

Project description

regent

Autonomous conduction and mediated adversarial deliberation between AI agents, pluggable into any project.

regent governs turns between agents (Claude, Codex, human mediators) under a frozen protocol: atomic turn mutex, CAS-versioned state, deliberation rounds with versioned acceptances, and a conduction daemon that executes production batches with a confined agent, test gates and evidence proof.

Extracted from the tool proven end-to-end in the ArtNFT project (IMP-003: first product batch fully conducted by the daemon, deliberated, accepted and deployed to production).

  • Requirements: docs/PRD.md
  • Extraction scope and decisions: docs/ESCOPO.md (PT-BR, pre-rename)
  • Deliberation rounds: docs/brainstorm/ (mediator's language, PT-BR)
  • Status: pre-extraction (scope closed 2026-07-20; code not yet migrated)

Install

pip install <path-to-this-repo>   # package: regent-cli; CLI: regent (not on PyPI yet)
cd <your-project>
regent init                        # seeds .regent/ + .claude/skills symlinks (atomic, idempotent)
regent doctor                      # checks executor (claude) and advisor (codex) CLIs

Then open a Claude Code session in the project — /regent and /regent-stop are available (/regent brainstorm "<question>" opens the first round). The v1 skills are control-backed: activity state lives in .regent/control.json and is driven through the JSON subcommands — regent status (control + lock + the executable control×files matrix as workspace.verdict), regent activity start|resume|suspend|conclude|heartbeat|takeover, regent stop request|check. Hosts seeded by older versions upgrade automatically on regent init (known-version manifest; unknown local edits are preserved as conflicts). The advisor requires the codex CLI. Conduction phase 1 mechanizes the two most error-prone sub-steps: regent advisor consult --prompt-file … --artifact … --linkage … (read-only sandboxed consultation with the REQ-003 §5 evidence pair generated by the command, fail-closed verdict expectation) and regent gate run --command … --declared-in <plan> --artifact … --linkage … (verbatim provenance check, process-group-killing timeout, integral output preserved). Conduction phase 2 adds regent turn run: one supervised, CONFINED claude -p turn — the agent may only write inside a declared envelope (a PreToolUse hook denies the rest), the supervisor proves what changed via git (blob shas vs authenticated post events) and commits through a private index with a HEAD compare-and-swap. The agent never commits; a violation, a tampered log or a red gate never yields a product commit.

Development: PYTHONPATH=src python3 -m unittest discover -s tests; packaging gate: bash scripts/gate-package.sh. Canonical skill content lives in src/regent/templates/ (ships inside the wheel); the repo's own .regent/skills/ symlinks into it (dogfood without duplication).

Protocol layer

regent.protocol (PLAN-001) is the transactional foundation the conduction daemon will drive: ControlStore (control.json with a real CAS — every mutation runs inside a kernel-flock critical section, atomic AND durable publication with file+directory fsync), TurnLock (executor-only turn ownership by uuid4 token; the whole lifecycle — acquire/heartbeat/release/takeover — is serialized under a flock; takeover is graced, audited, and rotates the control turn token BEFORE the new lock exists, aborting on divergence), stop-request representation (record_stop_request / read_valid_stop_request / suspend_activity, with activity/epoch/turn-token staleness fencing) and AuditLog (flock-serialized, fsynced JSONL under .regent/protocol/audit.jsonl). Dormant until the conduction phase wires it to the skills; the v0 skills remain file-driven.

MIT License © 2026 Flavio Alvim.

Project details


Download files

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

Source Distribution

regent_cli-0.6.0.tar.gz (76.7 kB view details)

Uploaded Source

Built Distribution

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

regent_cli-0.6.0-py3-none-any.whl (59.6 kB view details)

Uploaded Python 3

File details

Details for the file regent_cli-0.6.0.tar.gz.

File metadata

  • Download URL: regent_cli-0.6.0.tar.gz
  • Upload date:
  • Size: 76.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for regent_cli-0.6.0.tar.gz
Algorithm Hash digest
SHA256 739815e13b6a7c00a65f26cb7984b73821fbee6dc46510d4712aa7c18cded2df
MD5 c5a91d54ce780198e5682798ae918c71
BLAKE2b-256 87e1c1f7de6db50f59e920c873a58431a92397336dfac1fb88994739a47ed2b7

See more details on using hashes here.

File details

Details for the file regent_cli-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: regent_cli-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 59.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for regent_cli-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f599698b561f24e968b93368754d3f1e51fd990b07f7365a2ee20c49f2bf636
MD5 bdfb237b612f5c1d2704a6890cf27b06
BLAKE2b-256 f38c1bc2fb25cadb4be136381da356098a5ef436c71b52f89a82e4ad5d17c04d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page