Latest commit

History

2,204 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

archon-cli

Archon Avatar

A strategic engineering CLI built in Rust. Self-learning agent platform with persistent memory, multi-agent pipelines, Evidence Engine provenance, document intelligence, governed learning, local world-model advisory learning, reasoning-quality events, Trading Lab data/backtest controls, and identity-aware Anthropic/Codex provider integration.

Documentation has moved. This README is now a landing page. The full structured docs live in docs/ — start there.


Quick start

# Build (rustup installs the pinned toolchain from rust-toolchain.toml)
git clone https://github.com/ste-bah/archon-cli
cd archon-cli
sudo scripts/install-system-deps.sh --check || sudo scripts/install-system-deps.sh
# macOS/Homebrew: run scripts/install-system-deps.sh without sudo.# Optional sandbox deps: sudo scripts/install-system-deps.sh --with-sandbox
cargo build --release --bin archon
ARCHON_BIN="$(pwd)/target/release/archon"# Authenticate with Claude/Anthropic OAuth or API-key billing"$ARCHON_BIN" auth login --provider anthropic
# or: export ANTHROPIC_API_KEY="sk-ant-api..."# Optional: authenticate with a ChatGPT/Codex subscription"$ARCHON_BIN" auth login --provider openai-codex
"$ARCHON_BIN" auth status
# Optional: store a Google Gemini API key for cloud VLM image descriptions"$ARCHON_BIN" auth login --provider google
# Initialise a blank project directory
mkdir -p ~/projects/my-archon-project
sh scripts/archon-init.sh \
--target ~/projects/my-archon-project \
--archon-cli-repo "$(pwd)"# Run interactive TUI from the project rootcd~/projects/my-archon-project
"$ARCHON_BIN"# Non-interactive print mode"$ARCHON_BIN" -p "summarize this project layout" --output-format json
# Browser workbench"$ARCHON_BIN" web --port 8421 --bind-address 127.0.0.1

WSL2 builders: add -j1 to avoid OOM during compilation.

Full installation guide: docs/getting-started/installation.md.

What archon-cli is

claude-code (TS/Bun)archon-cli (Rust)
RuntimeTypeScript / BunRust (pinned via rust-toolchain.toml)
Memorymarkdown filesCozoDB graph + embeddings
Documentsad hoc file readsOCR, image ingest, chunks, embeddings, hybrid retrieval, citations
PipelinesSingle-agent loop50-agent coding + 46-agent research + 84-specialist game theory
ReasoningDirect LLM call12 reasoning modes (deductive, inductive, abductive, analogical, adversarial, counterfactual, temporal, constraint, decomposition, first-principles, causal, contextual)
LearningNone8 subsystems plus local world-model advisory learning and first-class reasoning-quality events
Verificationmodel self-reportcompletion evidence, false-completion incidents, trust scores, provenance traces
IdentityNativeClaude Code spoof, Anthropic OAuth/API keys, or Codex OAuth

archon-cli is not affiliated with Anthropic or OpenAI. It can use an Anthropic API key, Anthropic/Claude OAuth with Claude Code identity spoofing, or OpenAI Codex OAuth where that provider is selected.

Authentication

Archon has two subscription-auth paths plus normal API keys. Gemini VLM uses a Google API key, stored in the same credentials file when you choose the guided login:

# Claude / Anthropic OAuth, stored in ~/.archon/.credentials.json
archon auth login --provider anthropic
# OpenAI Codex OAuth, stored beside the Anthropic token# (Archon also detects an existing official Codex CLI login)
archon auth login --provider openai-codex
# Inspect both without printing secrets
archon auth status
# Google Gemini API key for docs VLM
archon auth login --provider google
# Use Codex explicitly for one-shot chat
archon chat --provider openai-codex "summarize this repository"

To make the full interactive TUI use Codex, set:

[llm]
provider = "openai-codex"
[api]
default_model = "gpt-5.4"# optional; Archon uses this automatically if the old default is Claude-shaped

In Codex TUI sessions, the bottom status bar is initialized from the active Codex model, and /model accepts Codex shortcuts and model IDs such as default, codex, mini, gpt-5.5, gpt-5.4, gpt-5.4-mini, and gpt-5.3-codex. Anthropic sessions continue to validate Claude shortcuts and Claude model IDs.

Anthropic OAuth requests use the same Claude Code identity-spoof path as the agent and pipeline runners. Codex OAuth requests use the OpenAI Codex provider for chat, TUI sessions, tool use, subagents, /btw, team runs, and provider-neutral pipelines when [llm].provider = "openai-codex". API-key users can set ANTHROPIC_API_KEY=sk-ant-api...; proxy users can still point the Anthropic-compatible URL at OpenRouter, DeepSeek, LiteLLM, or another compatible endpoint and use native/API-key mode.

Video Evidence

Video evidence is ingested through archon video and becomes ordinary document chunks, so archon docs search, archon docs answer, and archon kb process consume it without a separate flag.

# Local video with a user transcript
archon video ingest ./lecture.mp4 --transcript ./lecture.vtt --frames none
archon video inspect <video-id># YouTube URL with your own transcript, no media download
archon video ingest "https://www.youtube.com/watch?v=abc123" \
--transcript ./talk.vtt \
--metadata-only
# YouTube URL with governed local download and whisper-cpp ASR
archon video ingest "https://youtu.be/abc123" --frames hybrid --asr whisper-cpp --yes
# Add YouTube evidence to a named KB bucket
archon video ingest "https://youtu.be/abc123" --kb trading-elliott-wave --frames hybrid --asr whisper-cpp --yes
archon kb process --kb trading-elliott-wave --claims --entities --relations
# Frame extraction for charts, diagrams, and slides
archon video ingest ./market-review.mp4 --frames hybrid --vlm --yes
archon video transcript <video-id> --format vtt
archon docs answer "what did the chart show?"

Answers cite video chunks as video@MM:SS when timestamp provenance is present. When policy allows caption capture, Archon tries YouTube captions before ASR; frame OCR can use local RapidOCR/OpenCV fallbacks for chart-heavy videos. See docs/video.md for ASR, OCR/VLM, policy, and compliance details.

Documentation map

The docs are organised by user goal:

SectionFind this here
Getting starteddocs/getting-started/ — install, first run, quick start
Architecturedocs/architecture/ — overview, learning systems, pipelines, Evidence Engine diagrams
Evidence Enginedocs/evidence-engine.md — documents, KB, provenance, game theory, completion integrity, governed learning
Trading Labdocs/trading-lab.md and docs/cookbook/trading-lab.md — governed trading research, strategy specs, Pine prototypes, deterministic backtests, TradingView replay-paper evidence, workflow specs, paper/live gates, and risk/audit controls
Providersdocs/providers/ — provider runtime, Codex app-server, Claude Code spoofing, auth profiles, cloud/local providers
Agents & learningdocs/agents/ and docs/learning/ — governed agent evolution, memory promotion, permission governance
World modeldocs/architecture/world-model.md — local trace corpus, advisory predictions, training backends, retention
Reasoning qualitydocs/architecture/reasoning-quality.md — visible claim/evidence events, correction links, critic policy, proactive briefing
Securitydocs/security/ — tool preflight, sandboxing, Docker, SSH, OpenShell
Referencedocs/reference/ — slash commands, tools, skills, permissions, config schema, CLI flags, env vars
Integrationsdocs/integrations/ — MCP, plugins, hooks, identity spoofing, VLM image descriptions, LSP, IDE extensions
Cookbookdocs/cookbook/ — real-world evidence workflows, YouTube/video evidence, strategic engagement, memory-driven coding, pipeline rewind, god-code pipeline, custom agents
Operationsdocs/operations/ — sessions, web workbench, TUI, cost, compaction, cron, remote control, troubleshooting, data locations
Developmentdocs/development/ — contributing, dev flow gates, adding tools/skills/agents, release process
Engineering practicedocs/defensive-patterns.md — rules for writing checks that cannot lie · docs/postmortem/ — numbered incident writeups · docs/decisions/ — decision records, including the rejected bucket
Release notesdocs/release-notes/ — per-version changelogs

Repository structure

archon-cli/
├── src/ # binary entry point + CLI layer
├── crates/ # 26-crate workspace
│ ├── archon-cli-workspace/ # binary
│ ├── archon-tui/ # ratatui terminal UI
│ ├── archon-core/ # agent loop, tools, skills
│ ├── archon-consciousness/ # rules, personality, persistence
│ ├── archon-session/ # session checkpoints (CozoDB)
│ ├── archon-memory/ # memory graph + embeddings (CozoDB)
│ ├── archon-llm/ # provider clients + identity/spoofing
│ ├── archon-tools/ # 65 registered tools
│ ├── archon-permissions/ # 7 permission modes
│ ├── archon-mcp/ # MCP transport
│ ├── archon-pipeline/ # 50+46 agent pipelines + game theory + learning systems
│ ├── archon-docs/ # document intelligence, OCR, retrieval
│ ├── archon-knowledge/ # claims, entities, contradictions
│ ├── archon-provenance/ # chain hashes, W3C PROV export
│ ├── archon-completion/ # completion integrity and trust
│ ├── archon-learning/ # governed learning events/manifests
│ ├── archon-meaning/ # labels, contrastive pairs, triplets
│ ├── archon-constellation/ # centroids, scoring, drift
│ ├── archon-world-model/ # local trace world model, advisor, counterfactual scoring
│ ├── archon-reasoning-quality/ # visible claim/evidence event store
│ ├── archon-policy/ # policy gates
│ ├── archon-leann/ # semantic code search
│ ├── archon-plugin/ # dynamic plugin loading
│ ├── archon-sdk/ # embedding API + IDE bridge
│ ├── archon-context/ # context compaction
│ ├── archon-observability/ # metrics, tracing
│ └── ...
├── docs/ # user-facing documentation
└── scripts/ # dev flow gates, helpers

Status

Current release: v1.9.3release notes

Plan Mode now has a durable approval lifecycle: explicit user exit controls, safe permission restoration, editable plan documents, plan-linked task materialization, authoritative completion evidence, reconciliation, and a Plan-Mode-specific model override. The trust boundary blocks subagents from entering or exiting Plan Mode and fails closed when evidence or approval authority cannot be verified.

Registered canonical skills now appear in slash autocomplete. Primary commands remain first and keep dispatch precedence; rows are labelled [command] or [skill], aliases are not duplicated, and shadowed skills are omitted with an exact startup warning.

Built on v1.9.0, where a knowledge base stopped being two disjoint things. archon kb kbs and the web Ingest tab list the same union, so a name created on either surface is visible and usable from both — and a name you did not write down is recoverable at all. Corrections only reinforce a rule once something has been shown to have caused them, with the attribution itself running in shadow. The Memory Garden runs under a single-run lock and a work budget, and its irreversible operations became proposals a human approves. Replay weights transitions by latent surprise, which was recorded and never read.

The subagent runtime stopped repeating itself: five whole-array copies per round became two, a transcript opens once instead of once per message, and a ten-way fan-out queries the memory store three times rather than thirty. Typing is multi-line — Shift+Enter inserts a newline where the terminal can express it — and the input area no longer leaves glyphs behind when it grows and shrinks.

Built on v1.8.0, which gave the cognitive metrics a consumer that can say no, and v1.7.0, which wired four subsystems that had been built, tested and never called.

On upgrade: a correction no longer reinforces a rule unless something has been shown to have caused it. Attribution runs in shadow and fails closed, so an unattributable correction is recorded and reinforces nothing — the extractor's deferred semantic pass reinforces nothing at all now, because it records against an action window that has already moved. Scheduled garden consolidation never deletes: staleness and overflow pruning become proposals you approve through /garden proposals, while /garden run by hand behaves as before. The web workbench answers 403 rather than 200 when policy refuses an action, so a caller checking only the status code no longer reads a refusal as success. Enter still submits; Shift+Enter inserts a newline, and Ctrl+L forces a redraw. See the release notes.

From v1.9.3: a write to a file the agent has not read is now refused.Edit, Write and NotebookEdit are checked against what Read, Grep and NotebookRead recorded; Bash is not checked. Set [filesystem].read_before_edit to "warn" or "off" to soften or disable it. voice.hotkey defaults to "ctrl+v", which is the key that has always been bound. Building on Linux needs libasound2-dev now that microphone capture is a default feature. /feedback rates a message rather than submitting a report, replacing a skill that recorded nothing. See the release notes.

From v1.9.2: a structured ExitPlanMode submission now requires approval, while /plan off, /plan exit, and /plan done remain explicit direct exits to default. Only plan-linked task rows persist and rehydrate; unrelated manual tasks remain process-scoped. Skills are discovered when a session starts, so restart Archon after adding or editing a SKILL.md. See the release notes.

From v1.9.1: cost figures move in both directions — cache reads were priced at zero and writes at par, so caching could only ever look like a saving. prompt_cache_conversation = false no longer disables the tools and system checkpoints along with the message one. This turn's volatile system blocks move onto the last user message (prompt_cache_reorder, default on), which changes where the model sees them. RUST_LOG now reaches the session log. See the release notes.

From v1.8.0: project capability manifests no longer hoist tools, a declared artifact must be a regular non-empty file, and events.jsonl gained a blocking_gap_detected kind.

From v1.7.0: the cognitive schema migrates on first open, and history for two cognitive_tick_audit columns is set to null — under the old code those were hardcoded, so every stored value was a fabrication rather than a measurement.

From v1.6.0: the repository code index no longer builds at session start — it cost roughly seventeen CPU-hours on a 3,200-file repository, on sessions that never asked for code context. Restore it with [code_index] index_on_startup = true. And Intel macOS is no longer built: ONNX Runtime stopped publishing x64 macOS binaries and the Rust ort bindings followed, so the embedding runtime cannot be linked there. Apple Silicon covers every Mac still receiving macOS updates.

Every release from v0.1.6 onward is indexed with a one-line summary in the documentation map. This section carries the current release and what changes on upgrade — nothing a reader can look up.

Contributing

See docs/development/contributing.md. Every task passes the 6-gate dev flow (docs/development/dev-flow-gates.md) before merge.

Before writing a gate, a lint, a CI step, or a test involving a subprocess, a platform difference, or a clock, read docs/defensive-patterns.md. Every rule there is traced to a postmortem of a check in this repo that reported green while inspecting nothing.

License

See LICENSE (MIT). Exception: the plugins/ collection is derived from Apache-2.0 sources and remains Apache-2.0 — see its licensing section.

archon-cli can proxy Anthropic Claude and OpenAI Codex-compatible APIs. You must have valid credentials or an active subscription and comply with the relevant provider usage policies.

About

Archon CLI — a local-first Rust agentic command center with provider-flexible AI, TUI/CLI parity, persistent memory, document/evidence intelligence, provenance, self-learning, and multi-agent coding/research/game-theory pipelines.

Resources

