Skip to content

EtienneLescot/agent-fabric

Repository files navigation

Agent Fabric

Patterns, contracts, and architecture for coding-agent runtimes

Status Focus Scope Stage

Agent Fabric hero image

Agent Fabric studies whether modern coding agents are converging on a shared runtime behavior contract, even though they do not share one standard implementation.


Why This Exists

Modern coding agents increasingly look different at the product layer but similar at the runtime layer.

Across tools like Roo Code, Cline, and Claude Code, the same execution concerns keep reappearing:

  • tool-result loops,
  • explicit completion semantics,
  • recoverable tool failures,
  • inspectable runtime state,
  • context compaction,
  • bounded delegation,
  • policy and hook interception.

Agent Fabric exists to isolate those recurring semantics and ask a narrower architectural question:

Is there a reusable runtime contract emerging between low-level model/tool SDKs and heavier orchestration systems?


Current Thesis

If this repository had to make one opinionated claim today, it would be this:

Modern coding agents are converging on a guarded tool-result loop with explicit completion, recoverable failures, inspectable runtime state, and policy boundaries around tool use and stopping.

The strongest current candidate for the emerging standard shape is:

  1. a Task persists across many turns,
  2. each Turn produces tool calls, recovery actions, or a completion attempt,
  3. tool failures stay in-band as structured inputs to the next turn,
  4. completion is a privileged runtime action, not just assistant text,
  5. runtime state is exposed separately from the transcript,
  6. compaction and resumability are runtime responsibilities,
  7. subagents are bounded, observable, and optional,
  8. hooks and policy layers sit around the core loop rather than inside every product-specific rule.

The parts that currently look closest to standardization are:

  • tool-result loop,
  • explicit completion,
  • recoverable tool failures,
  • command-output streaming,
  • minimal runtime state exposure.

At A Glance

What Current View
Strongest pattern Guarded tool-result loop
Most reusable invariants Explicit completion, failure reinjection, state exposure
Architectural position Above model/tool SDKs, below orchestration frameworks and product shells
Strongest evidence so far Roo Code, Cline, Claude Code
Current maturity Research skeleton complete, Tier 1 reviews complete at v1, synthesis in progress

Runtime Pattern

flowchart TD
  A[User creates or resumes task]
  B[Runtime owns task state]
  C[Model produces next turn]
  D{Tool call?}
  E[Execute tool]
  F[Structured tool result]
  G{Completion attempt?}
  H[Run completion guardrails]
  I{Accepted?}
  J[Task completed]
  K[Reject completion and reinject feedback]
  L{Context pressure or pause?}
  M[Compact or checkpoint]
  N[Resume with preserved task state]
  O[Policy and hooks can intercept tool use or stopping]

  A --> B --> C
  C --> D
  D -->|yes| E --> F --> O --> G
  D -->|no| G
  G -->|yes| H --> I
  I -->|yes| J
  I -->|no| K --> L
  G -->|no| L
  L -->|yes| M --> N --> C
  L -->|no| C
Loading

Start Here

If you want the fastest path through the repo:

  1. synthesis/executive-summary.md
  2. patterns/README.md
  3. synthesis/standardization-view.md
  4. synthesis/runtime-contract.md

If you want the evidence first:

  1. research/corpus.md
  2. research/systems/roo-code.md
  3. research/systems/cline.md
  4. research/systems/claude-code.md

If you want the implementation angle first:

  1. synthesis/runtime-contract.md
  2. synthesis/reference-architecture.md
  3. build-from-zero/repo-spec.md

What This Repo Is

This repo is This repo is not
A research and design repo about coding-agent runtime behavior A generic AI framework for every domain
A comparative survey of agent systems and runtime-adjacent tools A benchmark-only project
A pattern catalog for reusable runtime primitives A clone of any commercial agent
A synthesis effort toward a narrow runtime contract An implementation-first codebase
A foundation for future specs or reference runtimes A domain-specific workflow repo

Core Questions

  1. What runtime behaviors recur across modern coding agents?
  2. Which of those behaviors are generic rather than product-specific?
  3. What is the minimal state machine that still supports robust coding-agent execution?
  4. How should completion, recovery, compaction, permissions, and delegation be modeled?
  5. Can those behaviors be expressed as a reusable contract independent of any single SDK or orchestration framework?

Current Findings Snapshot

  • Explicit completion attempts appear to be a high-confidence convergence pattern.
  • Recoverable tool failure handling appears more reusable than fatal-error handling.
  • Runtime state often needs to be modeled separately from the raw transcript.
  • Context compaction is increasingly a runtime concern rather than an ad hoc patch.
  • Subagents are useful when bounded by role, tool surface, and reporting obligations.
  • Policies and hooks appear to be a better home for product-specific rules than the runtime core.

Research Coverage

Tier 1: Core References

  • Roo Code
  • Cline
  • Claude Code

Tier 2: Product Comparators

  • GitHub Copilot
  • Cursor
  • Kilo Code
  • OpenCode
  • Continue
  • Aider
  • OpenHands

Tier 3: Runtime Neighbors

  • Vercel AI SDK
  • LangGraph
  • Mastra
  • OpenAI Responses and Agents patterns
  • Anthropic SDK and Claude Code SDK patterns

Repository Map

Section What it contains
research/corpus.md systems in scope, review depth, and current status
research/methodology.md evidence rules and interpretation criteria
patterns/README.md pattern catalog and comparative matrix
synthesis/executive-summary.md the fastest overview of the thesis
synthesis/standardization-view.md the current opinionated summary of the convergent pattern
synthesis/runtime-contract.md the proposed generic runtime contract
synthesis/reference-architecture.md layering and control-flow proposal
build-from-zero/repo-spec.md implementation-oriented spec for a future runtime repo

Confidence Model

Patterns are tagged using these labels:

  • high-confidence convergence
  • medium-confidence convergence
  • emerging but unstable
  • speculative proposal

Now / Next

Now

  • Tier 1 reviews are complete at a first source-backed pass.
  • The initial pattern catalog exists.
  • The runtime contract and standardization view exist in draft form.

Next

  1. Expand Tier 2 comparator reviews.
  2. Tighten the boundary between runtime core, policy layers, and product shell.
  3. Upgrade synthesis claims from plausible to defensible.
  4. Add stronger cross-system evidence directly into each pattern page.

Future Direction

If the evidence holds, this repo should converge on a narrow and credible conclusion:

There is no single standard implementation for coding-agent orchestration today, but there is a converging runtime behavior pattern that can be formalized as a reusable contract.

If the evidence does not hold, the repo should say exactly where convergence stops.

About

Agent Fabric explores the patterns, contracts, and runtime architecture emerging across modern coding agents.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors