{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "wanmol-goal-flow--build-code-first-agent-loop",
 "repo": "wanmol/goal-flow",
 "repo_url": "https://github.com/wanmol/goal-flow",
 "repo_slug": "wanmol-goal-flow",
 "title": "Build a code-first agent loop with agent_kit",
 "page_title": "How to build a code-first agent loop with agent_kit with Goal Flow",
 "summary": "Use the vendored agent_kit SDK to create a ReAct or custom agent and run it inside a graph node.",
 "who": "A Python developer who needs an agent that calls tools, routes between models, and uses skills, without a visual editor.",
 "problem": "Plain workflow graphs cannot express open-ended tool-using loops, and building one from scratch takes time.",
 "outcome": "A working agent defined in code, with middleware and skills, that can be hosted by a graph node in the GoalFlow engine.",
 "steps": [
  "Run `git clone` on the goalflow repository and `cd goalflow`.",
  "Run `pip install -e .`.",
  "Read docs/agent-kit.md and choose the ReAct, Deep, or custom loop you need.",
  "Import the Agent class from the agent_kit package under src/agent_kit/ and define your agent with the middleware and skills you want. (inferred, check the README)",
  "Attach the agent to a graph node that uses agent_base.py in src/goalflow/node/."
 ],
 "agent_prompt": "In the goalflow repo, create a ReAct agent with agent_kit under src/agent_kit/ that answers questions about <topic> using the skills in skills/. Save the code to <output-path>.py. Verify that the agent imports cleanly and report which middleware and model routing options you configured.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "2 hours",
 "basis": "readme",
 "caveat": "The README names agent_kit and its loop types but gives no code sample, so check docs/agent-kit.md for the real class and method names before writing code.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "Python 3.12",
  "Redis (cluster or standalone) and MySQL",
  "A cloned copy of the goalflow repository and a filled-in .env file copied from .env.example",
  "A Dify DSL export (.yml) if you want to transpile a visual flow"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/wanmol-goal-flow/build-code-first-agent-loop/",
 "md": "https://dedupedai.com/use-cases/wanmol-goal-flow/build-code-first-agent-loop/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/wanmol-goal-flow--build-code-first-agent-loop.json",
 "api_version": "v1"
}
