Generates a planning checkpoint message for the GAIA agent every few turns.
// Source: https://github.com/ruvnet/ruflo | License: MIT | Copyright 2024-2026 ruvnet // Provided via justclaw.it.com; keep this notice with the code. /** * GAIA Agent — ADR-133-PR3 / ADR-135 (planning interval) * * Multi-turn Anthropic Messages API loop that drives Claude through the * GAIA benchmark questions using a tool-use agent pattern. * * Loop algorithm: * 1. Build initial message with the question and a system prompt that * instructs Claude to output `FINAL_ANSWER: <value>` when done. * 2. Call Anthropic Messages API with the registered tool definitions. * 3. On `stop_reason === 'tool_use'`: execute all tool_use blocks in * parallel, append results as a `user` turn, and repeat. * Every PLANNING_INTERVAL turns, inject a planning-checkpoint text * ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key