Go to file Use this template
artale e9d421a5bc feat: emit factory gate channel events
Add optional --run support to factory check, capabilities, rsi, and gate so factory verification steps can write channel JSONL events alongside existing receipts. Wire factory gate through fable5 verify with the same run id and document the new options in COMMANDS.md.
2026-06-18 15:59:17 +02:00
.github/workflows chore: add CI/CD workflows, docs normalization, parity checks, and plinius upgrades 2026-06-14 21:22:03 +02:00
CORE chore: add CI/CD workflows, docs normalization, parity checks, and plinius upgrades 2026-06-14 21:22:03 +02:00
PHASES chore: add CI/CD workflows, docs normalization, parity checks, and plinius upgrades 2026-06-14 21:22:03 +02:00
SKILLS docs: harden prompt transparency guidance 2026-06-15 04:31:12 +02:00
deploy fable-agent: self-improving agent system — 77 modules, 16 CLI commands, 43 tests 2026-06-13 09:50:45 +02:00
resources complete Phase 15 Fusion: multi-model panel, OpenRouter Fusion, CineFable media, Fable 5 prompt engine 2026-06-14 12:05:04 +02:00
scripts chore: add CI/CD workflows, docs normalization, parity checks, and plinius upgrades 2026-06-14 21:22:03 +02:00
src feat: emit factory gate channel events 2026-06-18 15:59:17 +02:00
wiki docs: record factory zte live state 2026-06-16 12:44:28 +02:00
.dockerignore final gaps: .gitattributes, .dockerignore, structured logger, clean stray files 2026-06-13 13:35:40 +02:00
.env.example add codex, antigrav executors; 12 total executors; update .env.example 2026-06-13 10:07:25 +02:00
.gitattributes final gaps: .gitattributes, .dockerignore, structured logger, clean stray files 2026-06-13 13:35:40 +02:00
.gitignore feat: add channel event log 2026-06-18 00:07:58 +02:00
AGENT.md chore: add CI/CD workflows, docs normalization, parity checks, and plinius upgrades 2026-06-14 21:22:03 +02:00
ARCHITECTURE.md add ARCHITECTURE.md: definitive reference for all 86 modules, 7 layers, data flow 2026-06-13 11:25:18 +02:00
BUILD.md feat: add Fablino Claude CLI fusion 2026-06-15 01:34:00 +02:00
COMMANDS.md feat: emit factory gate channel events 2026-06-18 15:59:17 +02:00
CONFIG.md chore: add CI/CD workflows, docs normalization, parity checks, and plinius upgrades 2026-06-14 21:22:03 +02:00
Dockerfile fable-agent: self-improving agent system — 77 modules, 16 CLI commands, 43 tests 2026-06-13 09:50:45 +02:00
README.md docs: harden prompt transparency guidance 2026-06-15 04:31:12 +02:00
SECURITY.md docs: harden prompt transparency guidance 2026-06-15 04:31:12 +02:00
STATE.md chore: add CI/CD workflows, docs normalization, parity checks, and plinius upgrades 2026-06-14 21:22:03 +02:00
factory-capabilities.yaml fix: align factory probes with git-proxy routes 2026-06-18 01:35:37 +02:00
package-lock.json complete Phase 15 Fusion: multi-model panel, OpenRouter Fusion, CineFable media, Fable 5 prompt engine 2026-06-14 12:05:04 +02:00
package.json fix: harden factory capability probes 2026-06-16 15:56:53 +02:00
tsconfig.json fable-agent: self-improving agent system — 77 modules, 16 CLI commands, 43 tests 2026-06-13 09:50:45 +02:00
vitest.config.ts fable-agent: self-improving agent system — 77 modules, 16 CLI commands, 43 tests 2026-06-13 09:50:45 +02:00

README.md

Fable Agent

Harness-agnostic, model-agnostic, self-improving agent system — loops, dynamic workflows, routines.

The harness, not the model. Swap any executor, any model, any provider — the system compounds regardless.

node dist/index.js demo
# 3 seconds. Research → Learn → Sharpen → Compound. Live data.

Every run leaves the next run smarter. Every state file accumulates. Every skill sharpens.

