Who it is forA Python developer who needs an agent that calls tools, routes between models, and uses skills, without a visual editor.
The problemPlain workflow graphs cannot express open-ended tool-using loops, and building one from scratch takes time.
The outcomeA working agent defined in code, with middleware and skills, that can be hosted by a graph node in the GoalFlow engine.
What you need first
- 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
Steps
- Run
git cloneon the goalflow repository andcd 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/.
Prompt for your agent
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.
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.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for wanmol/goal-flow and "Build a code-first agent loop with agent_kit"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer