https://sivas-multi-agent-api.onrender.com/docs
Submission for Hack2Skill Hackathon (Track 3)
This project is a multi-agent AI system designed to help users manage tasks, schedules, and information by interacting with multiple tools and data sources. It is deployed as a fully functional API using FastAPI.
- Live API URL: [Insert your Render URL here, e.g., https://my-agent.onrender.com/docs]
- Demo Video: [Insert link to your YouTube/Drive demo video here]
- Primary Agent Coordination: A Primary Orchestrator agent receives user prompts and routes them to the appropriate sub-agents.
- Sub-Agents: Features specialized sub-agents (Database Manager and Calendar Manager) to execute distinct workflows.
- Structured Database: Integrates an SQLite database (
hackathon.db) to store, retrieve, and track generated tasks. - Tool Integration (MCP-style): Agents are equipped with specific functional tools to mock external interactions (e.g., calendar scheduling).
- API-Based Deployment: The entire system is wrapped in a FastAPI application, allowing external platforms to trigger multi-step workflows via standard HTTP POST requests.
- Language: Python 3
- API Framework: FastAPI & Uvicorn
- Database: SQLite
- Agent Logic: Custom LLM routing logic / Pydantic
-
Clone the repository:
git clone https://github.com/your-username/your-repo-name.git cd your-repo-name -
Install dependencies: Make sure you have Python installed, then install the required packages using pip:
pip install -r requirements.txt
(Requirements included:
fastapi,uvicorn,pydantic,requests) -
Set up Environment Variables (Optional): The application uses OpenAI's API to power the primary agent router. If an API key is not provided, it falls back to a mock agent behavior for testing.
# On Windows (PowerShell) $env:OPENAI_API_KEY="your-api-key-here"
# On Linux/macOS export OPENAI_API_KEY="your-api-key-here"
-
Start the API server: Run the application using Uvicorn from the project directory:
uvicorn main:app --reload
-
Test the API: Open your browser and navigate to
http://127.0.0.1:8000/docsto use the built-in Swagger UI.
This is the primary endpoint to interact with the multi-agent system.
Request Body (JSON):
{
"user_request": "Schedule a hackathon review meeting for tomorrow, and save a task to submit the project files."
}Expected Response (JSON):
{
"status": "success",
"original_message": "Schedule a hackathon review meeting for tomorrow, and save a task to submit the project files.",
"agent_response": "Success: Saved 'Demo Video' to database. | Success: Scheduled event 'Hackathon Review'."
}- User Request -> Sent via POST to
/execute_task. - Primary Agent (Router) -> Analyzes the intent of the prompt.
- Delegation -> Routes to:
- Database Sub-Agent: Extracts task data and writes it to SQLite.
- Calendar Sub-Agent: Extracts event data and processes the schedule.
- Response Aggregation -> The primary agent combines the tools' outputs and returns a final success confirmation to the user.