How john-adeojo/graph_websearch_agent works
Project type and purpose
• This is a Python-based, full-stack agent framework that provides a chat UI (via Chainlit) for interactive web searches.
• It implements a graph-based reasoning engine (“LangGraph”) (agent_graph/graph.py) that orchestrates multiple LLM models, tools, and states to fulfill user queries.
File structure
• Top-level components:
• .chainlit/ and app/ – Chainlit UI configuration and entrypoint (app/app.py, app/chat.py).
• agent_graph/ – Core graph logic to assemble and traverse reasoning steps.
• agents/ – Agent definitions and orchestration (agents/agents.py).
• models/ – Wrappers for different LLM providers (OpenAI, Gemini, Claude, Groq, VLLM, Ollama).
• tools/ – External utilities (web scraper, Google Serper).
• states/ – State machine for tracking the agent’s reasoning state.
• prompts/ – Prompt templates for LLM calls.
• config/ – Configuration (config.yaml) for API keys and settings.
• utils/ – Helper functions and tests.
• Deployment scripts: run_linux.sh, run_windows.ps1.
• Documentation and schema: schema_diagram/LanGraph.png, chainlit.md.
README for additional insights
• The system relies on external LLM APIs and a local Ollama server (optional).