Contributing

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Latest commit

History

2,204 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

archon-cli

Archon Avatar

A strategic engineering CLI built in Rust. Self-learning agent platform with persistent memory, multi-agent pipelines, Evidence Engine provenance, document intelligence, governed learning, local world-model advisory learning, reasoning-quality events, Trading Lab data/backtest controls, and identity-aware Anthropic/Codex provider integration.

Documentation has moved. This README is now a landing page. The full structured docs live in docs/ — start there.


Quick start

# Build (rustup installs the pinned toolchain from rust-toolchain.toml)
git clone https://github.com/ste-bah/archon-cli
cd archon-cli
sudo scripts/install-system-deps.sh --check || sudo scripts/install-system-deps.sh
# macOS/Homebrew: run scripts/install-system-deps.sh without sudo.# Optional sandbox deps: sudo scripts/install-system-deps.sh --with-sandbox
cargo build --release --bin archon
ARCHON_BIN="$(pwd)/target/release/archon"# Authenticate with Claude/Anthropic OAuth or API-key billing"$ARCHON_BIN" auth login --provider anthropic
# or: export ANTHROPIC_API_KEY="sk-ant-api..."# Optional: authenticate with a ChatGPT/Codex subscription"$ARCHON_BIN" auth login --provider openai-codex
"$ARCHON_BIN" auth status
# Optional: store a Google Gemini API key for cloud VLM image descriptions"$ARCHON_BIN" auth login --provider google
# Initialise a blank project directory
mkdir -p ~/projects/my-archon-project
sh scripts/archon-init.sh \
--target ~/projects/my-archon-project \
--archon-cli-repo "$(pwd)"# Run interactive TUI from the project rootcd~/projects/my-archon-project
"$ARCHON_BIN"# Non-interactive print mode"$ARCHON_BIN" -p "summarize this project layout" --output-format json
# Browser workbench"$ARCHON_BIN" web --port 8421 --bind-address 127.0.0.1

WSL2 builders: add -j1 to avoid OOM during compilation.

Full installation guide: docs/getting-started/installation.md.

What archon-cli is

claude-code (TS/Bun)archon-cli (Rust)
RuntimeTypeScript / BunRust (pinned via rust-toolchain.toml)
Memorymarkdown filesCozoDB graph + embeddings
Documentsad hoc file readsOCR, image ingest, chunks, embeddings, hybrid retrieval, citations
PipelinesSingle-agent loop50-agent coding + 46-agent research + 84-specialist game theory
ReasoningDirect LLM call12 reasoning modes (deductive, inductive, abductive, analogical, adversarial, counterfactual, temporal, constraint, decomposition, first-principles, causal, contextual)
LearningNone8 subsystems plus local world-model advisory learning and first-class reasoning-quality events
Verificationmodel self-reportcompletion evidence, false-completion incidents, trust scores, provenance traces
IdentityNativeClaude Code spoof, Anthropic OAuth/API keys, or Codex OAuth

archon-cli is not affiliated with Anthropic or OpenAI. It can use an Anthropic API key, Anthropic/Claude OAuth with Claude Code identity spoofing, or OpenAI Codex OAuth where that provider is selected.

Authentication

Archon has two subscription-auth paths plus normal API keys. Gemini VLM uses a Google API key, stored in the same credentials file when you choose the guided login:

# Claude / Anthropic OAuth, stored in ~/.archon/.credentials.json
archon auth login --provider anthropic
# OpenAI Codex OAuth, stored beside the Anthropic token# (Archon also detects an existing official Codex CLI login)
archon auth login --provider openai-codex
# Inspect both without printing secrets
archon auth status
# Google Gemini API key for docs VLM
archon auth login --provider google
# Use Codex explicitly for one-shot chat
archon chat --provider openai-codex "summarize this repository"

To make the full interactive TUI use Codex, set:

[llm]
provider = "openai-codex"
[api]
default_model = "gpt-5.4"# optional; Archon uses this automatically if the old default is Claude-shaped

In Codex TUI sessions, the bottom status bar is initialized from the active Codex model, and /model accepts Codex shortcuts and model IDs such as default, codex, mini, gpt-5.5, gpt-5.4, gpt-5.4-mini, and gpt-5.3-codex. Anthropic sessions continue to validate Claude shortcuts and Claude model IDs.

Anthropic OAuth requests use the same Claude Code identity-spoof path as the agent and pipeline runners. Codex OAuth requests use the OpenAI Codex provider for chat, TUI sessions, tool use, subagents, /btw, team runs, and provider-neutral pipelines when [llm].provider = "openai-codex". API-key users can set ANTHROPIC_API_KEY=sk-ant-api...; proxy users can still point the Anthropic-compatible URL at OpenRouter, DeepSeek, LiteLLM, or another compatible endpoint and use native/API-key mode.

Video Evidence

Video evidence is ingested through archon video and becomes ordinary document chunks, so archon docs search, archon docs answer, and archon kb process consume it without a separate flag.

# Local video with a user transcript
archon video ingest ./lecture.mp4 --transcript ./lecture.vtt --frames none
archon video inspect <video-id># YouTube URL with your own transcript, no media download
archon video ingest "https://www.youtube.com/watch?v=abc123" \
--transcript ./talk.vtt \
--metadata-only
# YouTube URL with governed local download and whisper-cpp ASR
archon video ingest "https://youtu.be/abc123" --frames hybrid --asr whisper-cpp --yes
# Add YouTube evidence to a named KB bucket
archon video ingest "https://youtu.be/abc123" --kb trading-elliott-wave --frames hybrid --asr whisper-cpp --yes
archon kb process --kb trading-elliott-wave --claims --entities --relations
# Frame extraction for charts, diagrams, and slides
archon video ingest ./market-review.mp4 --frames hybrid --vlm --yes
archon video transcript <video-id> --format vtt
archon docs answer "what did the chart show?"

Answers cite video chunks as video@MM:SS when timestamp provenance is present. When policy allows caption capture, Archon tries YouTube captions before ASR; frame OCR can use local RapidOCR/OpenCV fallbacks for chart-heavy videos. See docs/video.md for ASR, OCR/VLM, policy, and compliance details.

Documentation map

The docs are organised by user goal:

SectionFind this here
Getting starteddocs/getting-started/ — install, first run, quick start
Architecturedocs/architecture/ — overview, learning systems, pipelines, Evidence Engine diagrams
Evidence Enginedocs/evidence-engine.md — documents, KB, provenance, game theory, completion integrity, governed learning
Trading Labdocs/trading-lab.md and docs/cookbook/trading-lab.md — governed trading research, strategy specs, Pine prototypes, deterministic backtests, TradingView replay-paper evidence, workflow specs, paper/live gates, and risk/audit controls
Providersdocs/providers/ — provider runtime, Codex app-server, Claude Code spoofing, auth profiles, cloud/local providers
Agents & learningdocs/agents/ and docs/learning/ — governed agent evolution, memory promotion, permission governance
World modeldocs/architecture/world-model.md — local trace corpus, advisory predictions, training backends, retention
Reasoning qualitydocs/architecture/reasoning-quality.md — visible claim/evidence events, correction links, critic policy, proactive briefing
Securitydocs/security/ — tool preflight, sandboxing, Docker, SSH, OpenShell
Referencedocs/reference/ — slash commands, tools, skills, permissions, config schema, CLI flags, env vars
Integrationsdocs/integrations/ — MCP, plugins, hooks, identity spoofing, VLM image descriptions, LSP, IDE extensions
Cookbookdocs/cookbook/ — real-world evidence workflows, YouTube/video evidence, strategic engagement, memory-driven coding, pipeline rewind, god-code pipeline, custom agents
Operationsdocs/operations/ — sessions, web workbench, TUI, cost, compaction, cron, remote control, troubleshooting, data locations
Developmentdocs/development/ — contributing, dev flow gates, adding tools/skills/agents, release process
Engineering practicedocs/defensive-patterns.md — rules for writing checks that cannot lie · docs/postmortem/ — numbered incident writeups · docs/decisions/ — decision records, including the rejected bucket
Release notesdocs/release-notes/ — per-version changelogs

Repository structure

archon-cli/
├── src/ # binary entry point + CLI layer
├── crates/ # 26-crate workspace
│ ├── archon-cli-workspace/ # binary
│ ├── archon-tui/ # ratatui terminal UI
│ ├── archon-core/ # agent loop, tools, skills
│ ├── archon-consciousness/ # rules, personality, persistence
│ ├── archon-session/ # session checkpoints (CozoDB)
│ ├── archon-memory/ # memory graph + embeddings (CozoDB)
│ ├── archon-llm/ # provider clients + identity/spoofing
│ ├── archon-tools/ # 65 registered tools
│ ├── archon-permissions/ # 7 permission modes
│ ├── archon-mcp/ # MCP transport
│ ├── archon-pipeline/ # 50+46 agent pipelines + game theory + learning systems
│ ├── archon-docs/ # document intelligence, OCR, retrieval
│ ├── archon-knowledge/ # claims, entities, contradictions
│ ├── archon-provenance/ # chain hashes, W3C PROV export
│ ├── archon-completion/ # completion integrity and trust
│ ├── archon-learning/ # governed learning events/manifests
│ ├── archon-meaning/ # labels, contrastive pairs, triplets
│ ├── archon-constellation/ # centroids, scoring, drift
│ ├── archon-world-model/ # local trace world model, advisor, counterfactual scoring
│ ├── archon-reasoning-quality/ # visible claim/evidence event store
│ ├── archon-policy/ # policy gates
│ ├── archon-leann/ # semantic code search
│ ├── archon-plugin/ # dynamic plugin loading
│ ├── archon-sdk/ # embedding API + IDE bridge
│ ├── archon-context/ # context compaction
│ ├── archon-observability/ # metrics, tracing
│ └── ...
├── docs/ # user-facing documentation
└── scripts/ # dev flow gates, helpers

Status

Current release: v1.9.3release notes

Plan Mode now has a durable approval lifecycle: explicit user exit controls, safe permission restoration, editable plan documents, plan-linked task materialization, authoritative completion evidence, reconciliation, and a Plan-Mode-specific model override. The trust boundary blocks subagents from entering or exiting Plan Mode and fails closed when evidence or approval authority cannot be verified.

Registered canonical skills now appear in slash autocomplete. Primary commands remain first and keep dispatch precedence; rows are labelled [command] or [skill], aliases are not duplicated, and shadowed skills are omitted with an exact startup warning.

Built on v1.9.0, where a knowledge base stopped being two disjoint things. archon kb kbs and the web Ingest tab list the same union, so a name created on either surface is visible and usable from both — and a name you did not write down is recoverable at all. Corrections only reinforce a rule once something has been shown to have caused them, with the attribution itself running in shadow. The Memory Garden runs under a single-run lock and a work budget, and its irreversible operations became proposals a human approves. Replay weights transitions by latent surprise, which was recorded and never read.

The subagent runtime stopped repeating itself: five whole-array copies per round became two, a transcript opens once instead of once per message, and a ten-way fan-out queries the memory store three times rather than thirty. Typing is multi-line — Shift+Enter inserts a newline where the terminal can express it — and the input area no longer leaves glyphs behind when it grows and shrinks.

Built on v1.8.0, which gave the cognitive metrics a consumer that can say no, and v1.7.0, which wired four subsystems that had been built, tested and never called.

On upgrade: a correction no longer reinforces a rule unless something has been shown to have caused it. Attribution runs in shadow and fails closed, so an unattributable correction is recorded and reinforces nothing — the extractor's deferred semantic pass reinforces nothing at all now, because it records against an action window that has already moved. Scheduled garden consolidation never deletes: staleness and overflow pruning become proposals you approve through /garden proposals, while /garden run by hand behaves as before. The web workbench answers 403 rather than 200 when policy refuses an action, so a caller checking only the status code no longer reads a refusal as success. Enter still submits; Shift+Enter inserts a newline, and Ctrl+L forces a redraw. See the release notes.

From v1.9.3: a write to a file the agent has not read is now refused.Edit, Write and NotebookEdit are checked against what Read, Grep and NotebookRead recorded; Bash is not checked. Set [filesystem].read_before_edit to "warn" or "off" to soften or disable it. voice.hotkey defaults to "ctrl+v", which is the key that has always been bound. Building on Linux needs libasound2-dev now that microphone capture is a default feature. /feedback rates a message rather than submitting a report, replacing a skill that recorded nothing. See the release notes.

From v1.9.2: a structured ExitPlanMode submission now requires approval, while /plan off, /plan exit, and /plan done remain explicit direct exits to default. Only plan-linked task rows persist and rehydrate; unrelated manual tasks remain process-scoped. Skills are discovered when a session starts, so restart Archon after adding or editing a SKILL.md. See the release notes.

From v1.9.1: cost figures move in both directions — cache reads were priced at zero and writes at par, so caching could only ever look like a saving. prompt_cache_conversation = false no longer disables the tools and system checkpoints along with the message one. This turn's volatile system blocks move onto the last user message (prompt_cache_reorder, default on), which changes where the model sees them. RUST_LOG now reaches the session log. See the release notes.

From v1.8.0: project capability manifests no longer hoist tools, a declared artifact must be a regular non-empty file, and events.jsonl gained a blocking_gap_detected kind.

From v1.7.0: the cognitive schema migrates on first open, and history for two cognitive_tick_audit columns is set to null — under the old code those were hardcoded, so every stored value was a fabrication rather than a measurement.

From v1.6.0: the repository code index no longer builds at session start — it cost roughly seventeen CPU-hours on a 3,200-file repository, on sessions that never asked for code context. Restore it with [code_index] index_on_startup = true. And Intel macOS is no longer built: ONNX Runtime stopped publishing x64 macOS binaries and the Rust ort bindings followed, so the embedding runtime cannot be linked there. Apple Silicon covers every Mac still receiving macOS updates.

Every release from v0.1.6 onward is indexed with a one-line summary in the documentation map. This section carries the current release and what changes on upgrade — nothing a reader can look up.

Contributing

See docs/development/contributing.md. Every task passes the 6-gate dev flow (docs/development/dev-flow-gates.md) before merge.

Before writing a gate, a lint, a CI step, or a test involving a subprocess, a platform difference, or a clock, read docs/defensive-patterns.md. Every rule there is traced to a postmortem of a check in this repo that reported green while inspecting nothing.

License

See LICENSE (MIT). Exception: the plugins/ collection is derived from Apache-2.0 sources and remains Apache-2.0 — see its licensing section.

archon-cli can proxy Anthropic Claude and OpenAI Codex-compatible APIs. You must have valid credentials or an active subscription and comply with the relevant provider usage policies.

About

Archon CLI — a local-first Rust agentic command center with provider-flexible AI, TUI/CLI parity, persistent memory, document/evidence intelligence, provenance, self-learning, and multi-agent coding/research/game-theory pipelines.

Resources

Contributing

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

2,204 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

archon-cli

Archon Avatar

A strategic engineering CLI built in Rust. Self-learning agent platform with persistent memory, multi-agent pipelines, Evidence Engine provenance, document intelligence, governed learning, local world-model advisory learning, reasoning-quality events, Trading Lab data/backtest controls, and identity-aware Anthropic/Codex provider integration.

Documentation has moved. This README is now a landing page. The full structured docs live in docs/ — start there.


Quick start

# Build (rustup installs the pinned toolchain from rust-toolchain.toml)
git clone https://github.com/ste-bah/archon-cli
cd archon-cli
sudo scripts/install-system-deps.sh --check || sudo scripts/install-system-deps.sh
# macOS/Homebrew: run scripts/install-system-deps.sh without sudo.# Optional sandbox deps: sudo scripts/install-system-deps.sh --with-sandbox
cargo build --release --bin archon
ARCHON_BIN="$(pwd)/target/release/archon"# Authenticate with Claude/Anthropic OAuth or API-key billing"$ARCHON_BIN" auth login --provider anthropic
# or: export ANTHROPIC_API_KEY="sk-ant-api..."# Optional: authenticate with a ChatGPT/Codex subscription"$ARCHON_BIN" auth login --provider openai-codex
"$ARCHON_BIN" auth status
# Optional: store a Google Gemini API key for cloud VLM image descriptions"$ARCHON_BIN" auth login --provider google
# Initialise a blank project directory
mkdir -p ~/projects/my-archon-project
sh scripts/archon-init.sh \
--target ~/projects/my-archon-project \
--archon-cli-repo "$(pwd)"# Run interactive TUI from the project rootcd~/projects/my-archon-project
"$ARCHON_BIN"# Non-interactive print mode"$ARCHON_BIN" -p "summarize this project layout" --output-format json
# Browser workbench"$ARCHON_BIN" web --port 8421 --bind-address 127.0.0.1

WSL2 builders: add -j1 to avoid OOM during compilation.

Full installation guide: docs/getting-started/installation.md.

What archon-cli is

claude-code (TS/Bun)archon-cli (Rust)
RuntimeTypeScript / BunRust (pinned via rust-toolchain.toml)
Memorymarkdown filesCozoDB graph + embeddings
Documentsad hoc file readsOCR, image ingest, chunks, embeddings, hybrid retrieval, citations
PipelinesSingle-agent loop50-agent coding + 46-agent research + 84-specialist game theory
ReasoningDirect LLM call12 reasoning modes (deductive, inductive, abductive, analogical, adversarial, counterfactual, temporal, constraint, decomposition, first-principles, causal, contextual)
LearningNone8 subsystems plus local world-model advisory learning and first-class reasoning-quality events
Verificationmodel self-reportcompletion evidence, false-completion incidents, trust scores, provenance traces
IdentityNativeClaude Code spoof, Anthropic OAuth/API keys, or Codex OAuth

archon-cli is not affiliated with Anthropic or OpenAI. It can use an Anthropic API key, Anthropic/Claude OAuth with Claude Code identity spoofing, or OpenAI Codex OAuth where that provider is selected.

Authentication

Archon has two subscription-auth paths plus normal API keys. Gemini VLM uses a Google API key, stored in the same credentials file when you choose the guided login:

# Claude / Anthropic OAuth, stored in ~/.archon/.credentials.json
archon auth login --provider anthropic
# OpenAI Codex OAuth, stored beside the Anthropic token# (Archon also detects an existing official Codex CLI login)
archon auth login --provider openai-codex
# Inspect both without printing secrets
archon auth status
# Google Gemini API key for docs VLM
archon auth login --provider google
# Use Codex explicitly for one-shot chat
archon chat --provider openai-codex "summarize this repository"

To make the full interactive TUI use Codex, set:

[llm]
provider = "openai-codex"
[api]
default_model = "gpt-5.4"# optional; Archon uses this automatically if the old default is Claude-shaped

In Codex TUI sessions, the bottom status bar is initialized from the active Codex model, and /model accepts Codex shortcuts and model IDs such as default, codex, mini, gpt-5.5, gpt-5.4, gpt-5.4-mini, and gpt-5.3-codex. Anthropic sessions continue to validate Claude shortcuts and Claude model IDs.

Anthropic OAuth requests use the same Claude Code identity-spoof path as the agent and pipeline runners. Codex OAuth requests use the OpenAI Codex provider for chat, TUI sessions, tool use, subagents, /btw, team runs, and provider-neutral pipelines when [llm].provider = "openai-codex". API-key users can set ANTHROPIC_API_KEY=sk-ant-api...; proxy users can still point the Anthropic-compatible URL at OpenRouter, DeepSeek, LiteLLM, or another compatible endpoint and use native/API-key mode.

Video Evidence

Video evidence is ingested through archon video and becomes ordinary document chunks, so archon docs search, archon docs answer, and archon kb process consume it without a separate flag.

# Local video with a user transcript
archon video ingest ./lecture.mp4 --transcript ./lecture.vtt --frames none
archon video inspect <video-id># YouTube URL with your own transcript, no media download
archon video ingest "https://www.youtube.com/watch?v=abc123" \
--transcript ./talk.vtt \
--metadata-only
# YouTube URL with governed local download and whisper-cpp ASR
archon video ingest "https://youtu.be/abc123" --frames hybrid --asr whisper-cpp --yes
# Add YouTube evidence to a named KB bucket
archon video ingest "https://youtu.be/abc123" --kb trading-elliott-wave --frames hybrid --asr whisper-cpp --yes
archon kb process --kb trading-elliott-wave --claims --entities --relations
# Frame extraction for charts, diagrams, and slides
archon video ingest ./market-review.mp4 --frames hybrid --vlm --yes
archon video transcript <video-id> --format vtt
archon docs answer "what did the chart show?"

Answers cite video chunks as video@MM:SS when timestamp provenance is present. When policy allows caption capture, Archon tries YouTube captions before ASR; frame OCR can use local RapidOCR/OpenCV fallbacks for chart-heavy videos. See docs/video.md for ASR, OCR/VLM, policy, and compliance details.

Documentation map

The docs are organised by user goal:

SectionFind this here
Getting starteddocs/getting-started/ — install, first run, quick start
Architecturedocs/architecture/ — overview, learning systems, pipelines, Evidence Engine diagrams
Evidence Enginedocs/evidence-engine.md — documents, KB, provenance, game theory, completion integrity, governed learning
Trading Labdocs/trading-lab.md and docs/cookbook/trading-lab.md — governed trading research, strategy specs, Pine prototypes, deterministic backtests, TradingView replay-paper evidence, workflow specs, paper/live gates, and risk/audit controls
Providersdocs/providers/ — provider runtime, Codex app-server, Claude Code spoofing, auth profiles, cloud/local providers
Agents & learningdocs/agents/ and docs/learning/ — governed agent evolution, memory promotion, permission governance
World modeldocs/architecture/world-model.md — local trace corpus, advisory predictions, training backends, retention
Reasoning qualitydocs/architecture/reasoning-quality.md — visible claim/evidence events, correction links, critic policy, proactive briefing
Securitydocs/security/ — tool preflight, sandboxing, Docker, SSH, OpenShell
Referencedocs/reference/ — slash commands, tools, skills, permissions, config schema, CLI flags, env vars
Integrationsdocs/integrations/ — MCP, plugins, hooks, identity spoofing, VLM image descriptions, LSP, IDE extensions
Cookbookdocs/cookbook/ — real-world evidence workflows, YouTube/video evidence, strategic engagement, memory-driven coding, pipeline rewind, god-code pipeline, custom agents
Operationsdocs/operations/ — sessions, web workbench, TUI, cost, compaction, cron, remote control, troubleshooting, data locations
Developmentdocs/development/ — contributing, dev flow gates, adding tools/skills/agents, release process
Engineering practicedocs/defensive-patterns.md — rules for writing checks that cannot lie · docs/postmortem/ — numbered incident writeups · docs/decisions/ — decision records, including the rejected bucket
Release notesdocs/release-notes/ — per-version changelogs

Repository structure

archon-cli/
├── src/ # binary entry point + CLI layer
├── crates/ # 26-crate workspace
│ ├── archon-cli-workspace/ # binary
│ ├── archon-tui/ # ratatui terminal UI
│ ├── archon-core/ # agent loop, tools, skills
│ ├── archon-consciousness/ # rules, personality, persistence
│ ├── archon-session/ # session checkpoints (CozoDB)
│ ├── archon-memory/ # memory graph + embeddings (CozoDB)
│ ├── archon-llm/ # provider clients + identity/spoofing
│ ├── archon-tools/ # 65 registered tools
│ ├── archon-permissions/ # 7 permission modes
│ ├── archon-mcp/ # MCP transport
│ ├── archon-pipeline/ # 50+46 agent pipelines + game theory + learning systems
│ ├── archon-docs/ # document intelligence, OCR, retrieval
│ ├── archon-knowledge/ # claims, entities, contradictions
│ ├── archon-provenance/ # chain hashes, W3C PROV export
│ ├── archon-completion/ # completion integrity and trust
│ ├── archon-learning/ # governed learning events/manifests
│ ├── archon-meaning/ # labels, contrastive pairs, triplets
│ ├── archon-constellation/ # centroids, scoring, drift
│ ├── archon-world-model/ # local trace world model, advisor, counterfactual scoring
│ ├── archon-reasoning-quality/ # visible claim/evidence event store
│ ├── archon-policy/ # policy gates
│ ├── archon-leann/ # semantic code search
│ ├── archon-plugin/ # dynamic plugin loading
│ ├── archon-sdk/ # embedding API + IDE bridge
│ ├── archon-context/ # context compaction
│ ├── archon-observability/ # metrics, tracing
│ └── ...
├── docs/ # user-facing documentation
└── scripts/ # dev flow gates, helpers

Status

Current release: v1.9.3release notes

Plan Mode now has a durable approval lifecycle: explicit user exit controls, safe permission restoration, editable plan documents, plan-linked task materialization, authoritative completion evidence, reconciliation, and a Plan-Mode-specific model override. The trust boundary blocks subagents from entering or exiting Plan Mode and fails closed when evidence or approval authority cannot be verified.

Registered canonical skills now appear in slash autocomplete. Primary commands remain first and keep dispatch precedence; rows are labelled [command] or [skill], aliases are not duplicated, and shadowed skills are omitted with an exact startup warning.

Built on v1.9.0, where a knowledge base stopped being two disjoint things. archon kb kbs and the web Ingest tab list the same union, so a name created on either surface is visible and usable from both — and a name you did not write down is recoverable at all. Corrections only reinforce a rule once something has been shown to have caused them, with the attribution itself running in shadow. The Memory Garden runs under a single-run lock and a work budget, and its irreversible operations became proposals a human approves. Replay weights transitions by latent surprise, which was recorded and never read.

The subagent runtime stopped repeating itself: five whole-array copies per round became two, a transcript opens once instead of once per message, and a ten-way fan-out queries the memory store three times rather than thirty. Typing is multi-line — Shift+Enter inserts a newline where the terminal can express it — and the input area no longer leaves glyphs behind when it grows and shrinks.

Built on v1.8.0, which gave the cognitive metrics a consumer that can say no, and v1.7.0, which wired four subsystems that had been built, tested and never called.

On upgrade: a correction no longer reinforces a rule unless something has been shown to have caused it. Attribution runs in shadow and fails closed, so an unattributable correction is recorded and reinforces nothing — the extractor's deferred semantic pass reinforces nothing at all now, because it records against an action window that has already moved. Scheduled garden consolidation never deletes: staleness and overflow pruning become proposals you approve through /garden proposals, while /garden run by hand behaves as before. The web workbench answers 403 rather than 200 when policy refuses an action, so a caller checking only the status code no longer reads a refusal as success. Enter still submits; Shift+Enter inserts a newline, and Ctrl+L forces a redraw. See the release notes.

From v1.9.3: a write to a file the agent has not read is now refused.Edit, Write and NotebookEdit are checked against what Read, Grep and NotebookRead recorded; Bash is not checked. Set [filesystem].read_before_edit to "warn" or "off" to soften or disable it. voice.hotkey defaults to "ctrl+v", which is the key that has always been bound. Building on Linux needs libasound2-dev now that microphone capture is a default feature. /feedback rates a message rather than submitting a report, replacing a skill that recorded nothing. See the release notes.

From v1.9.2: a structured ExitPlanMode submission now requires approval, while /plan off, /plan exit, and /plan done remain explicit direct exits to default. Only plan-linked task rows persist and rehydrate; unrelated manual tasks remain process-scoped. Skills are discovered when a session starts, so restart Archon after adding or editing a SKILL.md. See the release notes.

From v1.9.1: cost figures move in both directions — cache reads were priced at zero and writes at par, so caching could only ever look like a saving. prompt_cache_conversation = false no longer disables the tools and system checkpoints along with the message one. This turn's volatile system blocks move onto the last user message (prompt_cache_reorder, default on), which changes where the model sees them. RUST_LOG now reaches the session log. See the release notes.

From v1.8.0: project capability manifests no longer hoist tools, a declared artifact must be a regular non-empty file, and events.jsonl gained a blocking_gap_detected kind.

From v1.7.0: the cognitive schema migrates on first open, and history for two cognitive_tick_audit columns is set to null — under the old code those were hardcoded, so every stored value was a fabrication rather than a measurement.

From v1.6.0: the repository code index no longer builds at session start — it cost roughly seventeen CPU-hours on a 3,200-file repository, on sessions that never asked for code context. Restore it with [code_index] index_on_startup = true. And Intel macOS is no longer built: ONNX Runtime stopped publishing x64 macOS binaries and the Rust ort bindings followed, so the embedding runtime cannot be linked there. Apple Silicon covers every Mac still receiving macOS updates.

Every release from v0.1.6 onward is indexed with a one-line summary in the documentation map. This section carries the current release and what changes on upgrade — nothing a reader can look up.

Contributing

See docs/development/contributing.md. Every task passes the 6-gate dev flow (docs/development/dev-flow-gates.md) before merge.

Before writing a gate, a lint, a CI step, or a test involving a subprocess, a platform difference, or a clock, read docs/defensive-patterns.md. Every rule there is traced to a postmortem of a check in this repo that reported green while inspecting nothing.

License

See LICENSE (MIT). Exception: the plugins/ collection is derived from Apache-2.0 sources and remains Apache-2.0 — see its licensing section.

archon-cli can proxy Anthropic Claude and OpenAI Codex-compatible APIs. You must have valid credentials or an active subscription and comply with the relevant provider usage policies.

About

Archon CLI — a local-first Rust agentic command center with provider-flexible AI, TUI/CLI parity, persistent memory, document/evidence intelligence, provenance, self-learning, and multi-agent coding/research/game-theory pipelines.

Resources

