Mythos-Nexus beta is live for $MYTHOS holders - Nexus beta - Try it out

The Mythos Engine

A local-first, provider-agnostic CLI runtime. Mythos goes beyond simple LLM wrappers by enforcing strict file verification, multi-provider routing, skills, receipts, and MCP/external-agent SWD boundaries.

1. Strict Write Discipline (SWD)

Core Internal State & Routing Logic
INTENT CAPTUREProposed ChangesetDRY RUNVirtual ExecutionSNAPSHOT SYNCGround Truth BaselineHASH VERIFICATIONChecksum Zero-DivergenceCOMMITVerified State ChangeHOST FILESYSTEMHASH MISMATCHSTATE RE-INJECTIONdry_run_execstate_snapshotverify_sum* Red arc indicates a Correction Turn triggered by detected context divergence.
01

Intent Capture

Captured AI output is treated as a Proposed Intent, not a direct command. Each node must contain explicit metadata: Target Path, Operation, and File Content.

02

Snapshot Sync

The system performs an instantaneous sync with the Host Filesystem. Actual state overrides internal AI assumptions, creating a verified ground truth baseline.

03

Correction Turn

If an intent references invalid system state, execution is blocked. Real-time filesystem state is re-injected into the AI context, triggering a self-correction loop.

04

Atomic Verification

Intents are promoted to COMMIT only when verification yields zero divergence. Ensures atomic, validated writes under controlled conditions.

2. Multi-Provider Orchestration

Fallback-Aware Routing

Mythos uses provider health, latency, cost, retry behavior, and fallback settings to choose between configured providers. If the active provider fails with a retryable error or stalls, the orchestrator can move to another configured provider instead of treating one API failure as the whole session.

  • Adaptive Performance Scoring
  • Exponential Backoff & Circuit Breakers
  • 15-second Stream Watchdog Timeout
// Adaptive Provider Scoring
const score =
(successRate * 150) -
(latency * 0.01) -
(cost * 5);

// Circuit Breaker Tripped
[429] Primary provider rate limited.
[ROUTER] Falling back to DeepSeek...

3. Auto-Healing TDD Loop

Closed-Loop Execution

When the --test-cmd flag is passed, Mythos automatically runs your test suite after applying SWD verified file changes.

Error-Driven Fixes

If tests fail, the stdout/stderr is captured, truncated safely, and fed back into the agent context for an automatic correction turn.

Anti-Thrashing Guards

Safety mechanisms detect identical test outputs across retries or regression in failure counts to prevent runaway token consumption.

Budget Enforced

Every test healing loop respects the global SessionBudget, graceful saving state if token or turn limits are approached.

4. YAML Skills Protocol

Inject targeted operational context dynamically using local SKILL.md files. Skills shape repo behavior, review expectations, provider preferences, and budget settings for the active session.

Deterministic RoutingBudget MultipliersReceipt Metadata
---
name: security-audit
force-provider: anthropic
budget-multiplier: 2.0
---

# Instructions
Scan for any hardcoded credentials.

5. MCP and External-Agent SWD Boundary

Local MCP Tool Server

MCP clients can run mythos mcp and call SWD dry-run/apply, receipts, and skill inspection tools over local stdio.

Automation Output

--json returns machine-readable status, approved and rejected action counts, verification results, and receipt metadata for scripts and CI-style tooling.

Security Defaults

Sensitive paths are blocked by default. Deletes and command-surface files require explicit opt-in.

Receipts

Successful non-dry-run applies write local SWD receipts with external agent metadata, file hashes, rollback status, and drift verification data.

Upgrade Your Workflow

Deploy the Mythos Router in your development environment to transform generative AI into a reliable, verifiable, and cost-efficient engineering partner.

Start guideGitHub