How lordpba/ai_magi works
MAGI is a Gradio-based multi-agent question-analysis application. A user submits a question and provider settings through the web interface; the interface streams logs and status while the core configures a model, creates three perspective agents and their tasks, runs a CrewAI crew, and returns its result. The README also documents a CLI entry point and optional local Ollama and search support. The graph focuses on the current src implementation; some interface-to-core details fall in omitted excerpts, so that link is documented by the source index and README workflow.
Main entry points: Main_core_002.py Analysis Orchestrator · magi_web_interface.py Query Streaming
Components 13
User Interface
- Gradio Interface
src/magi_web_interface.py - Query Streaming
src/magi_web_interface.py - Analysis Result
src/Main_core_002.py
Analysis Core
- Analysis Orchestrator
src/Main_core_002.py - Model Setup
src/Main_core_002.py - Perspective Agents
src/Main_core_002.py - Analysis Tasks
src/Main_core_002.py - Crew Executor
src/Main_core_002.py
External Services
- Groq LLM
- OpenAI LLM
- Ollama LLM
- Serper Search
Other components
- Questioner
Connections 13
- Questioner → Gradio Interface: submits question
README.md - Gradio Interface → Query Streaming: routes analysis
src/magi_web_interface.py - Query Streaming → Analysis Orchestrator: runs analysis
src/magi_web_interface.py - Analysis Orchestrator → Model Setup: configures model
src/Main_core_002.py - Model Setup → Groq LLM: selects provider
src/Main_core_002.py - Model Setup → OpenAI LLM: selects provider
src/Main_core_002.py - Model Setup → Ollama LLM: configures model
src/Main_core_002.py - Analysis Orchestrator → Perspective Agents: creates agents
src/Main_core_002.py - Perspective Agents → Serper Search: uses search
src/Main_core_002.py - Analysis Orchestrator → Analysis Tasks: creates tasks
src/Main_core_002.py - Analysis Orchestrator → Crew Executor: executes crew
src/Main_core_002.py - Crew Executor → Analysis Result: returns analysis
src/Main_core_002.py - Analysis Result → Query Streaming: formats output
src/magi_web_interface.py