YAAAF (Yet Another Amazing Agentic Framework) - A modular framework for building intelligent agentic applications with Python backend and Next.js frontend
Project description
YAAAF - Yet Another Amazing Agentic Framework
YAAAF is a modular framework for building intelligent agentic applications with both Python backend and Next.js frontend components. The system features an orchestrator pattern with specialized agents for different tasks like SQL queries, web search, visualization, machine learning, and reflection.
๐ Key Features
- ๐ค Modular Agent System: Specialized agents for SQL, visualization, web search, ML, RAG, and more
- ๐ฏ Orchestrator Pattern: Central coordinator that intelligently routes queries to appropriate agents
- โก Real-time Streaming: Live updates through WebSocket-like streaming with structured Note objects
- ๐ Artifact Management: Centralized storage for generated content (tables, images, models, etc.)
- ๐ Modern Frontend: React-based UI with real-time chat interface and agent attribution
- ๐ง Extensible: Easy to add new agents and capabilities with standardized interfaces
- ๐ท๏ธ Tag-Based Routing: HTML-like tags for intuitive agent selection (
<sqlagent>,<visualizationagent>, etc.)
๐๏ธ Architecture Overview
โโโโโโโโโโโโโโโโโโโ HTTP/REST โโโโโโโโโโโโโโโโโโโโ
โ Frontend โ โโโโโโโโโโโโโโโโบ โ Backend โ
โ (Next.js) โ โ (FastAPI) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโ
โ Orchestrator โ
โ Agent โ
โโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ SQL Agent โ โ Visualization โ โ Web Search โ
โ โ โ Agent โ โ Agent โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Centralized โ โ Artifact โ โ Storage โ
โ Artifact Storageโ โ Management โ โ System โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
๐ Quick Start
Installation & Setup
# Clone the repository
git clone <repository-url>
cd agents_framework
# Install Python dependencies
pip install -r requirements.txt
# Install frontend dependencies
cd frontend
pnpm install
cd ..
Running YAAAF
Start the backend server (default port 4000):
python -m yaaaf backend
Start the frontend server (default port 3000):
python -m yaaaf frontend
Or specify custom ports:
python -m yaaaf backend 8080
python -m yaaaf frontend 3001
First Steps
- Open your browser to
http://localhost:3000 - Start chatting with the AI system
- Try these example queries:
- "How many records are in the database?"
- "Create a visualization of the sales data"
- "Search for recent AI developments"
- "Analyze customer demographics and show trends"
๐ค Available Agents
| Agent | Purpose | Usage Tag | Capabilities |
|---|---|---|---|
| OrchestratorAgent | Central coordinator | <orchestratoragent> |
Routes queries, manages flow |
| SqlAgent | Database queries | <sqlagent> |
Natural language to SQL, data retrieval |
| VisualizationAgent | Charts & graphs | <visualizationagent> |
Matplotlib visualizations from data |
| WebSearchAgent | Web search | <websearchagent> |
DuckDuckGo search integration |
| ReflectionAgent | Planning & reasoning | <reflectionagent> |
Step-by-step problem breakdown |
| RAGAgent | Document retrieval | <ragagent> |
Retrieval-augmented generation |
| MleAgent | Machine learning | <mleagent> |
sklearn model training & analysis |
| ReviewerAgent | Data analysis | <revieweragent> |
Extract insights from artifacts |
| ToolAgent | External tools | <toolagent> |
MCP (Model Context Protocol) integration |
๐ก Example Usage
Simple Query
from yaaaf.components.orchestrator_builder import OrchestratorBuilder
from yaaaf.components.data_types import Messages
orchestrator = OrchestratorBuilder().build()
messages = Messages().add_user_utterance("How many users are in the database?")
response = await orchestrator.query(messages)
Multi-Agent Workflow
# Step 1: Get data
data_query = "Get sales data for the last 12 months"
data_response = await orchestrator.query(Messages().add_user_utterance(data_query))
# Step 2: Visualize
viz_query = f"Create a chart showing trends: {data_response}"
chart_response = await orchestrator.query(Messages().add_user_utterance(viz_query))
Frontend Integration
// Real-time chat with agent attribution
const note = {
message: "Query results show 1,247 users",
artefact_id: "table_abc123",
agent_name: "sqlagent"
}
// Displays as: <sqlagent>Query results show 1,247 users</sqlagent>
// <Artefact>table_abc123</Artefact>
๐ ๏ธ Development
Backend Development
# Run tests
python -m unittest discover tests/
# Code formatting
ruff format .
ruff check .
# Start with debugging
YAAAF_DEBUG=true python -m yaaaf backend
Frontend Development
cd frontend
# Development server
pnpm dev
# Type checking
pnpm typecheck
# Linting & formatting
pnpm lint
pnpm format:write
# Build for production
pnpm build
๐ Data Flow
- User Input: Query submitted through frontend chat interface
- Stream Creation: Backend creates conversation stream
- Orchestration: OrchestratorAgent analyzes query and routes to appropriate agents
- Agent Processing: Specialized agents process their portions of the request
- Artifact Generation: Agents create structured artifacts (tables, images, etc.)
- Note Creation: Results packaged as Note objects with agent attribution
- Real-time Streaming: Notes streamed back to frontend with live updates
- UI Rendering: Frontend displays formatted responses with agent identification
๐ง Configuration
Environment Variables
YAAAF_CONFIG: Path to configuration JSON fileANTHROPIC_MODEL: Default model (e.g., "qwen2.5:32b")
Configuration File
{
"model": "qwen2.5:32b",
"temperature": 0.4,
"max_tokens": 1000,
"query_suggestions": [
"How many records are in the database?",
"Show me a visualization of the data",
"Search for recent news about AI"
]
}
๐ Documentation
Comprehensive documentation is available in the documentation/ folder:
cd documentation
pip install -r requirements.txt
make html
open build/html/index.html
Documentation includes:
- ๐ Getting Started Guide
- ๐๏ธ Architecture Overview
- ๐ค Agent Development Guide
- ๐ API Reference
- ๐ Frontend Development
- ๐ป Development Practices
- ๐ Usage Examples
๐งช Testing
# Backend tests
python -m unittest discover tests/
# Specific agent tests
python -m unittest tests.test_sql_agent
python -m unittest tests.test_orchestrator_agent
# Frontend tests
cd frontend
pnpm test
๐ค Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Follow code style: Run
ruff format .andpnpm format:write - Add tests: Ensure new features have test coverage
- Update docs: Add documentation for new features
- Submit PR: Create a pull request with clear description
๐ Requirements
Backend:
- Python 3.11+
- FastAPI
- Pydantic
- pandas
- matplotlib
- sqlite3
Frontend:
- Node.js 18+
- Next.js 14
- TypeScript
- Tailwind CSS
- pnpm
๐ License
[Add your license information here]
๐ Support
- ๐ Documentation: Check the
documentation/folder - ๐ Issues: Report bugs via GitHub Issues
- ๐ฌ Discussions: Join GitHub Discussions for questions
- ๐ง Contact: [Add contact information]
YAAAF - Building the future of agentic applications, one intelligent agent at a time! ๐
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yaaaf-0.0.3.tar.gz.
File metadata
- Download URL: yaaaf-0.0.3.tar.gz
- Upload date:
- Size: 32.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6fc6d7bfcc9e5f43b951193d14e01c2a3ddb482f071e3698eb84e7ebbe25214
|
|
| MD5 |
cd2e8194d9f32426c986abcb3363ed26
|
|
| BLAKE2b-256 |
767ef8dfb788b1099541dcf2690431000d7e42a4fdafe7976ae02275b3dc0a88
|
File details
Details for the file yaaaf-0.0.3-py3-none-any.whl.
File metadata
- Download URL: yaaaf-0.0.3-py3-none-any.whl
- Upload date:
- Size: 43.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8f25bca0d76a0f4da0f849d8def7b5a89c426054884ba1da124ff1bc41f5d84
|
|
| MD5 |
1afd472fe677627f39e7a4df195a0db1
|
|
| BLAKE2b-256 |
10a90ef05cb0b9e4ab59f0135a57ece566611c4bedcd357ede0eed225324f3c1
|