agentleFS
DangoSysDangoSys/skills/agent-runtime/SKILL.md

agent-runtime

Skill1 starsChanged 3 months agoApache-2.0View on GitHub

Implement or review Singular agent, router, group, nesting, spawning, handoff, and message runtime behavior on Harness services.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use after graph-contract is fixed.

    line 8
  2. Very specific:

    Read the checked-in Harness type declarations before using an API.

    line 12
  3. Distinctive:

    Do not add fallback agents, silent retries, empty-success results, automatic takeover, or defensive checks for impossible internal states.

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill 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
SKILL.md

Agent Runtime

Use after graph-contract is fixed. Keep runtime behavior in the agent plugin; do not make the graph or web plugin drive an agent loop.

Harness integration

  • Read the checked-in Harness type declarations before using an API. Prefer ctx.agents.create, ctx.agents.resume, ctx.agents.get, ctx.sessions, and the configured session persistence service.
  • A created or resumed agent is the exact live identity. Keep its disposer with the owner that created it. Do not infer authority from ambient initiator state alone.
  • Attach graph ownership and listeners through Cordis effects so unload removes routes, listeners, timers, and live handles in order.
  • Persist agent conversation through the existing session log/persistence path. Do not invent a second session file format.

Router and group rules

  • A router is the leader of exactly one group and the group's public endpoint.
  • Human input enters the router session. The router may dispatch explicit work to members, create a child group, or create standalone agents for independent exploration and comparison.
  • Any agent may spawn another agent. A standalone agent may also continue spawning unless a future contract says otherwise.
  • Creating a group makes the creating agent its router immediately. The graph operation must publish the router and group relationship atomically with the successful runtime creation.
  • A router can be a member of a parent group. Parent members send to that router as to one ordinary node; the parent never reaches through it to hidden child members.
  • A router may finish and become done or idle. Later input resumes the same session. Never silently replace it or elect a backup.

Dispatch

  • Route a message to one explicit endpoint. Group-internal dispatch is the router's decision; do not broadcast by default.
  • A parent-to-child-group message is addressed to the child router. The router may answer the sender directly or dispatch internally according to the runtime contract; preserve sender and receiver ids on the message.
  • Temporary cross-group or cross-root messages do not create graph edges. Give them a durable message/session event only when the product contract requires replay.
  • Handoff records the brief and changes responsibility to the child. The parent may summarize but must not continue the handed-off work.

Failure and lifecycle

  • Boundary schema errors, missing live identities, duplicate ids, invalid transitions, persistence failures, and child-loop failures are errors. Propagate them to the caller and surface them in the UI.
  • Do not add fallback agents, silent retries, empty-success results, automatic takeover, or defensive checks for impossible internal states.
  • Make creation, graph publication, and session attachment one explicit ordered transaction. Never leave a graph node that has no live session or a live session that is not represented by the graph.
  • Dispose in reverse ownership order: stop/drain the agent loop, flush the session, remove runtime registration, then remove graph ownership. Do not delete persisted history as a recovery shortcut.

Runtime tests

Cover one root, multiple roots, router-as-parent-member, nested group routing, standalone fan-out, handoff, same-session resume after done, explicit message routing, and failure propagation. Assert that no hidden member is reachable through a child router and that no temporary message creates a durable edge.

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.