AI Research Agent on LangGraph
An agent on LangGraph that autonomously plans searches, simultaneously browsing the web and arXiv, synthesizes responses with sources.
Technically interesting aspects:
— Parallel fan-out/fan-in graph with a reducer on tool_errors (the graph does not crash on provider failure)
— 4-provider search fallback: Tavily → SearchAPI → DuckDuckGo → Wikipedia
— Source-grounded synthesis: refuses to respond without sources (anti-hallucination)
— PostgreSQL persistence with SQLAlchemy + Alembic (4 migrations)
— Robust JSON parsing with code-fence stripping and regex fallback
Stack: LangGraph, FastAPI, PostgreSQL, SQLAlchemy, Alembic, OpenRouter, Tavily, BeautifulSoup, Docker.
Technically interesting aspects:
— Parallel fan-out/fan-in graph with a reducer on tool_errors (the graph does not crash on provider failure)
— 4-provider search fallback: Tavily → SearchAPI → DuckDuckGo → Wikipedia
— Source-grounded synthesis: refuses to respond without sources (anti-hallucination)
— PostgreSQL persistence with SQLAlchemy + Alembic (4 migrations)
— Robust JSON parsing with code-fence stripping and regex fallback
Stack: LangGraph, FastAPI, PostgreSQL, SQLAlchemy, Alembic, OpenRouter, Tavily, BeautifulSoup, Docker.