Inspiration

I study at an IB school, and IB is built around research — extended essays, internal assessments, constant source-gathering and citing. Doing that well takes a lot of time, and I kept wishing I had something that could speed up the research process without just handing me confident-sounding text I couldn't trust. Most AI tools are fast but not honest about what they actually know versus what they're guessing. I wanted to build something that was both: fast and willing to check its own claims before showing them to me.

What it does

Synapse takes a research topic and runs it through six specialized AI agents, each handling one stage of the process: a Planner breaks the topic into focused sub-questions, a Search agent looks them up on the web, a Summarizer writes a grounded summary of what it finds, a Fact Checker cross-checks every claim against the original sources, a Correction agent fixes or removes anything that didn't hold up, and a Writer assembles everything into a final cited report.

The other half of the project is how it's distributed: Synapse is a bring-your-own-key (BYOK) app that runs entirely on your own computer, packaged as a standalone executable. You choose your own AI provider (OpenAI, Groq, Gemini, or anything OpenAI-compatible) and your own search provider, enter your own API key, and that key never leaves your device — it's sent only to the provider you chose, never to any server of mine, because there isn't one.

How I built it

The whole thing is Python. The six agents are wired together with LangGraph, which models the pipeline as an explicit state graph — each agent reads from and writes to one shared state object, which made it much easier to reason about than a looser "agents talking to each other" setup would have been. A single OpenAI-compatible client wrapper lets every agent call OpenAI, Groq, or Gemini interchangeably just by changing configuration, not code. Search is handled behind its own interface too, so it can run on free DuckDuckGo results or swap to Tavily for higher-quality, already-extracted content.

The UI is built with Flet, a pure-Python framework that renders as a real native window instead of a browser tab — important because it packages cleanly into a standalone app. I used PyInstaller (via Flet's flet pack) to turn the whole thing into an executable, and set up a GitHub Actions build matrix so it compiles natively on Windows, macOS, and Linux runners in parallel, since PyInstaller can't cross-compile from one OS to another.

Challenges I ran into

Frontend design was genuinely not territory of me, so getting Flet's UI to feel usable rather than just functional took real trial and error.

The packaging step caused the strangest bug of the whole project: my entry file used relative imports (from .config import ...), which worked fine in development but crashed the second I ran the packaged executable — PyInstaller runs the entry script with no package context, so the relative import had nothing to resolve against. It built without a single error and only failed at launch, which made it confusing to track down. The fix was a one-line launcher script outside the package that imports the app as a proper module instead of running it directly.

I also caught a few bugs in my own agent logic that were easy to miss because they failed silently rather than crashing: a correction step that called the AI but never actually used the response it got back, and a fact-checker that would quietly default to "no issues found" if its JSON output didn't parse cleanly, instead of flagging that something had gone wrong. Both looked fine on a casual read-through and both were actively making the output worse.

Accomplishments that I'm proud of

Getting a real multi-agent pipeline working end-to-end — not a toy demo, but one that genuinely fact-checks its own output before writing the final report (according to my judgment). I'm also proud of catching and fixing the bugs above myself once they were pointed out, and of getting a single codebase to package into a working executable on three different operating systems through CI rather than needing three different machines.

What I learned

How LangGraph's state-graph model actually works in practice, not just in theory. How fragile "the AI will return valid JSON" is as an assumption, and why enforcing structured output and handling parse failures explicitly matters. A handful of very specific PyInstaller lessons (relative imports, per-OS icon formats, why cross-compiling isn't a thing) that I will absolutely carry into future projects. And maybe the biggest lesson: AI-assisted code can look completely correct at a glance, it runs, it doesn't error — while quietly doing nothing useful, like an agent that makes a real API call and then discards the response. Reading code for whether it runs and reading it for whether it works turned out to be two different skills.

What's next for Synapse

  • Fetching full page content during search instead of relying on short snippets, for richer and more accurate summaries
  • Letting the Fact Checker trigger a second, targeted search when evidence is genuinely insufficient, instead of only working with what was already retrieved
  • A lighter-weight settings flow for switching between AI providers and models without re-entering configuration each time
  • Basic automated tests running in CI alongside the build, so regressions get caught before a release ships

Built With

Share this project:

Updates