What problem does it solve?
This Skill provides a production-ready FastAPI backend to handle AI-powered chat conversations, persist conversations, and orchestrate MCP tool execution for Todo-style chatbots.
Core Features & Use Cases
- Chat Endpoint: Stateless API to process user messages and return AI responses with optional tool calls.
- Request/Response Models: Clear schemas for chat requests and structured responses including tool call logs.
- Database Models: Lightweight persistence for conversations and messages enabling history-aware interactions.
- Chat Service: Orchestrates conversation lifecycle, history retrieval, and agent execution.
- Agent Integration: Integrates OpenAI Agents SDK to drive task automation via MCP tools, returning tool results and final responses.
Quick Start
Install dependencies and start the FastAPI server. For example, install the package, set OPENAI_API_KEY, and run the app with Uvicorn:
- Install dependencies: pip install -e .
- Set environment variables: OPENAI_API_KEY, OPENAI_MODEL, DATABASE_URL
- Run the app: uvicorn app.main:app --reload
You can then access API docs at http://localhost:8000/docs