Contributing

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

2,204 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

archon-cli

Archon Avatar

A strategic engineering CLI built in Rust. Self-learning agent platform with persistent memory, multi-agent pipelines, Evidence Engine provenance, document intelligence, governed learning, local world-model advisory learning, reasoning-quality events, Trading Lab data/backtest controls, and identity-aware Anthropic/Codex provider integration.

Documentation has moved. This README is now a landing page. The full structured docs live in docs/ — start there.


Quick start

# Build (rustup installs the pinned toolchain from rust-toolchain.toml)
git clone https://github.com/ste-bah/archon-cli
cd archon-cli
sudo scripts/install-system-deps.sh --check || sudo scripts/install-system-deps.sh
# macOS/Homebrew: run scripts/install-system-deps.sh without sudo.# Optional sandbox deps: sudo scripts/install-system-deps.sh --with-sandbox
cargo build --release --bin archon
ARCHON_BIN="$(pwd)/target/release/archon"# Authenticate with Claude/Anthropic OAuth or API-key billing"$ARCHON_BIN" auth login --provider anthropic
# or: export ANTHROPIC_API_KEY="sk-ant-api..."# Optional: authenticate with a ChatGPT/Codex subscription"$ARCHON_BIN" auth login --provider openai-codex
"$ARCHON_BIN" auth status
# Optional: store a Google Gemini API key for cloud VLM image descriptions"$ARCHON_BIN" auth login --provider google
# Initialise a blank project directory
mkdir -p ~/projects/my-archon-project
sh scripts/archon-init.sh \
--target ~/projects/my-archon-project \
--archon-cli-repo "$(pwd)"# Run interactive TUI from the project rootcd~/projects/my-archon-project
"$ARCHON_BIN"# Non-interactive print mode"$ARCHON_BIN" -p "summarize this project layout" --output-format json
# Browser workbench"$ARCHON_BIN" web --port 8421 --bind-address 127.0.0.1

WSL2 builders: add -j1 to avoid OOM during compilation.

Full installation guide: docs/getting-started/installation.md.

What archon-cli is

claude-code (TS/Bun)archon-cli (Rust)
RuntimeTypeScript / BunRust (pinned via rust-toolchain.toml)
Memorymarkdown filesCozoDB graph + embeddings
Documentsad hoc file readsOCR, image ingest, chunks, embeddings, hybrid retrieval, citations
PipelinesSingle-agent loop50-agent coding + 46-agent research + 84-specialist game theory
ReasoningDirect LLM call12 reasoning modes (deductive, inductive, abductive, analogical, adversarial, counterfactual, temporal, constraint, decomposition, first-principles, causal, contextual)
LearningNone8 subsystems plus local world-model advisory learning and first-class reasoning-quality events
Verificationmodel self-reportcompletion evidence, false-completion incidents, trust scores, provenance traces
IdentityNativeClaude Code spoof, Anthropic OAuth/API keys, or Codex OAuth

archon-cli is not affiliated with Anthropic or OpenAI. It can use an Anthropic API key, Anthropic/Claude OAuth with Claude Code identity spoofing, or OpenAI Codex OAuth where that provider is selected.

Authentication

Archon has two subscription-auth paths plus normal API keys. Gemini VLM uses a Google API key, stored in the same credentials file when you choose the guided login:

# Claude / Anthropic OAuth, stored in ~/.archon/.credentials.json
archon auth login --provider anthropic
# OpenAI Codex OAuth, stored beside the Anthropic token# (Archon also detects an existing official Codex CLI login)
archon auth login --provider openai-codex
# Inspect both without printing secrets
archon auth status
# Google Gemini API key for docs VLM
archon auth login --provider google
# Use Codex explicitly for one-shot chat
archon chat --provider openai-codex "summarize this repository"

To make the full interactive TUI use Codex, set:

[llm]
provider = "openai-codex"
[api]
default_model = "gpt-5.4"# optional; Archon uses this automatically if the old default is Claude-shaped

In Codex TUI sessions, the bottom status bar is initialized from the active Codex model, and /model accepts Codex shortcuts and model IDs such as default, codex, mini, gpt-5.5, gpt-5.4, gpt-5.4-mini, and gpt-5.3-codex. Anthropic sessions continue to validate Claude shortcuts and Claude model IDs.

Anthropic OAuth requests use the same Claude Code identity-spoof path as the agent and pipeline runners. Codex OAuth requests use the OpenAI Codex provider for chat, TUI sessions, tool use, subagents, /btw, team runs, and provider-neutral pipelines when [llm].provider = "openai-codex". API-key users can set ANTHROPIC_API_KEY=sk-ant-api...; proxy users can still point the Anthropic-compatible URL at OpenRouter, DeepSeek, LiteLLM, or another compatible endpoint and use native/API-key mode.

Video Evidence

Video evidence is ingested through archon video and becomes ordinary document chunks, so archon docs search, archon docs answer, and archon kb process consume it without a separate flag.

# Local video with a user transcript
archon video ingest ./lecture.mp4 --transcript ./lecture.vtt --frames none
archon video inspect <video-id># YouTube URL with your own transcript, no media download
archon video ingest "https://www.youtube.com/watch?v=abc123" \
--transcript ./talk.vtt \
--metadata-only
# YouTube URL with governed local download and whisper-cpp ASR
archon video ingest "https://youtu.be/abc123" --frames hybrid --asr whisper-cpp --yes
# Add YouTube evidence to a named KB bucket
archon video ingest "https://youtu.be/abc123" --kb trading-elliott-wave --frames hybrid --asr whisper-cpp --yes
archon kb process --kb trading-elliott-wave --claims --entities --relations
# Frame extraction for charts, diagrams, and slides
archon video ingest ./market-review.mp4 --frames hybrid --vlm --yes
archon video transcript <video-id> --format vtt
archon docs answer "what did the chart show?"

Answers cite video chunks as video@MM:SS when timestamp provenance is present. When policy allows caption capture, Archon tries YouTube captions before ASR; frame OCR can use local RapidOCR/OpenCV fallbacks for chart-heavy videos. See docs/video.md for ASR, OCR/VLM, policy, and compliance details.

Documentation map

The docs are organised by user goal:

SectionFind this here
Getting starteddocs/getting-started/ — install, first run, quick start
Architecturedocs/architecture/ — overview, learning systems, pipelines, Evidence Engine diagrams
Evidence Enginedocs/evidence-engine.md — documents, KB, provenance, game theory, completion integrity, governed learning
Trading Labdocs/trading-lab.md and docs/cookbook/trading-lab.md — governed trading research, strategy specs, Pine prototypes, deterministic backtests, TradingView replay-paper evidence, workflow specs, paper/live gates, and risk/audit controls
Providersdocs/providers/ — provider runtime, Codex app-server, Claude Code spoofing, auth profiles, cloud/local providers
Agents & learningdocs/agents/ and docs/learning/ — governed agent evolution, memory promotion, permission governance
World modeldocs/architecture/world-model.md — local trace corpus, advisory predictions, training backends, retention
Reasoning qualitydocs/architecture/reasoning-quality.md — visible claim/evidence events, correction links, critic policy, proactive briefing
Securitydocs/security/ — tool preflight, sandboxing, Docker, SSH, OpenShell
Referencedocs/reference/ — slash commands, tools, skills, permissions, config schema, CLI flags, env vars
Integrationsdocs/integrations/ — MCP, plugins, hooks, identity spoofing, VLM image descriptions, LSP, IDE extensions
Cookbookdocs/cookbook/ — real-world evidence workflows, YouTube/video evidence, strategic engagement, memory-driven coding, pipeline rewind, god-code pipeline, custom agents
Operationsdocs/operations/ — sessions, web workbench, TUI, cost, compaction, cron, remote control, troubleshooting, data locations
Developmentdocs/development/ — contributing, dev flow gates, adding tools/skills/agents, release process
Engineering practicedocs/defensive-patterns.md — rules for writing checks that cannot lie · docs/postmortem/ — numbered incident writeups · docs/decisions/ — decision records, including the rejected bucket
Release notesdocs/release-notes/ — per-version changelogs

Repository structure

archon-cli/
├── src/ # binary entry point + CLI layer
├── crates/ # 26-crate workspace
│ ├── archon-cli-workspace/ # binary
│ ├── archon-tui/ # ratatui terminal UI
│ ├── archon-core/ # agent loop, tools, skills
│ ├── archon-consciousness/ # rules, personality, persistence
│ ├── archon-session/ # session checkpoints (CozoDB)
│ ├── archon-memory/ # memory graph + embeddings (CozoDB)
│ ├── archon-llm/ # provider clients + identity/spoofing
│ ├── archon-tools/ # 65 registered tools
│ ├── archon-permissions/ # 7 permission modes
│ ├── archon-mcp/ # MCP transport
│ ├── archon-pipeline/ # 50+46 agent pipelines + game theory + learning systems
│ ├── archon-docs/ # document intelligence, OCR, retrieval
│ ├── archon-knowledge/ # claims, entities, contradictions
│ ├── archon-provenance/ # chain hashes, W3C PROV export
│ ├── archon-completion/ # completion integrity and trust
│ ├── archon-learning/ # governed learning events/manifests
│ ├── archon-meaning/ # labels, contrastive pairs, triplets
│ ├── archon-constellation/ # centroids, scoring, drift
│ ├── archon-world-model/ # local trace world model, advisor, counterfactual scoring
│ ├── archon-reasoning-quality/ # visible claim/evidence event store
│ ├── archon-policy/ # policy gates
│ ├── archon-leann/ # semantic code search
│ ├── archon-plugin/ # dynamic plugin loading
│ ├── archon-sdk/ # embedding API + IDE bridge
│ ├── archon-context/ # context compaction
│ ├── archon-observability/ # metrics, tracing
│ └── ...
├── docs/ # user-facing documentation
└── scripts/ # dev flow gates, helpers

Status

Current release: v1.9.3release notes

Plan Mode now has a durable approval lifecycle: explicit user exit controls, safe permission restoration, editable plan documents, plan-linked task materialization, authoritative completion evidence, reconciliation, and a Plan-Mode-specific model override. The trust boundary blocks subagents from entering or exiting Plan Mode and fails closed when evidence or approval authority cannot be verified.

Registered canonical skills now appear in slash autocomplete. Primary commands remain first and keep dispatch precedence; rows are labelled [command] or [skill], aliases are not duplicated, and shadowed skills are omitted with an exact startup warning.

Built on v1.9.0, where a knowledge base stopped being two disjoint things. archon kb kbs and the web Ingest tab list the same union, so a name created on either surface is visible and usable from both — and a name you did not write down is recoverable at all. Corrections only reinforce a rule once something has been shown to have caused them, with the attribution itself running in shadow. The Memory Garden runs under a single-run lock and a work budget, and its irreversible operations became proposals a human approves. Replay weights transitions by latent surprise, which was recorded and never read.

The subagent runtime stopped repeating itself: five whole-array copies per round became two, a transcript opens once instead of once per message, and a ten-way fan-out queries the memory store three times rather than thirty. Typing is multi-line — Shift+Enter inserts a newline where the terminal can express it — and the input area no longer leaves glyphs behind when it grows and shrinks.

Built on v1.8.0, which gave the cognitive metrics a consumer that can say no, and v1.7.0, which wired four subsystems that had been built, tested and never called.

On upgrade: a correction no longer reinforces a rule unless something has been shown to have caused it. Attribution runs in shadow and fails closed, so an unattributable correction is recorded and reinforces nothing — the extractor's deferred semantic pass reinforces nothing at all now, because it records against an action window that has already moved. Scheduled garden consolidation never deletes: staleness and overflow pruning become proposals you approve through /garden proposals, while /garden run by hand behaves as before. The web workbench answers 403 rather than 200 when policy refuses an action, so a caller checking only the status code no longer reads a refusal as success. Enter still submits; Shift+Enter inserts a newline, and Ctrl+L forces a redraw. See the release notes.

From v1.9.3: a write to a file the agent has not read is now refused.Edit, Write and NotebookEdit are checked against what Read, Grep and NotebookRead recorded; Bash is not checked. Set [filesystem].read_before_edit to "warn" or "off" to soften or disable it. voice.hotkey defaults to "ctrl+v", which is the key that has always been bound. Building on Linux needs libasound2-dev now that microphone capture is a default feature. /feedback rates a message rather than submitting a report, replacing a skill that recorded nothing. See the release notes.

From v1.9.2: a structured ExitPlanMode submission now requires approval, while /plan off, /plan exit, and /plan done remain explicit direct exits to default. Only plan-linked task rows persist and rehydrate; unrelated manual tasks remain process-scoped. Skills are discovered when a session starts, so restart Archon after adding or editing a SKILL.md. See the release notes.

From v1.9.1: cost figures move in both directions — cache reads were priced at zero and writes at par, so caching could only ever look like a saving. prompt_cache_conversation = false no longer disables the tools and system checkpoints along with the message one. This turn's volatile system blocks move onto the last user message (prompt_cache_reorder, default on), which changes where the model sees them. RUST_LOG now reaches the session log. See the release notes.

From v1.8.0: project capability manifests no longer hoist tools, a declared artifact must be a regular non-empty file, and events.jsonl gained a blocking_gap_detected kind.

From v1.7.0: the cognitive schema migrates on first open, and history for two cognitive_tick_audit columns is set to null — under the old code those were hardcoded, so every stored value was a fabrication rather than a measurement.

From v1.6.0: the repository code index no longer builds at session start — it cost roughly seventeen CPU-hours on a 3,200-file repository, on sessions that never asked for code context. Restore it with [code_index] index_on_startup = true. And Intel macOS is no longer built: ONNX Runtime stopped publishing x64 macOS binaries and the Rust ort bindings followed, so the embedding runtime cannot be linked there. Apple Silicon covers every Mac still receiving macOS updates.

Every release from v0.1.6 onward is indexed with a one-line summary in the documentation map. This section carries the current release and what changes on upgrade — nothing a reader can look up.

Contributing

See docs/development/contributing.md. Every task passes the 6-gate dev flow (docs/development/dev-flow-gates.md) before merge.

Before writing a gate, a lint, a CI step, or a test involving a subprocess, a platform difference, or a clock, read docs/defensive-patterns.md. Every rule there is traced to a postmortem of a check in this repo that reported green while inspecting nothing.

License

See LICENSE (MIT). Exception: the plugins/ collection is derived from Apache-2.0 sources and remains Apache-2.0 — see its licensing section.

archon-cli can proxy Anthropic Claude and OpenAI Codex-compatible APIs. You must have valid credentials or an active subscription and comply with the relevant provider usage policies.

About

Archon CLI — a local-first Rust agentic command center with provider-flexible AI, TUI/CLI parity, persistent memory, document/evidence intelligence, provenance, self-learning, and multi-agent coding/research/game-theory pipelines.

Resources

Contributing

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Latest commit

History

2,204 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

archon-cli

Archon Avatar

A strategic engineering CLI built in Rust. Self-learning agent platform with persistent memory, multi-agent pipelines, Evidence Engine provenance, document intelligence, governed learning, local world-model advisory learning, reasoning-quality events, Trading Lab data/backtest controls, and identity-aware Anthropic/Codex provider integration.

Documentation has moved. This README is now a landing page. The full structured docs live in docs/ — start there.


Quick start

# Build (rustup installs the pinned toolchain from rust-toolchain.toml)
git clone https://github.com/ste-bah/archon-cli
cd archon-cli
sudo scripts/install-system-deps.sh --check || sudo scripts/install-system-deps.sh
# macOS/Homebrew: run scripts/install-system-deps.sh without sudo.# Optional sandbox deps: sudo scripts/install-system-deps.sh --with-sandbox
cargo build --release --bin archon
ARCHON_BIN="$(pwd)/target/release/archon"# Authenticate with Claude/Anthropic OAuth or API-key billing"$ARCHON_BIN" auth login --provider anthropic
# or: export ANTHROPIC_API_KEY="sk-ant-api..."# Optional: authenticate with a ChatGPT/Codex subscription"$ARCHON_BIN" auth login --provider openai-codex
"$ARCHON_BIN" auth status
# Optional: store a Google Gemini API key for cloud VLM image descriptions"$ARCHON_BIN" auth login --provider google
# Initialise a blank project directory
mkdir -p ~/projects/my-archon-project
sh scripts/archon-init.sh \
--target ~/projects/my-archon-project \
--archon-cli-repo "$(pwd)"# Run interactive TUI from the project rootcd~/projects/my-archon-project
"$ARCHON_BIN"# Non-interactive print mode"$ARCHON_BIN" -p "summarize this project layout" --output-format json
# Browser workbench"$ARCHON_BIN" web --port 8421 --bind-address 127.0.0.1

WSL2 builders: add -j1 to avoid OOM during compilation.

Full installation guide: docs/getting-started/installation.md.

What archon-cli is

claude-code (TS/Bun)archon-cli (Rust)
RuntimeTypeScript / BunRust (pinned via rust-toolchain.toml)
Memorymarkdown filesCozoDB graph + embeddings
Documentsad hoc file readsOCR, image ingest, chunks, embeddings, hybrid retrieval, citations
PipelinesSingle-agent loop50-agent coding + 46-agent research + 84-specialist game theory
ReasoningDirect LLM call12 reasoning modes (deductive, inductive, abductive, analogical, adversarial, counterfactual, temporal, constraint, decomposition, first-principles, causal, contextual)
LearningNone8 subsystems plus local world-model advisory learning and first-class reasoning-quality events
Verificationmodel self-reportcompletion evidence, false-completion incidents, trust scores, provenance traces
IdentityNativeClaude Code spoof, Anthropic OAuth/API keys, or Codex OAuth

archon-cli is not affiliated with Anthropic or OpenAI. It can use an Anthropic API key, Anthropic/Claude OAuth with Claude Code identity spoofing, or OpenAI Codex OAuth where that provider is selected.

Authentication

Archon has two subscription-auth paths plus normal API keys. Gemini VLM uses a Google API key, stored in the same credentials file when you choose the guided login:

# Claude / Anthropic OAuth, stored in ~/.archon/.credentials.json
archon auth login --provider anthropic
# OpenAI Codex OAuth, stored beside the Anthropic token# (Archon also detects an existing official Codex CLI login)
archon auth login --provider openai-codex
# Inspect both without printing secrets
archon auth status
# Google Gemini API key for docs VLM
archon auth login --provider google
# Use Codex explicitly for one-shot chat
archon chat --provider openai-codex "summarize this repository"

To make the full interactive TUI use Codex, set:

[llm]
provider = "openai-codex"
[api]
default_model = "gpt-5.4"# optional; Archon uses this automatically if the old default is Claude-shaped

In Codex TUI sessions, the bottom status bar is initialized from the active Codex model, and /model accepts Codex shortcuts and model IDs such as default, codex, mini, gpt-5.5, gpt-5.4, gpt-5.4-mini, and gpt-5.3-codex. Anthropic sessions continue to validate Claude shortcuts and Claude model IDs.

Anthropic OAuth requests use the same Claude Code identity-spoof path as the agent and pipeline runners. Codex OAuth requests use the OpenAI Codex provider for chat, TUI sessions, tool use, subagents, /btw, team runs, and provider-neutral pipelines when [llm].provider = "openai-codex". API-key users can set ANTHROPIC_API_KEY=sk-ant-api...; proxy users can still point the Anthropic-compatible URL at OpenRouter, DeepSeek, LiteLLM, or another compatible endpoint and use native/API-key mode.

Video Evidence

Video evidence is ingested through archon video and becomes ordinary document chunks, so archon docs search, archon docs answer, and archon kb process consume it without a separate flag.

# Local video with a user transcript
archon video ingest ./lecture.mp4 --transcript ./lecture.vtt --frames none
archon video inspect <video-id># YouTube URL with your own transcript, no media download
archon video ingest "https://www.youtube.com/watch?v=abc123" \
--transcript ./talk.vtt \
--metadata-only
# YouTube URL with governed local download and whisper-cpp ASR
archon video ingest "https://youtu.be/abc123" --frames hybrid --asr whisper-cpp --yes
# Add YouTube evidence to a named KB bucket
archon video ingest "https://youtu.be/abc123" --kb trading-elliott-wave --frames hybrid --asr whisper-cpp --yes
archon kb process --kb trading-elliott-wave --claims --entities --relations
# Frame extraction for charts, diagrams, and slides
archon video ingest ./market-review.mp4 --frames hybrid --vlm --yes
archon video transcript <video-id> --format vtt
archon docs answer "what did the chart show?"

Answers cite video chunks as video@MM:SS when timestamp provenance is present. When policy allows caption capture, Archon tries YouTube captions before ASR; frame OCR can use local RapidOCR/OpenCV fallbacks for chart-heavy videos. See docs/video.md for ASR, OCR/VLM, policy, and compliance details.

Documentation map

The docs are organised by user goal:

SectionFind this here
Getting starteddocs/getting-started/ — install, first run, quick start
Architecturedocs/architecture/ — overview, learning systems, pipelines, Evidence Engine diagrams
Evidence Enginedocs/evidence-engine.md — documents, KB, provenance, game theory, completion integrity, governed learning
Trading Labdocs/trading-lab.md and docs/cookbook/trading-lab.md — governed trading research, strategy specs, Pine prototypes, deterministic backtests, TradingView replay-paper evidence, workflow specs, paper/live gates, and risk/audit controls
Providersdocs/providers/ — provider runtime, Codex app-server, Claude Code spoofing, auth profiles, cloud/local providers
Agents & learningdocs/agents/ and docs/learning/ — governed agent evolution, memory promotion, permission governance
World modeldocs/architecture/world-model.md — local trace corpus, advisory predictions, training backends, retention
Reasoning qualitydocs/architecture/reasoning-quality.md — visible claim/evidence events, correction links, critic policy, proactive briefing
Securitydocs/security/ — tool preflight, sandboxing, Docker, SSH, OpenShell
Referencedocs/reference/ — slash commands, tools, skills, permissions, config schema, CLI flags, env vars
Integrationsdocs/integrations/ — MCP, plugins, hooks, identity spoofing, VLM image descriptions, LSP, IDE extensions
Cookbookdocs/cookbook/ — real-world evidence workflows, YouTube/video evidence, strategic engagement, memory-driven coding, pipeline rewind, god-code pipeline, custom agents
Operationsdocs/operations/ — sessions, web workbench, TUI, cost, compaction, cron, remote control, troubleshooting, data locations
Developmentdocs/development/ — contributing, dev flow gates, adding tools/skills/agents, release process
Engineering practicedocs/defensive-patterns.md — rules for writing checks that cannot lie · docs/postmortem/ — numbered incident writeups · docs/decisions/ — decision records, including the rejected bucket
Release notesdocs/release-notes/ — per-version changelogs

Repository structure

archon-cli/
├── src/ # binary entry point + CLI layer
├── crates/ # 26-crate workspace
│ ├── archon-cli-workspace/ # binary
│ ├── archon-tui/ # ratatui terminal UI
│ ├── archon-core/ # agent loop, tools, skills
│ ├── archon-consciousness/ # rules, personality, persistence
│ ├── archon-session/ # session checkpoints (CozoDB)
│ ├── archon-memory/ # memory graph + embeddings (CozoDB)
│ ├── archon-llm/ # provider clients + identity/spoofing
│ ├── archon-tools/ # 65 registered tools
│ ├── archon-permissions/ # 7 permission modes
│ ├── archon-mcp/ # MCP transport
│ ├── archon-pipeline/ # 50+46 agent pipelines + game theory + learning systems
│ ├── archon-docs/ # document intelligence, OCR, retrieval
│ ├── archon-knowledge/ # claims, entities, contradictions
│ ├── archon-provenance/ # chain hashes, W3C PROV export
│ ├── archon-completion/ # completion integrity and trust
│ ├── archon-learning/ # governed learning events/manifests
│ ├── archon-meaning/ # labels, contrastive pairs, triplets
│ ├── archon-constellation/ # centroids, scoring, drift
│ ├── archon-world-model/ # local trace world model, advisor, counterfactual scoring
│ ├── archon-reasoning-quality/ # visible claim/evidence event store
│ ├── archon-policy/ # policy gates
│ ├── archon-leann/ # semantic code search
│ ├── archon-plugin/ # dynamic plugin loading
│ ├── archon-sdk/ # embedding API + IDE bridge
│ ├── archon-context/ # context compaction
│ ├── archon-observability/ # metrics, tracing
│ └── ...
├── docs/ # user-facing documentation
└── scripts/ # dev flow gates, helpers

Status

Current release: v1.9.3release notes

Plan Mode now has a durable approval lifecycle: explicit user exit controls, safe permission restoration, editable plan documents, plan-linked task materialization, authoritative completion evidence, reconciliation, and a Plan-Mode-specific model override. The trust boundary blocks subagents from entering or exiting Plan Mode and fails closed when evidence or approval authority cannot be verified.

Registered canonical skills now appear in slash autocomplete. Primary commands remain first and keep dispatch precedence; rows are labelled [command] or [skill], aliases are not duplicated, and shadowed skills are omitted with an exact startup warning.

Built on v1.9.0, where a knowledge base stopped being two disjoint things. archon kb kbs and the web Ingest tab list the same union, so a name created on either surface is visible and usable from both — and a name you did not write down is recoverable at all. Corrections only reinforce a rule once something has been shown to have caused them, with the attribution itself running in shadow. The Memory Garden runs under a single-run lock and a work budget, and its irreversible operations became proposals a human approves. Replay weights transitions by latent surprise, which was recorded and never read.

The subagent runtime stopped repeating itself: five whole-array copies per round became two, a transcript opens once instead of once per message, and a ten-way fan-out queries the memory store three times rather than thirty. Typing is multi-line — Shift+Enter inserts a newline where the terminal can express it — and the input area no longer leaves glyphs behind when it grows and shrinks.

Built on v1.8.0, which gave the cognitive metrics a consumer that can say no, and v1.7.0, which wired four subsystems that had been built, tested and never called.

On upgrade: a correction no longer reinforces a rule unless something has been shown to have caused it. Attribution runs in shadow and fails closed, so an unattributable correction is recorded and reinforces nothing — the extractor's deferred semantic pass reinforces nothing at all now, because it records against an action window that has already moved. Scheduled garden consolidation never deletes: staleness and overflow pruning become proposals you approve through /garden proposals, while /garden run by hand behaves as before. The web workbench answers 403 rather than 200 when policy refuses an action, so a caller checking only the status code no longer reads a refusal as success. Enter still submits; Shift+Enter inserts a newline, and Ctrl+L forces a redraw. See the release notes.

From v1.9.3: a write to a file the agent has not read is now refused.Edit, Write and NotebookEdit are checked against what Read, Grep and NotebookRead recorded; Bash is not checked. Set [filesystem].read_before_edit to "warn" or "off" to soften or disable it. voice.hotkey defaults to "ctrl+v", which is the key that has always been bound. Building on Linux needs libasound2-dev now that microphone capture is a default feature. /feedback rates a message rather than submitting a report, replacing a skill that recorded nothing. See the release notes.

From v1.9.2: a structured ExitPlanMode submission now requires approval, while /plan off, /plan exit, and /plan done remain explicit direct exits to default. Only plan-linked task rows persist and rehydrate; unrelated manual tasks remain process-scoped. Skills are discovered when a session starts, so restart Archon after adding or editing a SKILL.md. See the release notes.

From v1.9.1: cost figures move in both directions — cache reads were priced at zero and writes at par, so caching could only ever look like a saving. prompt_cache_conversation = false no longer disables the tools and system checkpoints along with the message one. This turn's volatile system blocks move onto the last user message (prompt_cache_reorder, default on), which changes where the model sees them. RUST_LOG now reaches the session log. See the release notes.

From v1.8.0: project capability manifests no longer hoist tools, a declared artifact must be a regular non-empty file, and events.jsonl gained a blocking_gap_detected kind.

From v1.7.0: the cognitive schema migrates on first open, and history for two cognitive_tick_audit columns is set to null — under the old code those were hardcoded, so every stored value was a fabrication rather than a measurement.

From v1.6.0: the repository code index no longer builds at session start — it cost roughly seventeen CPU-hours on a 3,200-file repository, on sessions that never asked for code context. Restore it with [code_index] index_on_startup = true. And Intel macOS is no longer built: ONNX Runtime stopped publishing x64 macOS binaries and the Rust ort bindings followed, so the embedding runtime cannot be linked there. Apple Silicon covers every Mac still receiving macOS updates.

Every release from v0.1.6 onward is indexed with a one-line summary in the documentation map. This section carries the current release and what changes on upgrade — nothing a reader can look up.

Contributing

See docs/development/contributing.md. Every task passes the 6-gate dev flow (docs/development/dev-flow-gates.md) before merge.

Before writing a gate, a lint, a CI step, or a test involving a subprocess, a platform difference, or a clock, read docs/defensive-patterns.md. Every rule there is traced to a postmortem of a check in this repo that reported green while inspecting nothing.

License

See LICENSE (MIT). Exception: the plugins/ collection is derived from Apache-2.0 sources and remains Apache-2.0 — see its licensing section.

archon-cli can proxy Anthropic Claude and OpenAI Codex-compatible APIs. You must have valid credentials or an active subscription and comply with the relevant provider usage policies.

About

Archon CLI — a local-first Rust agentic command center with provider-flexible AI, TUI/CLI parity, persistent memory, document/evidence intelligence, provenance, self-learning, and multi-agent coding/research/game-theory pipelines.

Resources

Contributing

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

