agentleFS
seifalmotazseifalmotaz/agent-weave/AGENTS.md

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.

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
  1. Very specific:

    Read README.md, docs/architecture.md, and docs/compatibility.md.

    line 9
  2. Very specific:

    Use named parameters, immutable values, sealed events, patterns, and Dart Streams.

    line 40
  3. Very specific:

    Use prefixes for provider imports to avoid collisions such as Tool.

    line 42
  4. Very specific:

    Use jsonEquals for Dart-owned JSON guards.

    line 43
  5. Common:

    Keep credentials on the backend and outside source control.

    line 65
  6. Very specific:

    Never automatically rerun external effects after a crash.

    line 70
  7. Very specific:

    Never edit generated protocol/model files.

    line 73
  8. Very specific:

    Run dart run tool/check.dart.

    line 79
  9. Very specific:

    Read docs/updating.md before changing upstream pins or claiming new coverage.

    line 87
  10. Very specific:

    Keep docs/validation.md honest about fixture, live, and untested behavior.

    line 88
  11. Very specific:

    Read ROADMAP.md before narrowing the scope or claiming completion.

    line 92
  12. Distinctive:

    Use an independent consumer-development subagent on each implementation round.

    line 94
  13. Distinctive:

    Use GPT-6.1 Terra with low/medium reasoning for subagents.

    line 96

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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, 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 results follow committed completion and cleanup.
  • Provider-specific types stay in packages/agent_weave_openai and packages/agent_weave_anthropic, packages/agent_weave_openrouter, and packages/agent_weave_together, packages/agent_weave_vercel_gateway, and packages/agent_weave_cloudflare, and packages/agent_weave_ollama. Shared JSON HTTP transport belongs in packages/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 in packages/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 generated agent_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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.