Synapse is a hackathon prototype: you describe a delivery problem in plain English, and a Gemini agent plans the fix, calls a set of simulated logistics tools and shows its reasoning on a dashboard. Three of us built it in four days in August 2025. The agent was my teammate's work, and I turned it into a web service with a dashboard and a deployment.

What it is

A LangChain agent on Gemini with 17 tools in four groups: logistics, customer, disputes and delivery verification. You type something like "Customer C890 says the driver never came, but the order was marked failed." The agent checks the driver's location, messages the customer and offers a reschedule, and each step appears on the dashboard.

The tools are simulated. None of them touches a real delivery, payment or maps system. They return canned or random results, so the demo can show decisions without real orders.

  1. Scenario
    A delivery problem, in plain English
  2. Agent
    Gemini plans the steps and picks tools
  3. Tool API
    17 simulated tools over HTTP
  4. Dashboard
    Reasoning, tool calls and results

Why it mattered

Last-mile delivery fails in small, specific ways: a kitchen running 40 minutes late, a "failed" delivery to a customer who was home all day, a spilled drink and a refund dispute. Each one means checking several systems and deciding what's fair. The "Agentic AI" hackathon (14–17 August 2025) asked whether an agent could plan that sequence and explain every step.

My part

Om Singh Bais (osmium1) wrote the agent: the LangChain loop, all 17 tools, the system prompt with its if-then rules, and a command-line demo. Saksham Chauhan took the screenshots and wrote the walkthrough. On the last day I took the command-line demo and made it usable in a browser, in three pull requests:

  • Packages. I split the single main.py and tools.py into packages for the agent, the tools, the server and utilities, with one tool registry per domain. The CLI, the server and the dashboard all read the same tool list.

  • The tool server. A FastAPI app with /health, /tools, POST /tools/{name} and POST /agent/execute, plus a small async Python client.

  • The dashboard. A Next.js app with an agent console and ready-made scenarios, the execution history, stats and a tool-usage chart. Its API routes call the tool server from the server side, so the browser never deals with CORS.

  • Deployment. A Docker image on a Hugging Face Space, redeployed by a GitHub Action on every push, and the dashboard on Vercel.

That came to about 4,600 added lines, not counting the lockfile. Part of it is osmium1's code moved into the new layout.

Synapse's agent console with sample disruption scenarios
The agent console, with ready-made scenarios
An execution record: the scenario, the agent's reasoning and the tools it called
Execution history: the reasoning and each tool call
The dashboard: cases handled, resolution rate, system status and tool usage
The dashboard, from the hackathon demo

What was hard

Showing the agent's work. LangChain's AgentExecutor returns only the final answer, but the point of the demo was the steps. I attached a callback handler that records every tool call with its arguments, result or error, and the server returns that list beside the reasoning. If a call slipped past the callbacks, the server ran the tool again to fill in the result. With simulated tools that was harmless. With real ones it could send a customer two messages, so I wouldn't keep it.

Hosting with no budget. The Python agent went into a Docker image on a free Hugging Face Space, and the dashboard went to Vercel. A GitHub Action force-pushes the repo to the Space, so one merge redeploys both halves.

The name. I put the server in a folder called mcp and we called it an MCP server, but it's a plain HTTP API, and Model Context Protocol clients can't connect to it. I've corrected that here and in the README. Next time I'd wrap the same tool registry with the official MCP SDK first.

Where it landed

It was a four-day hackathon entry, and nobody has worked on it since August 2025. The dashboard still loads, and the tool server still answers /health with its 17 tools. The agent fails today: its Gemini API key is no longer valid, and the model it was pinned to, gemini-1.5-pro-latest, has been retired. Reviving it needs a new key and a one-line model change.

Before anyone used it for real, it would also need authentication and rate limits on /agent/execute, one long-lived agent instead of a new one per request, and tools that call real systems.