NovaCorp Operations Assistant
A multi-agent operations assistant that answers business questions by searching local documents and order records.
README
NovaCorp Operations Assistant
MCP + CrewAI — Week 14 Mini-Project (Futurense AI Clinic)
A multi-agent operations assistant that answers business questions by searching local documents and order records. Built with FastMCP (MCP server) and CrewAI (agents). Runs locally with a free/local LLM — no paid API required.
What It Does
Given a natural-language question, a crew of three agents:
- Researcher — searches NovaCorp's policy docs, product notes, and support tickets; reads order records by ID
- Writer — synthesises evidence into a sourced markdown report saved to
outputs/ - Critic — cross-checks every claim in the report against the retrieved evidence
Every answer cites its source. If no evidence is found, the agent says so rather than guessing.
Project Structure
.
├── data/
│ ├── documents/ # 10 NovaCorp policy/product/ticket docs
│ └── records.csv # 23-row orders dataset
├── mcp_server/
│ └── server.py # FastMCP server: 3 tools + 1 resource
├── crew/
│ ├── agents.py # Researcher, Writer, Critic agents
│ ├── tasks.py # Task definitions
│ └── main.py # Crew entry point (CLI)
├── tests/
│ ├── test_tools.py # Unit tests (no server needed) — 18 passing
│ └── test_crew_e2e.py # End-to-end crew test
├── examples/ # 3 sample Q&A outputs with Critic verdicts
├── traces/ # Auto-saved run traces (JSON + MD)
├── outputs/ # Reports written by save_report tool
├── docs/ # Original assignment brief
├── .env.example # Copy to .env — no secrets committed
├── ai_usage_log.md # AI tool usage + real bugs found
├── decision_log.md
├── reflection.md
└── requirements.txt
Quick Start (Fresh Clone)
1. Clone and install dependencies
git clone <repo-url>
cd <repo-folder>
pip install -r requirements.txt
2. Configure your LLM
Copy .env.example to .env and choose one LLM backend:
Option A — Ollama (recommended, fully local & free)
# Install Ollama from https://ollama.com, then pull the model:
ollama pull llama3.2:3b
# Then:
cp .env.example .env # already configured for llama3.2:3b
Option B — Groq (free tier, cloud)
cp .env.example .env
# Edit .env: uncomment GROQ_API_KEY and set your key from console.groq.com
Option C — OpenAI (paid)
cp .env.example .env
# Edit .env: uncomment OPENAI_API_KEY and set your key
3. Run the crew
python crew/main.py "What is the return policy for damaged goods?"
python crew/main.py "What is the status of order ORD-0021?"
python crew/main.py "What warranty does the NX-500 carry?"
The crew will:
- Connect to the MCP server automatically over stdio
- Search documents and/or read order records
- Write a sourced report to
outputs/ - Save a run trace to
traces/ - Ask for your approval before writing the report (unless
AUTO_APPROVE=truein.env)
Inspect the MCP Server
Open the MCP Inspector to verify all tools and the resource are registered:
npx @modelcontextprotocol/inspector python mcp_server/server.py
You should see three tools (search_documents, read_record, save_report) and one resource (documents://list).
Run Tests
# Unit tests — no LLM needed
pytest tests/test_tools.py -v
# End-to-end test — requires a running LLM
pytest tests/test_crew_e2e.py -v
Environment Variables
| Variable | Default | Description |
|---|---|---|
OLLAMA_MODEL |
ollama/llama3.2:3b |
Ollama model to use |
OLLAMA_BASE_URL |
http://localhost:11434 |
Ollama endpoint |
GROQ_API_KEY |
(unset) | Groq API key — overrides Ollama if set |
GROQ_MODEL |
groq/llama3-70b-8192 |
Groq model |
OPENAI_API_KEY |
(unset) | OpenAI key — overrides Ollama if set |
OPENAI_MODEL |
openai/gpt-4o-mini |
OpenAI model |
AUTO_APPROVE |
false |
Skip human approval gate for save_report |
USE_HIERARCHICAL |
false |
Use CrewAI hierarchical (manager) process |
Stretch Features Implemented
| Feature | How |
|---|---|
| Human approval gate | save_report writes approval prompt to stderr; operator creates outputs/.approve to allow (or set AUTO_APPROVE=true) |
| Self-check / Critic | Third agent verifies Writer's claims against evidence using search_documents |
| Observability | Every run saves traces/trace_*.json + traces/run_report_*.md with timing |
| Hierarchical process | Set USE_HIERARCHICAL=true for manager + worker process via Process.hierarchical |
Security Notes
- All tool inputs validated with Pydantic; path traversal attempts are rejected
- No secrets committed — use
.envonly (never.env.examplewith real keys) save_reportrequires explicit human approval before writing to disk- MCP server runs over stdio — only trusted local processes connect to it
max_iter=5on all agents prevents runaway loops
Sample Questions
"What is the return policy for damaged goods?""What is the status of order ORD-0021?""What warranty does the NX-500 carry and what is its price?""What was the resolution for support ticket #0019?""When should a support ticket be escalated to Tier 3?"
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.