File size: 3,305 Bytes
7d89115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
language:
- en
license: apache-2.0
tags:
- agent
- multi-agent
- langgraph
- gguf
- lora
- qwen
- prediction-markets
- mad-gambit
- solidity
- tandem-core
- agent-q3
- agent-q3-hq
- agent-q3-evo
pipeline_tag: text-generation
---

# Agent Q3

> **MAD Gambit** β€” Multi-agent intelligence layer
> Contains both **Agent Q3 [HQ]** (production orchestration) and **Agent Q3 [Evo]** (self-improving research pipeline)

---

## Variants

| Variant | Role | Key Tech |
|---------|------|----------|
| **Agent Q3 [HQ]** | Production orchestration | Tandem Core Β· ComputeRouter Β· LangGraph Β· MCP Β· Solidity audit |
| **Agent Q3 [Evo]** | Self-improving research | LoRA fine-tuning Β· arXiv ingestion Β· ChromaDB Β· Unsloth Β· benchmarks |

---

## File Structure

```
Agent-Q3/
β”œβ”€β”€ README.md
β”‚
β”œβ”€β”€ hq/                          ← Agent Q3 [HQ] β€” Production
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ docker-compose.yml
β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”œβ”€β”€ .env.example
β”‚   β”œβ”€β”€ orchestrator.py          ← FastAPI + ComputeRouter
β”‚   β”œβ”€β”€ compute_router.py        ← Multi-backend weighted routing
β”‚   β”œβ”€β”€ tandem_core.py           ← Gemma4 Reasoner + Qwen3.5 Coder chain
β”‚   β”œβ”€β”€ langgraph_graph.py       ← StateGraph agent orchestration
β”‚   β”œβ”€β”€ mcp_config.json          ← 14 MCP server connectors
β”‚   β”œβ”€β”€ litellm_config.yaml      ← LiteLLM routing config
β”‚   └── metrics.py               ← Prometheus /metrics endpoint
β”‚
β”œβ”€β”€ evo/                         ← Agent Q3 [Evo] β€” Research
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”œβ”€β”€ .env.example
β”‚   β”œβ”€β”€ training_pipeline.py     ← Unsloth LoRA fine-tuning
β”‚   β”œβ”€β”€ arxiv_ingestor.py        ← arXiv fetch β†’ chunk β†’ embed
β”‚   β”œβ”€β”€ chromadb_store.py        ← Vector store (nomic-embed-text 384-dim)
β”‚   β”œβ”€β”€ feedback_collector.py    ← DPO/RLHF signal capture
β”‚   β”œβ”€β”€ benchmark_runner.py      ← Domain QA evaluation
β”‚   β”œβ”€β”€ lora_pusher.py           ← Push adapters to HF
β”‚   └── langgraph_graph.py       ← StateGraph agent orchestration
β”‚
└── shared/                      ← Shared utilities
    β”œβ”€β”€ auth.py
    β”œβ”€β”€ logger.py
    └── config.py
```

---

## HQ β€” Quick Start

```bash
cd hq
cp .env.example .env
docker compose up --build
```

**Endpoints:**
- `POST /v1/chat` β€” auto-classify β†’ Reasoner or Coder
- `POST /v1/reason` β€” force Gemma4-E4B (planning, research, audit)
- `POST /v1/code` β€” force Qwen3.5-4B (code, debug, file ops)
- `POST /v1/tandem` β€” Gemma4 reasons β†’ Qwen3.5 implements
- `GET  /health` β€” backend health + loaded models
- `GET  /metrics` β€” Prometheus metrics

## Evo β€” Quick Start

```bash
cd evo
cp .env.example .env
pip install -r requirements.txt
python training_pipeline.py
```

---

## Linked HF Assets

| Type | Label | Link |
|------|-------|------|
| Model | Agent Q3 (unified) | [madDegen/agent-q3-core](https://hf.co/madDegen/agent-q3-core) |
| Dataset | Agent Q3 (unified) | [madDegen/agent-q3](https://hf.co/datasets/madDegen/agent-q3) |
| Space | Agent Q3 (unified) | [madDegen/agent-q3-space](https://hf.co/spaces/madDegen/agent-q3-space) |

---

## License

Apache 2.0