Inspiration
Anyone who has managed a customer support team knows the dread of the "morning backlog." Customers submit urgent tickets overnight, but they sit unresolved for hours until human agents log in. This delay causes frustration and hurts customer satisfaction. We realized that with the recent advancements in AI agent pipelines and the introduction of the Model Context Protocol (MCP), we could completely automate Tier-1 support. We wanted to build a system that doesn't just give generic chatbot answers, but actually investigates issues by reading attached logs and querying internal databases—exactly like a human support engineer would.
What it does
NightDesk is a fully autonomous, multi-agent AI pipeline that resolves Tier-1 customer support tickets 24/7. When a ticket arrives, it goes through our pipeline of specialized agents: Triage Agent: Classifies the issue, determines urgency, and assigns a priority score (1-100). Extraction Agent: Uses multimodal AI to read and extract key entities from attached files (like server error logs) and screenshot images. Retrieval Agent: Connects securely to our company's backend via an MCP Client. It intelligently calls tools to search our internal Knowledge Base, pull up the customer's past ticket history, and find similar resolved tickets. Drafting Agent: Synthesizes all this context to write a highly accurate, tailored resolution for the customer, complete with a confidence score and citations. If the confidence is high, it's auto-resolved. If it's a complex edge case, it flags it for human review.
How we built it
We built the backend orchestrator using Python and Flask. The core intelligence of the system is powered by the Anthropic API leveraging their latest LLMs. The most exciting part of our architecture is our use of the Model Context Protocol (MCP). We built a FastMCP server (mcp_server.py) that acts as a secure bridge to our mocked internal databases (Knowledge Base and Ticket Database). Our Retrieval Agent uses the mcp.client.stdio library to interact with this server via JSON-RPC, using a ReAct loop to autonomously decide which tools to call based on the ticket context. For the frontend, we built a custom Glassmorphism UI using HTML, Vanilla CSS, and JavaScript. We added dynamic progressive rendering to visualize the JSON outputs of each agent in real-time as the pipeline processes a ticket.
Challenges we ran into
Agent Handoff & Schema Enforcement: Ensuring that the output of one agent cleanly feeds into the prompt of the next agent was tricky. We solved this by using strict JSON schema validation via Pydantic and Anthropic's tool-calling capabilities to force structured outputs. Integrating MCP: Building the bridge between the Anthropic LLM and the local MCP server required careful management of asynchronous contexts and the ReAct loop (Reasoning and Acting) so the agent could make multiple sequential tool calls before returning a final answer. UI State Management: Visualizing a complex, asynchronous multi-agent pipeline in the UI without relying on heavy frontend frameworks required writing some clever vanilla JavaScript to handle timeouts and progressive loading states.
Accomplishments that we're proud of
Successfully implementing MCP: We are incredibly proud of getting a full MCP Client/Server architecture working. It proves that AI agents can securely access internal enterprise data without exposing the raw databases directly to the prompt. Multimodal Extraction: Building the Extraction Agent to seamlessly handle both plain text .txt logs and base64 encoded .png/.jpg screenshots in the same pipeline. The "Wow" Factor UI: We managed to build a gorgeous, dark-mode Glassmorphism interface from scratch that makes the complex backend processes easy and satisfying to watch.
What we learned
Specialization beats general prompts: We learned that breaking down a complex task (customer support) into a pipeline of smaller, highly specialized agents (Triage -> Extract -> Retrieve -> Draft) yields far more accurate and reliable results than asking a single LLM to do everything at once. The power of the Model Context Protocol: MCP is a game-changer for agentic workflows. It standardizes how AI models connect to data sources, making it incredibly easy to add new tools (like a Jira connector or a Stripe billing tool) without rewriting the core agent logic.
What's next for NightDesk
More MCP Connectors: We want to add native MCP servers for tools like Slack (to notify humans of critical tickets), Stripe (to check billing statuses autonomously), and GitHub (to check if a reported bug is a known issue). Auto-Routing: Building a router that can automatically dispatch complex, flagged tickets to the specific human engineer best equipped to handle them based on their GitHub commit history. Email Integration: Connecting the pipeline directly to an IMAP/SMTP server so customers can just email support@nightdesk.app and get an instant, accurate resolution.
Log in or sign up for Devpost to join the conversation.