_ _____ ______ _ _ _
/\ | | / ____| ____| \ | (_)
/ \ __ _ ___ _ __ | |_| | __| |__ | \| |_ _ _ ___
/ /\ \ / _` |/ _ \ '_ \| __| | |_ | __| | . ` | | | | / __|
/ ____ \ (_| | __/ | | | |_| |__| | |____| |\ | | |_| \__ \
/_/ \_\__, |\___|_| |_|\__|\_____|______|_| \_|_|\__,_|___/
__/ |
|___/
AgentGENius is a powerful AI agent framework, built on top of Pydantic AI, that enables intelligent task execution and automation through a combination of natural language processing and modular tool integration (also auto-generated).
- Intelligent Task Management: Breaks down complex tasks into manageable subtasks
- Built-in Tools: Comprehensive set of built-in tools for file operations, web searches, and system interactions
- Task History: Maintains a history of executed tasks and their results
- Extensible Architecture: Easy integration of new tools and capabilities
- Streamlit Interface: Example web interface for interacting with the agent
- Clone the repository:
git clone https://github.com/MicPec/AgentGENius.git
cd AgentGENius
- Create and activate a virtual environment:
uv sync
- Add API keys to the
.env
file:
OPENAI_API_KEY="sk-proj-****"
TAVILY_API_KEY="tvly-****"
Those two keys can be obtained from the OpenAI API and Tavily API websites.
- Start the CLI chat application:
uv run example.py
- Start the Streamlit interface:
uv run streamlit run streamlit_app.py --server.headless=true
-
Open your browser and navigate to the displayed URL (typically http://localhost:8501)
-
Enter your queries in natural language and let AgentGENius handle the rest!
The following diagram shows the high-level architecture and flow of AgentGENius:
graph TB
User((User)) --> |Query| AG[AgentGENius]
AG --> QA[Question Analyzer]
subgraph Processing [Task Processing]
QA --> Tasks[Subtasks]
Tasks --> TM[Tool Manager]
TM --> |Existing Tools| TR[Task Runner]
TM --> |New Tool Needed| TC[Tool Coder]
TC --> |Generated Tool| TR
TR --> |Task Results| AGG[Aggregator]
end
AGG --> Response[Response]
Response --> User
Response -.-> History
subgraph Support [Supporting Systems]
Tools[Tool Registry]
History[Task History]
end
TC --> Tools
Tools -.-> TM & TR
History -.-> AGG & QA
style User fill:#373,color:#fff
style AG fill:#22e,color:#fff
style Response fill:#b33,color:#fff
The flow consists of several key components:
- Question Analyzer: Breaks down user queries into manageable subtasks
- Tool Manager: Identifies and manages tools needed for each task
- Tool Coder: Generates new tools when required
- Task Runner: Executes tasks using available tools
- Aggregator: Combines task results into coherent responses
Supporting components include:
- Task History: Maintains conversation context
- Tool Registry: Manages available tools and their definitions
- Callback System: Provides real-time status updates (not on the diagram for readability)
AgentGENius/
├── agentgenius/ # Core package
│ ├── main.py # Main agent implementation
│ ├── builtin_tools.py # Built-in tool definitions
│ ├── config.py # Configuration settings
│ └── ...
├── history/ # Task history storage
├── streamlit_app.py # Example Streamlit web interface
├── example.py # Example CLI chat application
└── pyproject.toml # Project dependencies
Tools generated by AgentGENius are stored in the {TEMP}/agentgenius/tools
directory.
This project is licensed under the MIT License - see the LICENSE file for details.