2,204 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

archon-cli

Archon Avatar

A strategic engineering CLI built in Rust. Self-learning agent platform with persistent memory, multi-agent pipelines, Evidence Engine provenance, document intelligence, governed learning, local world-model advisory learning, reasoning-quality events, Trading Lab data/backtest controls, and identity-aware Anthropic/Codex provider integration.

Documentation has moved. This README is now a landing page. The full structured docs live in docs/ — start there.


Quick start

# Build (rustup installs the pinned toolchain from rust-toolchain.toml)
git clone https://github.com/ste-bah/archon-cli
cd archon-cli
sudo scripts/install-system-deps.sh --check || sudo scripts/install-system-deps.sh
# macOS/Homebrew: run scripts/install-system-deps.sh without sudo.# Optional sandbox deps: sudo scripts/install-system-deps.sh --with-sandbox
cargo build --release --bin archon
ARCHON_BIN="$(pwd)/target/release/archon"# Authenticate with Claude/Anthropic OAuth or API-key billing"$ARCHON_BIN" auth login --provider anthropic
# or: export ANTHROPIC_API_KEY="sk-ant-api..."# Optional: authenticate with a ChatGPT/Codex subscription"$ARCHON_BIN" auth login --provider openai-codex
"$ARCHON_BIN" auth status
# Optional: store a Google Gemini API key for cloud VLM image descriptions"$ARCHON_BIN" auth login --provider google
# Initialise a blank project directory
mkdir -p ~/projects/my-archon-project
sh scripts/archon-init.sh \
--target ~/projects/my-archon-project \
--archon-cli-repo "$(pwd)"# Run interactive TUI from the project rootcd~/projects/my-archon-project
"$ARCHON_BIN"# Non-interactive print mode"$ARCHON_BIN" -p "summarize this project layout" --output-format json
# Browser workbench"$ARCHON_BIN" web --port 8421 --bind-address 127.0.0.1

WSL2 builders: add -j1 to avoid OOM during compilation.

Full installation guide: docs/getting-started/installation.md.

What archon-cli is

claude-code (TS/Bun)archon-cli (Rust)
RuntimeTypeScript / BunRust (pinned via rust-toolchain.toml)
Memorymarkdown filesCozoDB graph + embeddings
Documentsad hoc file readsOCR, image ingest, chunks, embeddings, hybrid retrieval, citations
PipelinesSingle-agent loop50-agent coding + 46-agent research + 84-specialist game theory
ReasoningDirect LLM call12 reasoning modes (deductive, inductive, abductive, analogical, adversarial, counterfactual, temporal, constraint, decomposition, first-principles, causal, contextual)
LearningNone8 subsystems plus local world-model advisory learning and first-class reasoning-quality events
Verificationmodel self-reportcompletion evidence, false-completion incidents, trust scores, provenance traces
IdentityNativeClaude Code spoof, Anthropic OAuth/API keys, or Codex OAuth

archon-cli is not affiliated with Anthropic or OpenAI. It can use an Anthropic API key, Anthropic/Claude OAuth with Claude Code identity spoofing, or OpenAI Codex OAuth where that provider is selected.

Authentication

Archon has two subscription-auth paths plus normal API keys. Gemini VLM uses a Google API key, stored in the same credentials file when you choose the guided login:

# Claude / Anthropic OAuth, stored in ~/.archon/.credentials.json
archon auth login --provider anthropic
# OpenAI Codex OAuth, stored beside the Anthropic token# (Archon also detects an existing official Codex CLI login)
archon auth login --provider openai-codex
# Inspect both without printing secrets
archon auth status
# Google Gemini API key for docs VLM
archon auth login --provider google
# Use Codex explicitly for one-shot chat
archon chat --provider openai-codex "summarize this repository"

To make the full interactive TUI use Codex, set:

[llm]
provider = "openai-codex"
[api]
default_model = "gpt-5.4"# optional; Archon uses this automatically if the old default is Claude-shaped

In Codex TUI sessions, the bottom status bar is initialized from the active Codex model, and /model accepts Codex shortcuts and model IDs such as default, codex, mini, gpt-5.5, gpt-5.4, gpt-5.4-mini, and gpt-5.3-codex. Anthropic sessions continue to validate Claude shortcuts and Claude model IDs.

Anthropic OAuth requests use the same Claude Code identity-spoof path as the agent and pipeline runners. Codex OAuth requests use the OpenAI Codex provider for chat, TUI sessions, tool use, subagents, /btw, team runs, and provider-neutral pipelines when [llm].provider = "openai-codex". API-key users can set ANTHROPIC_API_KEY=sk-ant-api...; proxy users can still point the Anthropic-compatible URL at OpenRouter, DeepSeek, LiteLLM, or another compatible endpoint and use native/API-key mode.

Video Evidence

Video evidence is ingested through archon video and becomes ordinary document chunks, so archon docs search, archon docs answer, and archon kb process consume it without a separate flag.

# Local video with a user transcript
archon video ingest ./lecture.mp4 --transcript ./lecture.vtt --frames none
archon video inspect <video-id># YouTube URL with your own transcript, no media download
archon video ingest "https://www.youtube.com/watch?v=abc123" \
--transcript ./talk.vtt \
--metadata-only
# YouTube URL with governed local download and whisper-cpp ASR
archon video ingest "https://youtu.be/abc123" --frames hybrid --asr whisper-cpp --yes
# Add YouTube evidence to a named KB bucket
archon video ingest "https://youtu.be/abc123" --kb trading-elliott-wave --frames hybrid --asr whisper-cpp --yes
archon kb process --kb trading-elliott-wave --claims --entities --relations
# Frame extraction for charts, diagrams, and slides
archon video ingest ./market-review.mp4 --frames hybrid --vlm --yes
archon video transcript <video-id> --format vtt
archon docs answer "what did the chart show?"

Answers cite video chunks as video@MM:SS when timestamp provenance is present. When policy allows caption capture, Archon tries YouTube captions before ASR; frame OCR can use local RapidOCR/OpenCV fallbacks for chart-heavy videos. See docs/video.md for ASR, OCR/VLM, policy, and compliance details.

Documentation map

The docs are organised by user goal:

SectionFind this here
Getting starteddocs/getting-started/ — install, first run, quick start
Architecturedocs/architecture/ — overview, learning systems, pipelines, Evidence Engine diagrams
Evidence Enginedocs/evidence-engine.md — documents, KB, provenance, game theory, completion integrity, governed learning
Trading Labdocs/trading-lab.md and docs/cookbook/trading-lab.md — governed trading research, strategy specs, Pine prototypes, deterministic backtests, TradingView replay-paper evidence, workflow specs, paper/live gates, and risk/audit controls
Providersdocs/providers/ — provider runtime, Codex app-server, Claude Code spoofing, auth profiles, cloud/local providers
Agents & learningdocs/agents/ and docs/learning/ — governed agent evolution, memory promotion, permission governance
World modeldocs/architecture/world-model.md — local trace corpus, advisory predictions, training backends, retention
Reasoning qualitydocs/architecture/reasoning-quality.md — visible claim/evidence events, correction links, critic policy, proactive briefing
Securitydocs/security/ — tool preflight, sandboxing, Docker, SSH, OpenShell
Referencedocs/reference/ — slash commands, tools, skills, permissions, config schema, CLI flags, env vars
Integrationsdocs/integrations/ — MCP, plugins, hooks, identity spoofing, VLM image descriptions, LSP, IDE extensions
Cookbookdocs/cookbook/ — real-world evidence workflows, YouTube/video evidence, strategic engagement, memory-driven coding, pipeline rewind, god-code pipeline, custom agents
Operationsdocs/operations/ — sessions, web workbench, TUI, cost, compaction, cron, remote control, troubleshooting, data locations
Developmentdocs/development/ — contributing, dev flow gates, adding tools/skills/agents, release process
Engineering practicedocs/defensive-patterns.md — rules for writing checks that cannot lie · docs/postmortem/ — numbered incident writeups · docs/decisions/ — decision records, including the rejected bucket
Release notesdocs/release-notes/ — per-version changelogs

Repository structure

archon-cli/
├── src/ # binary entry point + CLI layer
├── crates/ # 26-crate workspace
│ ├── archon-cli-workspace/ # binary
│ ├── archon-tui/ # ratatui terminal UI
│ ├── archon-core/ # agent loop, tools, skills
│ ├── archon-consciousness/ # rules, personality, persistence
│ ├── archon-session/ # session checkpoints (CozoDB)
│ ├── archon-memory/ # memory graph + embeddings (CozoDB)
│ ├── archon-llm/ # provider clients + identity/spoofing
│ ├── archon-tools/ # 65 registered tools
│ ├── archon-permissions/ # 7 permission modes
│ ├── archon-mcp/ # MCP transport
│ ├── archon-pipeline/ # 50+46 agent pipelines + game theory + learning systems
│ ├── archon-docs/ # document intelligence, OCR, retrieval
│ ├── archon-knowledge/ # claims, entities, contradictions
│ ├── archon-provenance/ # chain hashes, W3C PROV export
│ ├── archon-completion/ # completion integrity and trust
│ ├── archon-learning/ # governed learning events/manifests
│ ├── archon-meaning/ # labels, contrastive pairs, triplets
│ ├── archon-constellation/ # centroids, scoring, drift
│ ├── archon-world-model/ # local trace world model, advisor, counterfactual scoring
│ ├── archon-reasoning-quality/ # visible claim/evidence event store
│ ├── archon-policy/ # policy gates
│ ├── archon-leann/ # semantic code search
│ ├── archon-plugin/ # dynamic plugin loading
│ ├── archon-sdk/ # embedding API + IDE bridge
│ ├── archon-context/ # context compaction
│ ├── archon-observability/ # metrics, tracing
│ └── ...
├── docs/ # user-facing documentation
└── scripts/ # dev flow gates, helpers

Status

Current release: v1.9.3release notes

Plan Mode now has a durable approval lifecycle: explicit user exit controls, safe permission restoration, editable plan documents, plan-linked task materialization, authoritative completion evidence, reconciliation, and a Plan-Mode-specific model override. The trust boundary blocks subagents from entering or exiting Plan Mode and fails closed when evidence or approval authority cannot be verified.

Registered canonical skills now appear in slash autocomplete. Primary commands remain first and keep dispatch precedence; rows are labelled [command] or [skill], aliases are not duplicated, and shadowed skills are omitted with an exact startup warning.

Built on v1.9.0, where a knowledge base stopped being two disjoint things. archon kb kbs and the web Ingest tab list the same union, so a name created on either surface is visible and usable from both — and a name you did not write down is recoverable at all. Corrections only reinforce a rule once something has been shown to have caused them, with the attribution itself running in shadow. The Memory Garden runs under a single-run lock and a work budget, and its irreversible operations became proposals a human approves. Replay weights transitions by latent surprise, which was recorded and never read.

The subagent runtime stopped repeating itself: five whole-array copies per round became two, a transcript opens once instead of once per message, and a ten-way fan-out queries the memory store three times rather than thirty. Typing is multi-line — Shift+Enter inserts a newline where the terminal can express it — and the input area no longer leaves glyphs behind when it grows and shrinks.

Built on v1.8.0, which gave the cognitive metrics a consumer that can say no, and v1.7.0, which wired four subsystems that had been built, tested and never called.

On upgrade: a correction no longer reinforces a rule unless something has been shown to have caused it. Attribution runs in shadow and fails closed, so an unattributable correction is recorded and reinforces nothing — the extractor's deferred semantic pass reinforces nothing at all now, because it records against an action window that has already moved. Scheduled garden consolidation never deletes: staleness and overflow pruning become proposals you approve through /garden proposals, while /garden run by hand behaves as before. The web workbench answers 403 rather than 200 when policy refuses an action, so a caller checking only the status code no longer reads a refusal as success. Enter still submits; Shift+Enter inserts a newline, and Ctrl+L forces a redraw. See the release notes.

From v1.9.3: a write to a file the agent has not read is now refused.Edit, Write and NotebookEdit are checked against what Read, Grep and NotebookRead recorded; Bash is not checked. Set [filesystem].read_before_edit to "warn" or "off" to soften or disable it. voice.hotkey defaults to "ctrl+v", which is the key that has always been bound. Building on Linux needs libasound2-dev now that microphone capture is a default feature. /feedback rates a message rather than submitting a report, replacing a skill that recorded nothing. See the release notes.

From v1.9.2: a structured ExitPlanMode submission now requires approval, while /plan off, /plan exit, and /plan done remain explicit direct exits to default. Only plan-linked task rows persist and rehydrate; unrelated manual tasks remain process-scoped. Skills are discovered when a session starts, so restart Archon after adding or editing a SKILL.md. See the release notes.

From v1.9.1: cost figures move in both directions — cache reads were priced at zero and writes at par, so caching could only ever look like a saving. prompt_cache_conversation = false no longer disables the tools and system checkpoints along with the message one. This turn's volatile system blocks move onto the last user message (prompt_cache_reorder, default on), which changes where the model sees them. RUST_LOG now reaches the session log. See the release notes.

From v1.8.0: project capability manifests no longer hoist tools, a declared artifact must be a regular non-empty file, and events.jsonl gained a blocking_gap_detected kind.

From v1.7.0: the cognitive schema migrates on first open, and history for two cognitive_tick_audit columns is set to null — under the old code those were hardcoded, so every stored value was a fabrication rather than a measurement.

From v1.6.0: the repository code index no longer builds at session start — it cost roughly seventeen CPU-hours on a 3,200-file repository, on sessions that never asked for code context. Restore it with [code_index] index_on_startup = true. And Intel macOS is no longer built: ONNX Runtime stopped publishing x64 macOS binaries and the Rust ort bindings followed, so the embedding runtime cannot be linked there. Apple Silicon covers every Mac still receiving macOS updates.

Every release from v0.1.6 onward is indexed with a one-line summary in the documentation map. This section carries the current release and what changes on upgrade — nothing a reader can look up.

Contributing

See docs/development/contributing.md. Every task passes the 6-gate dev flow (docs/development/dev-flow-gates.md) before merge.

Before writing a gate, a lint, a CI step, or a test involving a subprocess, a platform difference, or a clock, read docs/defensive-patterns.md. Every rule there is traced to a postmortem of a check in this repo that reported green while inspecting nothing.

License

See LICENSE (MIT). Exception: the plugins/ collection is derived from Apache-2.0 sources and remains Apache-2.0 — see its licensing section.

archon-cli can proxy Anthropic Claude and OpenAI Codex-compatible APIs. You must have valid credentials or an active subscription and comply with the relevant provider usage policies.

About

Archon CLI — a local-first Rust agentic command center with provider-flexible AI, TUI/CLI parity, persistent memory, document/evidence intelligence, provenance, self-learning, and multi-agent coding/research/game-theory pipelines.

Resources

Contributing

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

