THE EXPERIENCE LAYER FOR AUTONOMOUS AGENTS 🌸Pre-alpha · Rust + SQLite + Git Realities

Models are trained.
Agents need experience.

Agents reason. Hardknock gives them experience.

Claude Code, Codex, Hermes, OpenClaw, and Kiro already know how to reason. Hardknock provides a Dojo where they can fail safely, reflect, test competing hypotheses experimentally, and carry evidence-backed lessons forward.

Give agents scars without the outages. Let them learn the hard way—without making production pay for it.
Murph the Axolotl mascot
Murph the Axolotl 🌸
“Winning once means you found a move. Breaking it five different ways means you started learning it.”

Axolotls regenerate after injury; Murph represents the same ambition: fail safely, test alternatives, and retain validated experience.

The Core Distinction

Skills make agents capable. Lessons make them resilient.

Frontier models know massive theory, but knowledge is not experience. Skills encode the happy path; experience reveals the boundary.

Knowledge ≠ Experience

An agent entering a codebase for the first time has not personally learned:

  • •Which migration repeatedly breaks this database
  • •Which package upgrade introduces subtle regressions
  • •Which strategy works until network latency appears
  • •Which warning signs predict an imminent outage
  • •Which lesson learned 6 months ago is now obsolete
Humans learn these through mistakes and debugging. Agents need an empirical substrate to do the same.
The Hardknock Ontology in ActionMonorepo Case Study
SKILL (The Technique)“How do I do this?”
Upgrade dependencies with pnpm install.
LESSON (The Judgment)“Why did this fail & what to change?”
In repos with pnpm-workspace.yaml, npm install introduces conflicting lockfiles. Prefer pnpm under tested conditions.
REFLEX (The Instinct)
Detect pnpm-workspace.yaml + npm install before execution → warn/replan.
RECOVERY (The Comeback)
Remove conflicting lockfile, restore clean Git tree, reinstall via pnpm, rerun check.
EXPERIENCE (The Ground Truth): Immutable commit snapshot 7b4c9e1, stdout/stderr, diffs, test exit 1, and paired counterfactual trials.
MEMORY
“Remember this.”
Recall unverified text strings
SKILL
“Do this.”
Execute procedural recipes
REFLECTION
“I think why…”
Infer candidate explanation
SANDBOX
“Isolate this.”
Contain destructive effects
EVALUATION
“Did it pass?”
Measure immediate run outcome
HARDKNOCK
“Test & Learn.”
Empirical experience engine
The Scientific Method for Agents

You cannot reason your way into experience.

An agent can spend another 20,000 tokens imagining what might happen—or enter a disposable Reality to find out. Reflection proposes. Reality decides.

Reason
THINK
Dojo
TRY
Lesson
KNOW
Scenario:
Murph the AxolotlMood: BROKEN 🩹 💥
đź’ˇ Click Murph to interact!

“Ouch! I ran `npm install` inside this pnpm workspace and broke the build! In Hardknock, this failure becomes an immutable scar, not an outage.”

Axolotls regenerate limbs without scars; Murph gives agents scars in the Dojo without production outages.
Live Dojo Twin Realities Simulator

Spawn two disposable Git worktrees from starting snapshot 7b4c9e1. Test baseline vs alternative strategy simultaneously.

Chaos Perturbation Sliders (Operating Envelope Prober)
Inject real-world operational friction into the Dojo
Latency Jitter:800ms
Token Expiry Mid-Flight:OFF
Tool Drop Probability:10%
Reality A (Baseline Strategy)
worktree/dojo-reality-a
Action:npm install @openkedge/core
Isolation:Detached Worktree
Chaos Impact:+800ms latency
Execution Progress0%
Evaluation Outcome:
Awaiting trial launch...
Reality B (Counterfactual Strategy)
worktree/dojo-reality-b
Action:pnpm add @openkedge/core
Isolation:Detached Worktree
Resilience Reflex:Handled Latency & Disconnects
Execution Progress0%
Evaluation Outcome:
Awaiting trial launch...
The Dojo: Disposable Realities 🥋

