agent-weave
AGENTS.md2 starsChanged 12 days agoMITView on GitHub
AgentWeave is an independent Dart AI runtime. It is not an official TanStack, OpenAI, or Serverpod SDK. Preserve protocol interoperability without copying TypeScript API conventions into the Dart developer API. - Read README.md, docs/architecture.md, and docs/compatibility.md. - Core model contracts and agent execution live in packages/agent_weave. Native streaming uses sealed AgentUpdate values from AiAgent.stream; AiAgent.run retains protocol events. Generate both from typed runtime values, never reconstruct native results by parsing the public wire journal or rerunning the model. Final native…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 32,671 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- llms-full.txtllms.txt
- llms.txtllms.txt
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
13 rules. About 1 is common, 2 are distinctive, and 10 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 9
Read README.md, docs/architecture.md, and docs/compatibility.md.
- Very specific: line 40
Use named parameters, immutable values, sealed events, patterns, and Dart Streams.
- Very specific: line 42
Use prefixes for provider imports to avoid collisions such as Tool.
- Very specific: line 43
Use jsonEquals for Dart-owned JSON guards.
- Common: line 65
Keep credentials on the backend and outside source control.
- Very specific: line 70
Never automatically rerun external effects after a crash.
- Very specific: line 73
Never edit generated protocol/model files.
- Very specific: line 79
Run dart run tool/check.dart.
- Very specific: line 87
Read docs/updating.md before changing upstream pins or claiming new coverage.
- Very specific: line 88
Keep docs/validation.md honest about fixture, live, and untested behavior.
- Very specific: line 92
Read ROADMAP.md before narrowing the scope or claiming completion.
- Distinctive: line 94
Use an independent consumer-development subagent on each implementation round.
- Distinctive: line 96
Use GPT-6.1 Terra with low/medium reasoning for subagents.
≈ “Common” is an estimate: at least 1 in 5 of the 41,581 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AgentWeave
AgentWeave is an independent Dart AI runtime. It is not an official TanStack, OpenAI, or Serverpod SDK. Preserve protocol interoperability without copying TypeScript API conventions into the Dart developer API.
Start here
- Read
README.md,docs/architecture.md, anddocs/compatibility.md. - Core model contracts and agent execution live in
packages/agent_weave. Native streaming uses sealedAgentUpdatevalues fromAiAgent.stream;AiAgent.runretains protocol events. Generate both from typed runtime values, never reconstruct native results by parsing the public wire journal or rerunning the model. Final native results follow committed completion and cleanup. - Provider-specific types stay in
packages/agent_weave_openaiandpackages/agent_weave_anthropic,packages/agent_weave_openrouter, andpackages/agent_weave_together,packages/agent_weave_vercel_gateway, andpackages/agent_weave_cloudflare, andpackages/agent_weave_ollama. Shared JSON HTTP transport belongs inpackages/agent_weave_http. The Anthropic normalizer consumes raw events; preserve opaque block fields and signed thinking before SDK decoding. Typed SDK configuration must apply changes to a pre-callback snapshot without erasing unknown replay fields. Anthropic hosted tools never invoke local executors. Preserve container IDs and exact tools across unfinished turns. Use ModelFinished.continuation so checkpoints and maxSteps govern provider-owned pauses; never hide retry loops inside adapters. Native provider protocols require their own serialization, continuation, and option-preservation tests. - HTTP/session integration lives in
packages/agent_weave_serverpod. Dart Frog handlers live inpackages/agent_weave_dart_frog. Ollama uses native NDJSON transport, not the compatible SSE codecs. Preserve native IDs privately and use distinct local tool-call IDs. - Native client transport lives in
packages/agent_weave_serverpod_client. - Optional storage is a Serverpod module,
agent_weave_serverpod_storage_server, with a generatedagent_weave_serverpod_storage_client. - The runnable backend and its real PostgreSQL/network tests live in
examples/serverpod/agent_weave_demo_server.
Rules
Use named parameters, immutable values, sealed events, patterns, and Dart
Streams. Prefer typed provider options and schema-validated tool inputs.
Use prefixes for provider imports to avoid collisions such as Tool.
Use jsonEquals for Dart-owned JSON guards; canonicalJson deliberately uses
JavaScript numeric semantics for protocol hashing and is not a guard comparison.
Pending tool contracts are private versioned snapshots. Never reconstruct an
older contract from current definitions or use wire schema hashes as server
authorization guards. Validate the entire resume batch before effects. Persist original model
continuation contracts across unfinished turns; never reconstruct a missing
profile from current configuration. Provider-managed execution must declare
secret-free authority and freeze its options before local tools resume.
The private execution profile binds the complete ordered tool registry, including
native executor bindings and fallback policy, before any resumed effect. Legacy
unfinished profiles fail closed. Completed history must remain replayable after
registration changes without reexecuting old calls.
Custom text-tool public arguments contain only input; native call identity and
opaque fields stay in private replay. Keep native result variants distinct.
Native MCP work remains provider-owned: preserve private correlation and listing
replay, and checkpoint possible remote execution before dispatch.
Completed media and typed citations are public content; native output/replay
metadata stays private. Citation answer offsets use UTF-16; source coordinates
retain native units. Preserve citations and references when cloning canonical
history. Reference part spans are verified UTF-16 context, not native highlights;
file-list positions are not text offsets. Scoped public file handles do not
authorize retrieval.
Keep credentials on the backend and outside source control.
Authentication owns ownerId. Never accept it from a request body.
Validate all approval answers before invoking any tool in that batch.
Preserve run reservations, event ordering, and server-owned history.
Never automatically rerun external effects after a crash. Tools use their
idempotencyKey to implement idempotency with the destination service.
Never edit generated protocol/model files. Change .spy.yaml or endpoint
sources, then run Serverpod 4.1.0 generation and create migrations. Keep module
and example migrations in sync. Do not hand-edit migration metadata.
Verification
Run dart run tool/check.dart. It includes unit tests, actual PostgreSQL and
Serverpod network tests, and interoperability with the official JavaScript
client. It does not make paid API calls.
Live tests require explicit authorization, an environment-only key, and a persisted cumulative budget. Do not reset the ledger or increase its limit to make a failing test pass. Do not store a live key in examples, logs, or fixtures.
Read docs/updating.md before changing upstream pins or claiming new coverage.
Keep docs/validation.md honest about fixture, live, and untested behavior.
Product acceptance and developer reviews
Read ROADMAP.md before narrowing the scope or claiming completion. Native Dart
DX is the main contract; TanStack compatibility can be an optional integration.
Use an independent consumer-development subagent on each implementation round.
It must write/run realistic cases and score the experience honestly out of ten.
Use GPT-6.1 Terra with low/medium reasoning for subagents. Never convert a green
test count or forwarded provider parameters into a full-support claim.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

