A production-grade, multi-agent orchestration system built on a strict operational constraint: Test reality → Extract signal → Classify → Act.
This is not a chatbot. It is a decision-enforcement engine. It prevents building without signal, ensuring that actions (Scale, Reframe, Kill) are driven by verifiable reality rather than intuition.
The system enforces the "Signal Loop" via a sequential, multi-agent pipeline:
- Test Reality (ResearchAgent): Analyzes inputs/files and extracts pure, factual observations. No assumptions. No recommendations.
- Extract Signal (AnalystAgent): Evaluates the research and classifies signal strength (strong, weak, none) using a strict schema tool.
- Determine Action (ActionAgent): Maps the classified signal to an immutable action constraint:
- Strong → Scale or refine. Build only to extend.
- Weak → Reframe or reposition. Do not build.
- None → Change direction. Kill it, test anew.
- Persist (MemoryAgent): Logs the completed loop to context memory so the system compounds intelligence over time.
- Model Agnostic & Future-Proof: Automatically detects and adapts parameter schemas (max_tokens vs max_completion_tokens) for next-gen models (GPT-4o, GPT-4.5, GPT-5.5, o1, o3).
- Multi-Modal File Handling: Natively reads and extracts Text, Word (.docx), PDF (via pypdf), and Images (automatically routed to Vision API).
- Resilient Execution: Wraps LLM calls in exponential backoff retries (Tenacity) for transient network and rate-limit errors.
- Strict Tooling: Agents interact with the environment via pure Python functions mapped to strict JSON schemas.
- In-Memory Context Window: Agents learn from prior tasks via a bounded FIFO memory queue injected into their system prompts.
- Beautiful CLI: Interactive REPL with Markdown rendering, file-upload wizards, and real-time step visualization using Rich.
project/
├── .env
├── requirements.txt
├── src/
├── config.py
├── memory.py
├── tools.py
├── agents.py
├── orchestrator.py
└── main.py
# Install
pip install -r requirements.txt
# Configure
echo "OPENAI_API_KEY=your_key" > .env
echo "OPENAI_MODEL=gpt-4o" >> .env
# Run interactive
python src/main.py
# Run single task
python src/main.py --task "Evaluate demand signal for AI enrichment pipelines targeting family offices"| Component | Production Principle |
|---|---|
config.py + Pydantic |
Validated config, zero hardcoding |
memory.py |
Bounded stateful memory — swappable to DB |
tools.py |
Typed tool registry, clean executor router |
agents.py BaseAgent |
Retry logic, tool-call loop, shared client |
| Specialized agents | SRP — one agent, one job, one system prompt |
orchestrator.py |
Enforces loop order, injects memory context |
main.py |
CLI + interactive + graceful error handling |
Strong signal received → build these extensions:
├── Swap memory.py → PostgreSQL (asyncpg)
├── Add web_search tool (Tavily/Serper API)
├── Add send_email tool (ConvertKit API)
├── Add FastAPI wrapper → HTTP endpoint
└── Add LangSmith tracing → observability