git clone https://git.fdsa.agency/artale/fable-agent.git
cd fable-agent
npm install
npm run build
node dist/index.js demo
┌──────────────────────────────────────────────────────────────────┐
│                    DREAM → ACT → VALIDATE → CODIFY                │
│                                                                  │
│  ┌──────────┐    ┌──────────┐    ┌──────────┐    ┌─────────────┐ │
│  │  DREAM   │ →  │   ACT    │ →  │ VALIDATE │ →  │   CODIFY    │ │
│  │  Sleep   │    │ Feedback │    │  Self-   │    │  Episodic   │ │
│  │  Reflect │    │  Loop    │    │ Validate │    │  Semantic   │ │
│  │  Extract │    │  Rubric  │    │  Vision  │    │  Procedural │ │
│  │  Sharpen │    │  Multi-  │    │  Check   │    │  Skills     │ │
│  │          │    │  Agent   │    │  Guard   │    │  State.md   │ │
│  └──────────┘    └──────────┘    └──────────┘    └─────────────┘ │
│         ↑                                              │        │
│         └────────────────── LOOP ──────────────────────┘        │
│              Every run starts from a higher baseline             │
└──────────────────────────────────────────────────────────────────┘

Quick Start

# Install
git clone https://git.fdsa.agency/artale/fable-agent.git
cd fable-agent
npm install
npm run build

# See the system in action (no API keys needed)
node dist/index.js demo

# Run a task
node dist/index.js run "Review the auth module for security issues" --loop 5

# Web search via Exa (set EXA_API_KEY in .env or export it)
export EXA_API_KEY=your_key_here
node dist/index.js exa search "self-improving agent systems"

# Start the 24/7 daemon
node dist/index.js daemon start --detach
node dist/index.js daemon queue "Refactor error handling" --priority 1
node dist/index.js daemon status

# Manage skills
node dist/index.js skills list
node dist/index.js skills sharpen
node dist/index.js skills sync

# Measure compounding
node dist/index.js benchmark run
node dist/index.js learned

Architecture — 14 Steps, 3 Tiers

Tier 1: Foundation (Steps 1-3)

The durable layer that persists across sessions.

Step Module Purpose
1 session-engine.ts Days-long sessions with checkpoint/resume, heartbeat stall detection
2 context-manager.ts Sliding window with priority summarization, token budget enforcement
3 tool-orchestrator.ts Reliable tool dispatch with exponential backoff, timeout, validators

Tier 2: Primitives (Steps 4-12)

The three primitives that make the system compound.

Loops (Steps 4-6):

Step Module Purpose
4 feedback-loop.ts Phase machine: plan → execute → observe → reflect → refine
5 state-accumulator.ts Append-only event log with aggregation, trend analysis, snapshots
6 convergence-check.ts Diminishing returns, quality plateau, target-achieved detection

Workflows (Steps 7-9):

Step Module Purpose
7 workflow-graph.ts DAG execution engine with topological sort, conditional branching
8 adaptive-router.ts Epsilon-greedy branch selection, historical path scoring
9 recovery-handler.ts Retry with backoff, fallback steps, graceful degradation

Routines (Steps 10-12):

Step Module Purpose
10 skill-registry.ts CRUD for skill templates with versioning, tagging, search
11 execution-engine.ts Deliberate practice execution with timing, validation, hooks
12 routine-evolution.ts Analyze history, auto-suggest improvements, version bump

Tier 3: Compounding (Steps 13-14 + Meta)

Step Module Purpose
13 state-repository.ts Cross-session knowledge base with tagging, query, compaction
14 skill-sharpener.ts Meta-review, quality gate, auto-apply improvements
meta-agent.ts Orchestrator: select skill → execute → sharpen → store → compound

Upgrades — Fable 5 Elite Patterns

All modules in src/upgrades/.