2,204 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

archon-cli

Archon Avatar

A strategic engineering CLI built in Rust. Self-learning agent platform with persistent memory, multi-agent pipelines, Evidence Engine provenance, document intelligence, governed learning, local world-model advisory learning, reasoning-quality events, Trading Lab data/backtest controls, and identity-aware Anthropic/Codex provider integration.

Documentation has moved. This README is now a landing page. The full structured docs live in docs/ — start there.


Quick start

# Build (rustup installs the pinned toolchain from rust-toolchain.toml)
git clone https://github.com/ste-bah/archon-cli
cd archon-cli
sudo scripts/install-system-deps.sh --check || sudo scripts/install-system-deps.sh
# macOS/Homebrew: run scripts/install-system-deps.sh without sudo.# Optional sandbox deps: sudo scripts/install-system-deps.sh --with-sandbox
cargo build --release --bin archon
ARCHON_BIN="$(pwd)/target/release/archon"# Authenticate with Claude/Anthropic OAuth or API-key billing"$ARCHON_BIN" auth login --provider anthropic
# or: export ANTHROPIC_API_KEY="sk-ant-api..."# Optional: authenticate with a ChatGPT/Codex subscription"$ARCHON_BIN" auth login --provider openai-codex
"$ARCHON_BIN" auth status
# Optional: store a Google Gemini API key for cloud VLM image descriptions"$ARCHON_BIN" auth login --provider google
# Initialise a blank project directory
mkdir -p ~/projects/my-archon-project
sh scripts/archon-init.sh \
--target ~/projects/my-archon-project \
--archon-cli-repo "$(pwd)"# Run interactive TUI from the project rootcd~/projects/my-archon-project
"$ARCHON_BIN"# Non-interactive print mode"$ARCHON_BIN" -p "summarize this project layout" --output-format json
# Browser workbench"$ARCHON_BIN" web --port 8421 --bind-address 127.0.0.1

WSL2 builders: add -j1 to avoid OOM during compilation.

Full installation guide: docs/getting-started/installation.md.

What archon-cli is

claude-code (TS/Bun)archon-cli (Rust)
RuntimeTypeScript / BunRust (pinned via rust-toolchain.toml)
Memorymarkdown filesCozoDB graph + embeddings
Documentsad hoc file readsOCR, image ingest, chunks, embeddings, hybrid retrieval, citations
PipelinesSingle-agent loop50-agent coding + 46-agent research + 84-specialist game theory
ReasoningDirect LLM call12 reasoning modes (deductive, inductive, abductive, analogical, adversarial, counterfactual, temporal, constraint, decomposition, first-principles, causal, contextual)
LearningNone8 subsystems plus local world-model advisory learning and first-class reasoning-quality events
Verificationmodel self-reportcompletion evidence, false-completion incidents, trust scores, provenance traces
IdentityNativeClaude Code spoof, Anthropic OAuth/API keys, or Codex OAuth

archon-cli is not affiliated with Anthropic or OpenAI. It can use an Anthropic API key, Anthropic/Claude OAuth with Claude Code identity spoofing, or OpenAI Codex OAuth where that provider is selected.

Authentication

Archon has two subscription-auth paths plus normal API keys. Gemini VLM uses a Google API key, stored in the same credentials file when you choose the guided login:

# Claude / Anthropic OAuth, stored in ~/.archon/.credentials.json
archon auth login --provider anthropic
# OpenAI Codex OAuth, stored beside the Anthropic token# (Archon also detects an existing official Codex CLI login)
archon auth login --provider openai-codex
# Inspect both without printing secrets
archon auth status
# Google Gemini API key for docs VLM
archon auth login --provider google
# Use Codex explicitly for one-shot chat
archon chat --provider openai-codex "summarize this repository"

To make the full interactive TUI use Codex, set:

[llm]
provider = "openai-codex"
[api]
default_model = "gpt-5.4"# optional; Archon uses this automatically if the old default is Claude-shaped

In Codex TUI sessions, the bottom status bar is initialized from the active Codex model, and /model accepts Codex shortcuts and model IDs such as default, codex, mini, gpt-5.5, gpt-5.4, gpt-5.4-mini, and gpt-5.3-codex. Anthropic sessions continue to validate Claude shortcuts and Claude model IDs.

Anthropic OAuth requests use the same Claude Code identity-spoof path as the agent and pipeline runners. Codex OAuth requests use the OpenAI Codex provider for chat, TUI sessions, tool use, subagents, /btw, team runs, and provider-neutral pipelines when [llm].provider = "openai-codex". API-key users can set ANTHROPIC_API_KEY=sk-ant-api...; proxy users can still point the Anthropic-compatible URL at OpenRouter, DeepSeek, LiteLLM, or another compatible endpoint and use native/API-key mode.

Video Evidence

Video evidence is ingested through archon video and becomes ordinary document chunks, so archon docs search, archon docs answer, and archon kb process consume it without a separate flag.

# Local video with a user transcript
archon video ingest ./lecture.mp4 --transcript ./lecture.vtt --frames none
archon video inspect <video-id># YouTube URL with your own transcript, no media download
archon video ingest "https://www.youtube.com/watch?v=abc123" \
--transcript ./talk.vtt \
--metadata-only
# YouTube URL with governed local download and whisper-cpp ASR
archon video ingest "https://youtu.be/abc123" --frames hybrid --asr whisper-cpp --yes
# Add YouTube evidence to a named KB bucket
archon video ingest "https://youtu.be/abc123" --kb trading-elliott-wave --frames hybrid --asr whisper-cpp --yes
archon kb process --kb trading-elliott-wave --claims --entities --relations
# Frame extraction for charts, diagrams, and slides
archon video ingest ./market-review.mp4 --frames hybrid --vlm --yes
archon video transcript <video-id> --format vtt
archon docs answer "what did the chart show?"

Answers cite video chunks as video@MM:SS when timestamp provenance is present. When policy allows caption capture, Archon tries YouTube captions before ASR; frame OCR can use local RapidOCR/OpenCV fallbacks for chart-heavy videos. See docs/video.md for ASR, OCR/VLM, policy, and compliance details.

Documentation map

The docs are organised by user goal:

SectionFind this here
Getting starteddocs/getting-started/ — install, first run, quick start
Architecturedocs/architecture/ — overview, learning systems, pipelines, Evidence Engine diagrams
Evidence Enginedocs/evidence-engine.md — documents, KB, provenance, game theory, completion integrity, governed learning
Trading Labdocs/trading-lab.md and docs/cookbook/trading-lab.md — governed trading research, strategy specs, Pine prototypes, deterministic backtests, TradingView replay-paper evidence, workflow specs, paper/live gates, and risk/audit controls
Providersdocs/providers/ — provider runtime, Codex app-server, Claude Code spoofing, auth profiles, cloud/local providers
Agents & learningdocs/agents/ and docs/learning/ — governed agent evolution, memory promotion, permission governance
World modeldocs/architecture/world-model.md — local trace corpus, advisory predictions, training backends, retention
Reasoning qualitydocs/architecture/reasoning-quality.md — visible claim/evidence events, correction links, critic policy, proactive briefing
Securitydocs/security/ — tool preflight, sandboxing, Docker, SSH, OpenShell
Referencedocs/reference/ — slash commands, tools, skills, permissions, config schema, CLI flags, env vars
Integrationsdocs/integrations/ — MCP, plugins, hooks, identity spoofing, VLM image descriptions, LSP, IDE extensions
Cookbookdocs/cookbook/ — real-world evidence workflows, YouTube/video evidence, strategic engagement, memory-driven coding, pipeline rewind, god-code pipeline, custom agents
Operationsdocs/operations/ — sessions, web workbench, TUI, cost, compaction, cron, remote control, troubleshooting, data locations
Developmentdocs/development/ — contributing, dev flow gates, adding tools/skills/agents, release process
Engineering practicedocs/defensive-patterns.md — rules for writing checks that cannot lie · docs/postmortem/ — numbered incident writeups · docs/decisions/ — decision records, including the rejected bucket
Release notesdocs/release-notes/ — per-version changelogs

Repository structure

archon-cli/
├── src/ # binary entry point + CLI layer
├── crates/ # 26-crate workspace
│ ├── archon-cli-workspace/ # binary
│ ├── archon-tui/ # ratatui terminal UI
│ ├── archon-core/ # agent loop, tools, skills
│ ├── archon-consciousness/ # rules, personality, persistence
│ ├── archon-session/ # session checkpoints (CozoDB)
│ ├── archon-memory/ # memory graph + embeddings (CozoDB)
│ ├── archon-llm/ # provider clients + identity/spoofing
│ ├── archon-tools/ # 65 registered tools
│ ├── archon-permissions/ # 7 permission modes
│ ├── archon-mcp/ # MCP transport
│ ├── archon-pipeline/ # 50+46 agent pipelines + game theory + learning systems
│ ├── archon-docs/ # document intelligence, OCR, retrieval
│ ├── archon-knowledge/ # claims, entities, contradictions
│ ├── archon-provenance/ # chain hashes, W3C PROV export
│ ├── archon-completion/ # completion integrity and trust
│ ├── archon-learning/ # governed learning events/manifests
│ ├── archon-meaning/ # labels, contrastive pairs, triplets
│ ├── archon-constellation/ # centroids, scoring, drift
│ ├── archon-world-model/ # local trace world model, advisor, counterfactual scoring
│ ├── archon-reasoning-quality/ # visible claim/evidence event store
│ ├── archon-policy/ # policy gates
│ ├── archon-leann/ # semantic code search
│ ├── archon-plugin/ # dynamic plugin loading
│ ├── archon-sdk/ # embedding API + IDE bridge
│ ├── archon-context/ # context compaction
│ ├── archon-observability/ # metrics, tracing
│ └── ...
├── docs/ # user-facing documentation
└── scripts/ # dev flow gates, helpers

Status

Current release: v1.9.3release notes

Plan Mode now has a durable approval lifecycle: explicit user exit controls, safe permission restoration, editable plan documents, plan-linked task materialization, authoritative completion evidence, reconciliation, and a Plan-Mode-specific model override. The trust boundary blocks subagents from entering or exiting Plan Mode and fails closed when evidence or approval authority cannot be verified.

Registered canonical skills now appear in slash autocomplete. Primary commands remain first and keep dispatch precedence; rows are labelled [command] or [skill], aliases are not duplicated, and shadowed skills are omitted with an exact startup warning.

Built on v1.9.0, where a knowledge base stopped being two disjoint things. archon kb kbs and the web Ingest tab list the same union, so a name created on either surface is visible and usable from both — and a name you did not write down is recoverable at all. Corrections only reinforce a rule once something has been shown to have caused them, with the attribution itself running in shadow. The Memory Garden runs under a single-run lock and a work budget, and its irreversible operations became proposals a human approves. Replay weights transitions by latent surprise, which was recorded and never read.

The subagent runtime stopped repeating itself: five whole-array copies per round became two, a transcript opens once instead of once per message, and a ten-way fan-out queries the memory store three times rather than thirty. Typing is multi-line — Shift+Enter inserts a newline where the terminal can express it — and the input area no longer leaves glyphs behind when it grows and shrinks.

Built on v1.8.0, which gave the cognitive metrics a consumer that can say no, and v1.7.0, which wired four subsystems that had been built, tested and never called.

On upgrade: a correction no longer reinforces a rule unless something has been shown to have caused it. Attribution runs in shadow and fails closed, so an unattributable correction is recorded and reinforces nothing — the extractor's deferred semantic pass reinforces nothing at all now, because it records against an action window that has already moved. Scheduled garden consolidation never deletes: staleness and overflow pruning become proposals you approve through /garden proposals, while /garden run by hand behaves as before. The web workbench answers 403 rather than 200 when policy refuses an action, so a caller checking only the status code no longer reads a refusal as success. Enter still submits; Shift+Enter inserts a newline, and Ctrl+L forces a redraw. See the release notes.

From v1.9.3: a write to a file the agent has not read is now refused.Edit, Write and NotebookEdit are checked against what Read, Grep and NotebookRead recorded; Bash is not checked. Set [filesystem].read_before_edit to "warn" or "off" to soften or disable it. voice.hotkey defaults to "ctrl+v", which is the key that has always been bound. Building on Linux needs libasound2-dev now that microphone capture is a default feature. /feedback rates a message rather than submitting a report, replacing a skill that recorded nothing. See the release notes.

From v1.9.2: a structured ExitPlanMode submission now requires approval, while /plan off, /plan exit, and /plan done remain explicit direct exits to default. Only plan-linked task rows persist and rehydrate; unrelated manual tasks remain process-scoped. Skills are discovered when a session starts, so restart Archon after adding or editing a SKILL.md. See the release notes.

From v1.9.1: cost figures move in both directions — cache reads were priced at zero and writes at par, so caching could only ever look like a saving. prompt_cache_conversation = false no longer disables the tools and system checkpoints along with the message one. This turn's volatile system blocks move onto the last user message (prompt_cache_reorder, default on), which changes where the model sees them. RUST_LOG now reaches the session log. See the release notes.

From v1.8.0: project capability manifests no longer hoist tools, a declared artifact must be a regular non-empty file, and events.jsonl gained a blocking_gap_detected kind.

From v1.7.0: the cognitive schema migrates on first open, and history for two cognitive_tick_audit columns is set to null — under the old code those were hardcoded, so every stored value was a fabrication rather than a measurement.

From v1.6.0: the repository code index no longer builds at session start — it cost roughly seventeen CPU-hours on a 3,200-file repository, on sessions that never asked for code context. Restore it with [code_index] index_on_startup = true. And Intel macOS is no longer built: ONNX Runtime stopped publishing x64 macOS binaries and the Rust ort bindings followed, so the embedding runtime cannot be linked there. Apple Silicon covers every Mac still receiving macOS updates.

Every release from v0.1.6 onward is indexed with a one-line summary in the documentation map. This section carries the current release and what changes on upgrade — nothing a reader can look up.

Contributing

See docs/development/contributing.md. Every task passes the 6-gate dev flow (docs/development/dev-flow-gates.md) before merge.

Before writing a gate, a lint, a CI step, or a test involving a subprocess, a platform difference, or a clock, read docs/defensive-patterns.md. Every rule there is traced to a postmortem of a check in this repo that reported green while inspecting nothing.

License

See LICENSE (MIT). Exception: the plugins/ collection is derived from Apache-2.0 sources and remains Apache-2.0 — see its licensing section.

archon-cli can proxy Anthropic Claude and OpenAI Codex-compatible APIs. You must have valid credentials or an active subscription and comply with the relevant provider usage policies.

About

Archon CLI — a local-first Rust agentic command center with provider-flexible AI, TUI/CLI parity, persistent memory, document/evidence intelligence, provenance, self-learning, and multi-agent coding/research/game-theory pipelines.

Resources

Contributing

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Latest commit

