docs(adr): 0006 — Runtime contract (v1) [closes #214]#274
Open
EmersonBraun wants to merge 1 commit intomainfrom
Open
docs(adr): 0006 — Runtime contract (v1) [closes #214]#274EmersonBraun wants to merge 1 commit intomainfrom
EmersonBraun wants to merge 1 commit intomainfrom
Conversation
The conductor of the substrate. Where Adapter/Tool/Memory/Retriever/Skill compose into an actual agent loop. 14 invariants (RT1-RT14). Key decisions: - One entry point: run(task, options) — no start/init/step - Construction is config-only, no I/O at createRuntime (RT1) - Hard maxSteps cap, never soft (RT4) — fixes universal regret pattern - Confirmation refuse-by-default (RT6) — no auto-approve timeout - Memory atomic at run boundary (RT7) — failed runs do not save - Per-turn retrieval, not per-step (RT8) — simplification with escape hatch - Observers read-only (RT9) — mutating logic uses wrapper runtimes - Delegation as tool (RT10) — unifies the model's mental model - Bounded delegation depth (RT11) — behavioral cap, not just counter - Categorized errors (RT14) — adapter / tool / confirmation / memory / programmer enabling fallbacks, self-debug, durable execution Forward-compat carve-outs in v1.x (additive, no v2 needed): - Durability checkpoints (#156) - Replay hooks (#134) - Multi-agent topology helpers (#157) This is the 6th and final core contract ADR. The substrate is now formal: ADR 0001 Adapter - LLM provider seam ADR 0002 Tool - executable function the model calls ADR 0003 Memory - chat history + vector store + embed ADR 0004 Retriever - context fetching, single narrow interface ADR 0005 Skill - declarative persona configuration ADR 0006 Runtime - the loop that composes them all Closes #214
9 tasks
EmersonBraun
added a commit
that referenced
this pull request
Apr 14, 2026
Reframes the README from a generic 'complete toolkit' pitch to an opinionated, honest, story-driven entry point. What's new: - Tagline 'The agent toolkit JavaScript actually deserves' — opinion, not buzzwords - 'Why this exists' section linking to ORIGIN.md and MANIFESTO.md - 'Before and after' section showing the typical cobbled stack vs AgentsKit's two-import equivalent - Honest 'When you should NOT use AgentsKit' section — directs people to single-OpenAI-call, Vercel AI SDK for chat-only, Python frameworks, mature observability platforms, or pre-1.0 caution - Comparison table now includes formal contracts row and edge-readiness - Stability tier column on the ecosystem table - Architecture and contracts section linking the six ADRs - 'For AI agents reading this' section — first-class doc consumers - Status section linking Phase 0 and Master PRDs - agentskit.io as canonical docs URL What's preserved and tightened: - Quickstart in 10 lines (single example, not three competing) - Multi-agent delegation example - Provider swap demonstration - Terminal chat (Ink) callout Aligns with stories #224 (README rewrite) and #16 (honest comparison incl. when NOT to use). Builds on Manifesto + Origin (#265) and the six contract ADRs (#267-#274). Refs #224 #16 #211
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sixth and final core-contract ADR of Phase 0. The Runtime is the conductor of the substrate — where Adapter, Tool, Memory, Retriever, and Skill compose into an actual agent loop.
14 invariants (RT1-RT14) covering construction, the loop bound, resolution rules, confirmation, memory atomicity, retrieval, observers, delegation, errors, and abort.
This PR closes #214 (the 6 core contract ADRs).
Builds on #267, #270, #271, #272, #273.
The substrate is now formal
Highlight invariants
createRuntimedoes no I/O, no surprise side effects on importrun(task, options). No start/init/step. Streaming via observers.Forward-compat carve-outs in v1.x (no v2 needed)
delegatesconfigrunStreammethod if real demand for streaming-as-return-type emergesTrade-offs accepted
Unlocks
delegates— supervisor/swarm/hierarchical/blackboard fall outrun()signatureTest plan
packages/runtime/src/runner.tsandpackages/core/src/agent-loop.ts?Closes #214
Refs #211