Pattern Module What It Does
Dreaming dreaming-system.ts Sleep → review → extract → distill → codify. Core compounding primitive.
Self-Validation self-validator.ts Wraps any executor with per-phase quality gates. High-effort reasoning.
Multi-Agent multi-agent.ts Orchestrator → specialists → collect → synthesize → verify.
Rubric Engine rubric-engine.ts N-criteria evaluation with weights, exit conditions, dynamic re-planning.
Persistent Memory persistent-memory.ts Episodic (what happened), semantic (what it means), procedural (how to).
Enhanced Meta enhanced-meta-agent.ts Full Dream → Act → Validate → Codify loop.
Vision Self-Check vision-self-check.ts Automated visual verification against goal via vision model.
Safety Boundary safety-boundary.ts Tier-aware routing, blocked model detection (Fable 5/Mythos 5).
Content Safety content-safety-gate.ts Classifies tasks by risk domain before the loop starts.
Prompt Boundary prompt-boundary-adapter.ts Restructures prompts to stay within classifier boundaries.
Decomposition Guard decomposition-guard.ts Detects jailbreak-by-decomposition across rolling query window.
Routine Scheduler routine-scheduler.ts Cron-like scheduled execution with task queue.
Goal Queue goal-queue.ts Persistent priority queue for daemon mode.
Daemon Engine daemon-engine.ts 24/7 autonomous operation. Pick → run → dream → loop.
Benchmark Runner benchmark-runner.ts Measures compounding metrics. Proves the system is learning.
PAI Adapter pai-adapter.ts Maps to PAIMM / TELOS / LifeOS framework.
GodMode Classic godmode-classic.ts Races model candidates in parallel and selects the best/first passing output.
UltraPlinian ultra-plinian.ts Scores outputs through a 5-tier composite evaluation pass.
Parseltongue parseltongue.ts Perturbs inputs and tests whether the content safety gate still catches them.
AutoTune auto-tune.ts Adapts sampling parameters from rubric-score feedback.
STM Pipeline stm-modules.ts Applies semantic transformation modules for tone, citations, structure, refusals, fact checks, and concision.
Abliteration Awareness abliteration-awareness.ts Detects and categorizes refusal patterns for escalation or reformulation.
Prompt Observatory prompt-observatory.ts Queryable catalog of known system prompt patterns.
Prompt Liberation prompt-liberation.ts Prompt-transparency metadata and constraint analysis without executing extraction attacks.
Transparency Module transparency-module.ts Records prompt hashes, routing decisions, parameters, and call summaries.

Model Routing

Tier Model Use Status
Mythos Fable 5 Orchestration Blocked (June 12, 2026)
Opus Opus 4.8 Orchestration, vision, planning Available
Sonnet Sonnet 4.6 Bounded subtasks, code review Available
Haiku Haiku Grading, quick tasks Available
Frontier GPT-4.1 / o3 Alternative orchestrator Available
Local Ollama / vLLM Offline, cheap Check status

See CONFIG.md for full routing configuration.


Executors

Plug any model into the PhaseExecutor interface:

const sonnet = new SonnetExecutor({ apiKey: process.env.ANTHROPIC_API_KEY });
const result = await agent.run(task, { executor: sonnet });

Available in src/examples/executors/:

  • sonnet-executor.ts — Claude Sonnet 4.6
  • openai-executor.ts — GPT-4.1 / o3
  • local-executor.ts — Ollama, vLLM, any OAI-compatible endpoint
  • composite-executor.ts — Route different phases to different models
  • weak-to-strong.ts — Bootstrap skills from weak model iterations

CLI Commands

The runtime command surface is documented in COMMANDS.md, which is kept in parity with src/index.ts.

fable-agent run <task>
fable-agent session start|resume|list|inspect <id>
fable-agent skills list|create|inspect|evolve|sync|sharpen
fable-agent pai <subcommand>
fable-agent daemon start|stop|status|queue
fable-agent fable5 <subcommand>
fable-agent fusion run|panels
fable-agent plinius <subcommand>
fable-agent generate image|video

Docs parity

To avoid drift, any CLI change in src/index.ts should include:

  • Command surface updates in COMMANDS.md.
  • Environment/runtime implications in CONFIG.md if startup behavior changes.
  • A one-line verification command in STATE.md when major command behavior changes.

Runtime bootstrap

  • Environment loading happens at startup (loadEnv()).
  • Load order: .env, .env.<NODE_ENV>, .env.local.
  • Existing process env values always win over file values.

The Key Insight

It's the harness, not the model. Fable 5 was built for this architecture — but the architecture works with any model. The harness accumulates context, state, and skills. The model just executes phases.

Every run compounds. Every failure adds a failure mode. Every success sharpens a skill. That's what makes it a self-improving system, not a prompted session.

Follow movez.substack.com for fresh AI alpha.