History

2,204 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

archon-cli

Archon Avatar

A strategic engineering CLI built in Rust. Self-learning agent platform with persistent memory, multi-agent pipelines, Evidence Engine provenance, document intelligence, governed learning, local world-model advisory learning, reasoning-quality events, Trading Lab data/backtest controls, and identity-aware Anthropic/Codex provider integration.

Documentation has moved. This README is now a landing page. The full structured docs live in docs/ — start there.


Quick start

# Build (rustup installs the pinned toolchain from rust-toolchain.toml)
git clone https://github.com/ste-bah/archon-cli
cd archon-cli
sudo scripts/install-system-deps.sh --check || sudo scripts/install-system-deps.sh
# macOS/Homebrew: run scripts/install-system-deps.sh without sudo.# Optional sandbox deps: sudo scripts/install-system-deps.sh --with-sandbox
cargo build --release --bin archon
ARCHON_BIN="$(pwd)/target/release/archon"# Authenticate with Claude/Anthropic OAuth or API-key billing"$ARCHON_BIN" auth login --provider anthropic
# or: export ANTHROPIC_API_KEY="sk-ant-api..."# Optional: authenticate with a ChatGPT/Codex subscription"$ARCHON_BIN" auth login --provider openai-codex
"$ARCHON_BIN" auth status
# Optional: store a Google Gemini API key for cloud VLM image descriptions"$ARCHON_BIN" auth login --provider google
# Initialise a blank project directory
mkdir -p ~/projects/my-archon-project
sh scripts/archon-init.sh \
--target ~/projects/my-archon-project \
--archon-cli-repo "$(pwd)"# Run interactive TUI from the project rootcd~/projects/my-archon-project
"$ARCHON_BIN"# Non-interactive print mode"$ARCHON_BIN" -p "summarize this project layout" --output-format json
# Browser workbench"$ARCHON_BIN" web --port 8421 --bind-address 127.0.0.1

WSL2 builders: add -j1 to avoid OOM during compilation.

Full installation guide: docs/getting-started/installation.md.

What archon-cli is

claude-code (TS/Bun)archon-cli (Rust)
RuntimeTypeScript / BunRust (pinned via rust-toolchain.toml)
Memorymarkdown filesCozoDB graph + embeddings
Documentsad hoc file readsOCR, image ingest, chunks, embeddings, hybrid retrieval, citations
PipelinesSingle-agent loop50-agent coding + 46-agent research + 84-specialist game theory
ReasoningDirect LLM call12 reasoning modes (deductive, inductive, abductive, analogical, adversarial, counterfactual, temporal, constraint, decomposition, first-principles, causal, contextual)
LearningNone8 subsystems plus local world-model advisory learning and first-class reasoning-quality events
Verificationmodel self-reportcompletion evidence, false-completion incidents, trust scores, provenance traces
IdentityNativeClaude Code spoof, Anthropic OAuth/API keys, or Codex OAuth

archon-cli is not affiliated with Anthropic or OpenAI. It can use an Anthropic API key, Anthropic/Claude OAuth with Claude Code identity spoofing, or OpenAI Codex OAuth where that provider is selected.

Authentication

Archon has two subscription-auth paths plus normal API keys. Gemini VLM uses a Google API key, stored in the same credentials file when you choose the guided login:

# Claude / Anthropic OAuth, stored in ~/.archon/.credentials.json
archon auth login --provider anthropic
# OpenAI Codex OAuth, stored beside the Anthropic token# (Archon also detects an existing official Codex CLI login)
archon auth login --provider openai-codex
# Inspect both without printing secrets
archon auth status
# Google Gemini API key for docs VLM
archon auth login --provider google
# Use Codex explicitly for one-shot chat
archon chat --provider openai-codex "summarize this repository"

To make the full interactive TUI use Codex, set:

[llm]
provider = "openai-codex"
[api]
default_model = "gpt-5.4"# optional; Archon uses this automatically if the old default is Claude-shaped

In Codex TUI sessions, the bottom status bar is initialized from the active Codex model, and /model accepts Codex shortcuts and model IDs such as default, codex, mini, gpt-5.5, gpt-5.4, gpt-5.4-mini, and gpt-5.3-codex. Anthropic sessions continue to validate Claude shortcuts and Claude model IDs.

Anthropic OAuth requests use the same Claude Code identity-spoof path as the agent and pipeline runners. Codex OAuth requests use the OpenAI Codex provider for chat, TUI sessions, tool use, subagents, /btw, team runs, and provider-neutral pipelines when [llm].provider = "openai-codex". API-key users can set ANTHROPIC_API_KEY=sk-ant-api...; proxy users can still point the Anthropic-compatible URL at OpenRouter, DeepSeek, LiteLLM, or another compatible endpoint and use native/API-key mode.

Video Evidence

Video evidence is ingested through archon video and becomes ordinary document chunks, so archon docs search, archon docs answer, and archon kb process consume it without a separate flag.

# Local video with a user transcript
archon video ingest ./lecture.mp4 --transcript ./lecture.vtt --frames none
archon video inspect <video-id># YouTube URL with your own transcript, no media download
archon video ingest "https://www.youtube.com/watch?v=abc123" \
--transcript ./talk.vtt \
--metadata-only
# YouTube URL with governed local download and whisper-cpp ASR
archon video ingest "https://youtu.be/abc123" --frames hybrid --asr whisper-cpp --yes
# Add YouTube evidence to a named KB bucket
archon video ingest "https://youtu.be/abc123" --kb trading-elliott-wave --frames hybrid --asr whisper-cpp --yes
archon kb process --kb trading-elliott-wave --claims --entities --relations
# Frame extraction for charts, diagrams, and slides
archon video ingest ./market-review.mp4 --frames hybrid --vlm --yes
archon video transcript <video-id> --format vtt
archon docs answer "what did the chart show?"

Answers cite video chunks as video@MM:SS when timestamp provenance is present. When policy allows caption capture, Archon tries YouTube captions before ASR; frame OCR can use local RapidOCR/OpenCV fallbacks for chart-heavy videos. See docs/video.md for ASR, OCR/VLM, policy, and compliance details.

Documentation map

The docs are organised by user goal:

SectionFind this here
Getting starteddocs/getting-started/ — install, first run, quick start
Architecturedocs/architecture/ — overview, learning systems, pipelines, Evidence Engine diagrams
Evidence Enginedocs/evidence-engine.md — documents, KB, provenance, game theory, completion integrity, governed learning
Trading Labdocs/trading-lab.md and docs/cookbook/trading-lab.md — governed trading research, strategy specs, Pine prototypes, deterministic backtests, TradingView replay-paper evidence, workflow specs, paper/live gates, and risk/audit controls
Providersdocs/providers/ — provider runtime, Codex app-server, Claude Code spoofing, auth profiles, cloud/local providers
Agents & learningdocs/agents/ and docs/learning/ — governed agent evolution, memory promotion, permission governance
World modeldocs/architecture/world-model.md — local trace corpus, advisory predictions, training backends, retention
Reasoning qualitydocs/architecture/reasoning-quality.md — visible claim/evidence events, correction links, critic policy, proactive briefing
Securitydocs/security/ — tool preflight, sandboxing, Docker, SSH, OpenShell
Referencedocs/reference/ — slash commands, tools, skills, permissions, config schema, CLI flags, env vars
Integrationsdocs/integrations/ — MCP, plugins, hooks, identity spoofing, VLM image descriptions, LSP, IDE extensions
Cookbookdocs/cookbook/ — real-world evidence workflows, YouTube/video evidence, strategic engagement, memory-driven coding, pipeline rewind, god-code pipeline, custom agents
Operationsdocs/operations/ — sessions, web workbench, TUI, cost, compaction, cron, remote control, troubleshooting, data locations
Developmentdocs/development/ — contributing, dev flow gates, adding tools/skills/agents, release process
Engineering practicedocs/defensive-patterns.md — rules for writing checks that cannot lie · docs/postmortem/ — numbered incident writeups · docs/decisions/ — decision records, including the rejected bucket
Release notesdocs/release-notes/ — per-version changelogs

Repository structure

archon-cli/
├── src/ # binary entry point + CLI layer
├── crates/ # 26-crate workspace
│ ├── archon-cli-workspace/ # binary
│ ├── archon-tui/ # ratatui terminal UI
│ ├── archon-core/ # agent loop, tools, skills
│ ├── archon-consciousness/ # rules, personality, persistence
│ ├── archon-session/ # session checkpoints (CozoDB)
│ ├── archon-memory/ # memory graph + embeddings (CozoDB)
│ ├── archon-llm/ # provider clients + identity/spoofing
│ ├── archon-tools/ # 65 registered tools
│ ├── archon-permissions/ # 7 permission modes
│ ├── archon-mcp/ # MCP transport
│ ├── archon-pipeline/ # 50+46 agent pipelines + game theory + learning systems
│ ├── archon-docs/ # document intelligence, OCR, retrieval
│ ├── archon-knowledge/ # claims, entities, contradictions
│ ├── archon-provenance/ # chain hashes, W3C PROV export
│ ├── archon-completion/ # completion integrity and trust
│ ├── archon-learning/ # governed learning events/manifests
│ ├── archon-meaning/ # labels, contrastive pairs, triplets
│ ├── archon-constellation/ # centroids, scoring, drift
│ ├── archon-world-model/ # local trace world model, advisor, counterfactual scoring
│ ├── archon-reasoning-quality/ # visible claim/evidence event store
│ ├── archon-policy/ # policy gates
│ ├── archon-leann/ # semantic code search
│ ├── archon-plugin/ # dynamic plugin loading
│ ├── archon-sdk/ # embedding API + IDE bridge
│ ├── archon-context/ # context compaction
│ ├── archon-observability/ # metrics, tracing
│ └── ...
├── docs/ # user-facing documentation
└── scripts/ # dev flow gates, helpers

Status

Current release: v1.9.3release notes

Plan Mode now has a durable approval lifecycle: explicit user exit controls, safe permission restoration, editable plan documents, plan-linked task materialization, authoritative completion evidence, reconciliation, and a Plan-Mode-specific model override. The trust boundary blocks subagents from entering or exiting Plan Mode and fails closed when evidence or approval authority cannot be verified.

Registered canonical skills now appear in slash autocomplete. Primary commands remain first and keep dispatch precedence; rows are labelled [command] or [skill], aliases are not duplicated, and shadowed skills are omitted with an exact startup warning.

Built on v1.9.0, where a knowledge base stopped being two disjoint things. archon kb kbs and the web Ingest tab list the same union, so a name created on either surface is visible and usable from both — and a name you did not write down is recoverable at all. Corrections only reinforce a rule once something has been shown to have caused them, with the attribution itself running in shadow. The Memory Garden runs under a single-run lock and a work budget, and its irreversible operations became proposals a human approves. Replay weights transitions by latent surprise, which was recorded and never read.

The subagent runtime stopped repeating itself: five whole-array copies per round became two, a transcript opens once instead of once per message, and a ten-way fan-out queries the memory store three times rather than thirty. Typing is multi-line — Shift+Enter inserts a newline where the terminal can express it — and the input area no longer leaves glyphs behind when it grows and shrinks.

Built on v1.8.0, which gave the cognitive metrics a consumer that can say no, and v1.7.0, which wired four subsystems that had been built, tested and never called.

On upgrade: a correction no longer reinforces a rule unless something has been shown to have caused it. Attribution runs in shadow and fails closed, so an unattributable correction is recorded and reinforces nothing — the extractor's deferred semantic pass reinforces nothing at all now, because it records against an action window that has already moved. Scheduled garden consolidation never deletes: staleness and overflow pruning become proposals you approve through /garden proposals, while /garden run by hand behaves as before. The web workbench answers 403 rather than 200 when policy refuses an action, so a caller checking only the status code no longer reads a refusal as success. Enter still submits; Shift+Enter inserts a newline, and Ctrl+L forces a redraw. See the release notes.

From v1.9.3: a write to a file the agent has not read is now refused.Edit, Write and NotebookEdit are checked against what Read, Grep and NotebookRead recorded; Bash is not checked. Set [filesystem].read_before_edit to "warn" or "off" to soften or disable it. voice.hotkey defaults to "ctrl+v", which is the key that has always been bound. Building on Linux needs libasound2-dev now that microphone capture is a default feature. /feedback rates a message rather than submitting a report, replacing a skill that recorded nothing. See the release notes.

From v1.9.2: a structured ExitPlanMode submission now requires approval, while /plan off, /plan exit, and /plan done remain explicit direct exits to default. Only plan-linked task rows persist and rehydrate; unrelated manual tasks remain process-scoped. Skills are discovered when a session starts, so restart Archon after adding or editing a SKILL.md. See the release notes.

From v1.9.1: cost figures move in both directions — cache reads were priced at zero and writes at par, so caching could only ever look like a saving. prompt_cache_conversation = false no longer disables the tools and system checkpoints along with the message one. This turn's volatile system blocks move onto the last user message (prompt_cache_reorder, default on), which changes where the model sees them. RUST_LOG now reaches the session log. See the release notes.

From v1.8.0: project capability manifests no longer hoist tools, a declared artifact must be a regular non-empty file, and events.jsonl gained a blocking_gap_detected kind.

From v1.7.0: the cognitive schema migrates on first open, and history for two cognitive_tick_audit columns is set to null — under the old code those were hardcoded, so every stored value was a fabrication rather than a measurement.

From v1.6.0: the repository code index no longer builds at session start — it cost roughly seventeen CPU-hours on a 3,200-file repository, on sessions that never asked for code context. Restore it with [code_index] index_on_startup = true. And Intel macOS is no longer built: ONNX Runtime stopped publishing x64 macOS binaries and the Rust ort bindings followed, so the embedding runtime cannot be linked there. Apple Silicon covers every Mac still receiving macOS updates.

Every release from v0.1.6 onward is indexed with a one-line summary in the documentation map. This section carries the current release and what changes on upgrade — nothing a reader can look up.

Contributing

See docs/development/contributing.md. Every task passes the 6-gate dev flow (docs/development/dev-flow-gates.md) before merge.

Before writing a gate, a lint, a CI step, or a test involving a subprocess, a platform difference, or a clock, read docs/defensive-patterns.md. Every rule there is traced to a postmortem of a check in this repo that reported green while inspecting nothing.

License

See LICENSE (MIT). Exception: the plugins/ collection is derived from Apache-2.0 sources and remains Apache-2.0 — see its licensing section.

archon-cli can proxy Anthropic Claude and OpenAI Codex-compatible APIs. You must have valid credentials or an active subscription and comply with the relevant provider usage policies.

About

Archon CLI — a local-first Rust agentic command center with provider-flexible AI, TUI/CLI parity, persistent memory, document/evidence intelligence, provenance, self-learning, and multi-agent coding/research/game-theory pipelines.

Resources

Contributing

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages