flux-agent is a sophisticated multi-agent system built using the Strands Agents SDK. It features a "write-review-improve" feedback loop and integrates external tools via the Model Context Protocol (MCP).
- Multi-Agent Orchestration: Uses a
GraphBuilderto coordinate awriter,checker(quality evaluator), andfinalizer. - Feedback Loops: Implements a cycle where content is written, checked, and sent back for revision if it doesn't meet quality standards.
- MCP Integration: The
writeragent can use external tools likemcp-server-fetchto retrieve real-time information from the web. - Modular Tooling: Tools are abstracted into a dedicated
app/toolsdirectory for easy extensibility. - Ollama Integration: Runs locally using Ollama (defaulting to
llama3.1:latest).
app/workflow.py: Defines the graph structure, node transitions, and agent roles.app/quality_checker.py: A custom multi-agent node that determines if content is ready for finalization or needs another iteration.app/tools/:web_tools.py: Manages the MCP connection to the fetch server.__init__.py: Provides a central registry for all available tools.
app/runner.py: A CLI interface for interacting with the workflow.
- Ollama: Ensure Ollama is installed and running with
llama3.1pulled:ollama pull llama3.1
- uv: This project uses
uvfor lightning-fast Python package management. Install uv.
Clone the repository and install dependencies:
uv syncLaunch the interactive CLI:
uv run main.pydemo: Generates a haiku about programming loops (standard workflow test).tool: Fetches content from a URL and summarizes it (MCP tool test).exit: Gracefully close the application.
The writer agent is equipped with an MCPClient. When you ask for web content, the agent automatically:
- Connects to the
mcp-server-fetchviauvx. - Calls the
fetchtool with the provided URL. - Receives the content and incorporates it into the response.
- Sends the draft to the
checkerto start the review loop.
MIT