MOA-DeepOutputs orchestrates multiple LLM agents in a layered "panel discussion" to produce traceable, in-depth analyses ("DeepOutputs") and a concise final answer.
- Why? To empower prompt engineers and developers who value transparency, by revealing hypotheses, critiques, and syntheses before concluding.
- How? By running a multi-layer agent pipeline, each with distinct roles, and generating detailed Markdown reports for every run.
| Component | Technology |
|---|---|
| Language | Python 3.11+ |
| Core Libraries | httpx, python-dotenv |
| AI / APIs | OpenRouter |
| Concurrency | asyncio |
| Package Manager | pip |
Minimum versions: PythonΒ 3.11+.
This project forks AI-MickyJ/Mixture-of-Agents with key improvements:
- OpenRouter integration for unified LLM access
- Focus on multi-agent DeepOutput generation
- Removed Docker; uses Python
venvorconda - Enhanced
.envconfig for keys, models, layers - Improved logging with detailed Markdown reports and tracing
- Multi-layer agent pipeline with configurable depth
- Distinct agent roles: initial response, aggregation, synthesis, devil's advocate, finalization
- Swap LLM models per role via
.envconfiguration - Generates detailed Markdown DeepOutput reports for full transparency
- Provides a concise synthesized final answer
- Includes run-specific logs and tracing for debugging and observability
flowchart TD
A[Read prompt.txt & .env Config] --> B{Layered Processing}
B --> C[Initial Agent Responses]
C --> D[Agent Aggregation & Peer Review]
D --> E[Synthesis & Devil's Advocate]
E --> B
B --> F[Final Agent Synthesis]
F --> G[Save Reports & Logs]
style A fill:#cceeff,stroke:#333333,color:#111111
style B fill:#fffacd,stroke:#333333,color:#111111
style C fill:#ffddcc,stroke:#333333,color:#111111
style D fill:#ffddcc,stroke:#333333,color:#111111
style E fill:#ffddcc,stroke:#333333,color:#111111
style F fill:#bbf7d0,stroke:#333333,color:#111111
style G fill:#eeeeee,stroke:#333333,color:#111111
π MOA-DeepOutputs
ββ deepoutputs_engine/ # Core engine logic and agents
β ββ agents/ # Agent implementations
β ββ config.py # Configuration loading
β ββ main.py # Main workflow entrypoint
β ββ prompts.py # Prompt building logic
β ββ reports.py # Report generation
β ββ tracing.py # Workflow tracing
β ββ utils.py # Utility functions
ββ prompt.txt # Input prompt file for the engine
ββ requirements.txt # Python dependencies
ββ .env.example # Example environment variables
ββ .gitignore # Specifies intentionally untracked files
ββ LICENSE # Project license
ββ README.md # This file
ββ reports/ # Directory for generated reports and logs
ββ _depricated/ # Archived or deprecated files
flowchart LR
root["MOA-DeepOutputs"] --> engine["deepoutputs_engine/"]
root --> prompt["prompt.txt"]
root --> reqs["requirements.txt"]
root --> env[".env.example"]
root --> reports["reports/"]
root --> depr["_depricated/"]
engine --> agents["agents/"]
engine --> config["config.py"]
engine --> main["main.py"]
engine --> prompts["prompts.py"]
engine --> reports_py["reports.py"]
engine --> tracing["tracing.py"]
engine --> utils["utils.py"]
style root fill:#cceeff,stroke:#333333,color:#111111
style engine fill:#cceeff,stroke:#333333,color:#111111
style reports fill:#bbf7d0,stroke:#333333,color:#111111
style depr fill:#fffacd,stroke:#333333,color:#111111
style prompt fill:#eeeeee,stroke:#333333,color:#111111
style reqs fill:#eeeeee,stroke:#333333,color:#111111
style env fill:#eeeeee,stroke:#333333,color:#111111
style config fill:#eeeeee,stroke:#333333,color:#111111
style main fill:#eeeeee,stroke:#333333,color:#111111
style prompts fill:#eeeeee,stroke:#333333,color:#111111
style reports_py fill:#eeeeee,stroke:#333333,color:#111111
style tracing fill:#eeeeee,stroke:#333333,color:#111111
style utils fill:#eeeeee,stroke:#333333,color:#111111
| Requirement | Purpose | Link |
|---|---|---|
| Python 3.11+ | Core runtime | https://www.python.org/downloads/ |
| OpenRouter API key | Access LLMs | https://openrouter.ai/ |
| Git | Clone repository | https://git-scm.com/downloads/ |
| VS Code (Optional) | Dev Container support | https://code.visualstudio.com/ |
| Docker/Podman (Optional) | Dev Container runtime | https://www.docker.com/get-started / https://podman.io/get-started |
# Clone the repository
git clone https://github.com/Mindrocket42/MOA-DeepOutputs.git
cd MOA-DeepOutputs
# Create and activate virtual environment
python -m venv .venv
# For Windows PowerShell:
# .\.venv\Scripts\Activate.ps1
# For Linux/macOS:
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Copy example config and add your OpenRouter API key
# For Linux/macOS:
cp .env.example .env
# For Windows PowerShell:
# copy .env.example .env
# Edit the .env file to add your OPENROUTER_API_KEY
# Run the engine
python deepoutputs_engine/main.pyPrerequisites: Docker Engine or Podman, VS Code + Dev Containers extension.
- Open the
MOA-DeepOutputsfolder in VS Code. - When prompted, click "Reopen in Container". If not prompted, open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P) and select "Dev Containers: Reopen in Container".
- Wait for the container to build and dependencies to install (this may take a few minutes the first time).
- Once the container is ready, open a new terminal inside VS Code (Terminal > New Terminal).
- Run the engine:
python deepoutputs_engine/main.py
- Alternatively, press the Open in Codespace badge at the top of this README to launch a pre-configured cloud development environment.
flowchart TD
A[Clone Repo] --> B{Choose Setup}
B -->|Local Env| C[Create & Activate venv]
C --> D[Install dependencies]
D --> E[Add .env keys]
E --> G[Run engine]
B -->|Dev Container| F[Reopen in Container]
F --> E
style B fill:#fffacd,stroke:#333333,color:#111111
style C fill:#cceeff,stroke:#333333,color:#111111
style F fill:#ffddcc,stroke:#333333,color:#111111
style G fill:#bbf7d0,stroke:#333333,color:#111111
style D fill:#eeeeee,stroke:#333333,color:#111111
style E fill:#eeeeee,stroke:#333333,color:#111111
Ensure your virtual environment is activated or you are in the Dev Container.
# Run the DeepOutputs engine
python deepoutputs_engine/main.pyThe engine will read the prompt from prompt.txt and generate reports in the reports/ directory.
- Copy the example environment file:
- Linux/macOS:
cp .env.example .env - Windows PowerShell:
copy .env.example .env
- Linux/macOS:
- Edit the newly created
.envfile and set yourOPENROUTER_API_KEY:OPENROUTER_API_KEY="or-..." - (Optional) Adjust other variables in
.envto configure the models used for different agent roles and the number of layers in the workflow.
β οΈ Do not commit your.envfile to version control. It is included in.gitignore. For Codespaces or CI environments, use repository secrets.
| Symptom | Cause | Fix |
|---|---|---|
ModuleNotFoundError |
Virtual env not activated | source .venv/bin/activate (or PowerShell equivalent) |
| VS Code βcannot attachβ | Docker daemon off | Start Docker Desktop / Podman |
| 401 from OpenRouter | Missing or invalid API key | Add valid OPENROUTER_API_KEY to .env |
Empty reports/ folder |
Engine not run or no prompt set | Run python deepoutputs_engine/main.py after setting prompt.txt |
| Errors during API calls | Rate limits or model issues | Check OpenRouter dashboard; try a different model or reduce concurrency in .env |
- β Core multi-layer processing engine operational
- β
OpenRouter integration via
.env - β Configurable agents and layer count
- β Detailed Markdown DeepOutput and log generation
- β Basic tracing of workflow events
- π Dev Container spec and Docker support
- π JSON output format for reports coming soon
- β³ Enhanced tracing and performance metrics
ChatGPT assisted in drafting the README structure and refining diagrams.
This project is licensed under the MIT License - see the LICENSE file for details.
- Open an issue on GitHub for bug reports or feature requests.
- Pull requests are welcome!
- If you're new to coding or this project, tag your issue with
beginner-helpfor guidance.
Happy hacking β may your tokens be ever cheaper! π