Production is a terrible classroom.

Live failures are expensive and scarce. Teams try to avoid them rather than repeat them for learning. The Dojo changes the economics through failure amplification without production impact.

Hardknock reconstructs the starting commit, forks twin isolated Git worktrees, tests competing actions, and discards the broken world while retaining the evidence.

Realities Workflow API
Reality.create() → fork() → execute() → diff() → evaluate() → discard()
Chaos Engineering for Agents đź’Ą

Discover the Operating Envelope

Traditional chaos engineering tests system limits. Hardknock asks: “Under what conditions does this agent's learned strategy stop behaving correctly?”

“Hardknock doesn't just teach agents what works. It teaches them where it stops working.”
Operating Envelope Formula
Known Skill → Chaos Injections → Discover Boundary → Resilient Skill
Institutional Asset

Your model is replaceable.
Your experience shouldn't be.

Codex discovers a lesson; Claude retrieves it; Hermes replicates it; next-generation models inherit it. Experience belongs to the repository environment, not to the model weights.

Hardknock evolves agent behavior without requiring model weights to be retrained. Experience lives in an inspectable SQLite ledger with cryptographic provenance.

Evidence Promotion Ladder
OBSERVED→CANDIDATE→SUPPORTED (0.78)→VALIDATED (0.90)
Falsifiability & Unlearning Progression
TRUSTED→CONTRADICTED→WEAKENED→RETIRED

“A learning system that cannot unlearn eventually becomes a mythology system.”

Developer Tooling

Interactive CLI Explorer đź’»

Inspect execution records, manage candidate hypotheses, and trace decisions backwards with hardknock why.

Executes an agent task in a disposable Reality, verifies required checks, and retries automatically if a validated Lesson is retrieved.

$hardknock --repo ./pnpm-workspace run --agent claude-code --check './test.sh' --retry-with-experience --max-retries 1 'upgrade demo dependencies'
[hardknock] Verified clean starting snapshot: commit 7b4c9e1
[hardknock] Created disposable Reality: worktree/r0-trial-01
[retrieval] Found 1 matching lesson: lesson-402 [COUNTERFACTUALLY_SUPPORTED] (conf: 0.78)
[context] Injected advice via .hardknock/context.md:
          "Prefer 'pnpm install' over 'npm install' in this workspace."
[agent: claude-code] Reading advice... Executing: pnpm install @openkedge/sdk
[evaluator] Running required check: ./test.sh
[evaluator] âś… All 14 tests PASSED (Exit 0).
[hardknock] Task complete. Experience exp-398a linked. Reality discarded.
Implementation Status MatrixPre-alpha Verification
Experience Schema & SQLite StoreTyped, immutable execution records, failure signatures, and BLAKE3 environment fingerprints.Implemented
Dojo Git RealitiesDetached Git worktree sandboxes, starting-snapshot verification, diff capture, and automatic disposal.Implemented
Candidate Hypothesis ExtractionScoped Lesson proposals with action matchers, marker files, and avoid/prefer strategies.Implemented
Paired Counterfactual ExperimentsTwin Baseline vs Alternative trials under identical snapshots to test proposed causality.Implemented
Scoped Retrieval & LineageInjecting experience into .hardknock/context.md and tracing decisions with 'hardknock why'.Implemented
Cross-Repository Transfer ValidationPromoting lessons from CounterfactuallySupported (0.78) to Validated (0.90) on distinct trees.Implemented
Comparative Architectural Analysis

Hardknock vs OpenClaw, Hermes, LangSmith, SWE-bench & E2B

Explore deep architectural side-by-side matrices comparing Hardknock's empirical experience engine against execution runtimes, open-weights agents, passive tracing, static benchmarks, and cloud sandboxes.

Open Source Under MIT License 🌸

Bring your agent.
We'll give it a Dojo.

Claude Code. Codex. Hermes. OpenClaw. Kiro. Whatever comes next. Models will keep changing—your accumulated empirical experience should not disappear with them.

“Break things here. Learn something. Return stronger.” 🌸