agentleFS
laguagulaguagu/claude-code-nextjs-skills/skills/ai-sdk-6/references/agents.md

claude-code-nextjs-skills / references

AGENTS.md72 starsChanged 17 days agoMITView on GitHub

Use ToolLoopAgent for a reusable in-memory tool loop. It takes instructions, unlike v6 text functions' system option. Configure stopWhen with stepCountIs for the task's budget. Agent construction describes the reusable policy; per-call options describe request-specific data. Verify the installed callOptionsSchema / prepareCall signatures rather than copying v7 runtime/tool context options. Do not put credentials or authorization decisions in model-controlled input. prepareStep can adjust active tools, messages and settings. In v6 its instruction/message overrides are step-local; v7 changes their carry-forward semantics.

The file

We split this agents.md into the rules it gives an agent

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

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    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 ToolLoopAgent for a reusable in-memory tool loop.

    line 3
  2. Common:

    Do not put credentials or authorization decisions in model-controlled input.

    line 10
  3. Very specific:

    Use createAgentUIStreamResponse with uiMessages for an SDK UI route.

    line 16

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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

AI SDK 6 agents

Use ToolLoopAgent for a reusable in-memory tool loop. It takes instructions, unlike v6 text functions' system option. Configure stopWhen with stepCountIs for the task's budget.

Agent construction describes the reusable policy; per-call options describe request-specific data. Verify the installed callOptionsSchema / prepareCall signatures rather than copying v7 runtime/tool context options. Do not put credentials or authorization decisions in model-controlled input.

prepareStep can adjust active tools, messages and settings. In v6 its instruction/message overrides are step-local; v7 changes their carry-forward semantics.

Use createAgentUIStreamResponse with uiMessages for an SDK UI route. Validate/authenticate before execution and infer the agent's UI message type. In-memory execution does not make a run durable across restarts.

Find details in the installed agent docs and ToolLoopAgent source or the v6 agent guide.

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.