An autonomous multi-agent logic and puzzle solver powered by the installed Prime Agent's Recursive Language Model (RLM) CLI harness. It demonstrates how a parent agent spawns parallel child subagents programmatically via Python function calls (await rlm(...)), executing parallel sub-task decomposition, constraint validation, and output synthesis directly using the installed Prime Agent harness.
┌─────────────────────────────────────────────────────────────────────────────┐ │ 📌 Challenge: ARC-AGI 3x3 Grid Matrix Transformation │ ├─────────────────────────────────────────────────────────────────────────────┤ │ Input Matrix State: │ │ Row 1: [ 2, 4, 8 ] ──► Pattern: 2^1, 2^2, 2^3 │ │ Row 2: [ 3, 9, 27 ] ──► Pattern: 3^1, 3^2, 3^3 │ │ Row 3: [ 4, 16, ? ] ──► Goal: Deduce Missing Value at Row 3 Col 3 │ ├─────────────────────────────────────────────────────────────────────────────┤ │ Target Goal: │ │ 1. Invoke installed Prime Agent CLI harness directly (`wsl prime-agent`) │ │ 2. Deduce mathematical invariant (Base^ColumnIndex) │ │ 3. Validate constraints (64 mod 4 == 0) and synthesize solution code │ └─────────────────────────────────────────────────────────────────────────────┘
- Direct Installed Prime Agent Execution: Calls the installed
prime-agentCLI harness directly with zero mock, fallback, or dummy logic. - Recursive Subagent Spawning (
await rlm): Programmatically launches child subagents in parallel to solve complex logic puzzles without rigid JSON schemas. - Prompt-as-a-Variable State: Manages conversational history and subagent memory dynamically inside the Python runtime kernel.
- Single Markdown Output: Generates a single, clean markdown report
outputs.mddetailing the entire subagent trajectory and solution trace.
Ensure Python 3.9+ is installed on your system.
python --versionRun the solver directly in your PowerShell or Command Prompt terminal:
python main.pyThe solver will execute parallel child agents via the installed prime-agent harness, display a colorful real-time execution hierarchy tree in the terminal, and export the comprehensive solution report to outputs.md.
To install and run the official compiled Prime Agent CLI harness (prime-agent) on Windows via WSL2, execute these commands directly in your PowerShell terminal:
# Step 1: Install Ubuntu distribution for WSL2 (one-time setup if Ubuntu is not installed)
wsl --install -d Ubuntu
# Step 2: Download & Install Prime Agent CLI inside WSL
wsl bash -c "curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh"
# Step 3: Run Prime Agent in current project directory from PowerShell
wsl bash -c "cd '$(wslpath -a \"$PWD\")' && prime-agent"
# Utility: Browse active background daemon agents
wsl bash -c "prime-agent agents"main.py- Primary Python script executing subagents directly via the installed Prime Agent CLI harness (wsl prime-agent).outputs.md- Single generated markdown report produced by runningmain.py, detailing the subagent execution hierarchy, execution latency, and solution trace..gitignore- Standard ignore rules for temporary build outputs and local environment files.
+----------------------------+
| Parent Prime Agent (RLM) |
+--------------+-------------+
|
+-----------------+-----------------+
| `wsl prime-agent --prompt ...` |
+-----------------+-----------------+
|
+-----------------------------+-----------------------------+
| | |
v v v
+---------------+ +---------------+ +---------------+
| Child Agent 1 | | Child Agent 2 | | Child Agent 3 |
| Pattern | | Constraint | | Code & Logic |
| Extractor | | Validator | | Synthesizer |
+-------+-------+ +-------+-------+ +-------+-------+
| | |
+-----------------------------+-----------------------------+
v
+----------------------------+
| Final Output Synthesizer |
+--------------+-------------+
|
v
+------------------+
| outputs.md |
| (Markdown Trace) |
+------------------+
- ARC-AGI-3 Grid Puzzle Reasoning: Solve complex spatial transformation grid puzzles by running parallel hypothesis-generating child agents.
- Automated Microservice API Refactoring: Decompose large monolithic codebases by assigning child subagents to separate module endpoints simultaneously.
- Multi-Branch Code Vulnerability Auditing: Audit complex codebases for security edge cases by spawning isolated child agents for static analysis, dependency scanning, and taint tracking.
- Algorithmic Math & Matrix Optimization: Decompose high-dimensional matrix constraint problems into parallel integer linear programming subtasks.
- Autonomous Competitive Programming Harness: Solve LeetCode Hard and Codeforces competition challenges by orchestrating solver agents, tester agents, and optimizer agents in parallel.
- Daemon Socket RPC Server: Connect the standalone Python harness directly to Prime Agent's background daemon via local Unix sockets.
- Direct Agent-to-Agent (A2A) IPC: Enable direct peer-to-peer message queues between child agents without routing through the parent controller.
- Dynamic GPU Quantization Switcher: Automatically adjust subagent quantization precision based on available VRAM during parallel bursts.
- Automated Rollback Snapshotting: Record state diffs after every puzzle attempt to support instant rollback on subagent hallucination.
- Interactive Web Execution Tree: Real-time WebSocket visualizer rendering live subagent telemetry in an interactive web layout.
Prime Agent, Prime Intellect, RLM Agent, Recursive Language Model, ARC-AGI-3, Autonomous AI Agent, Multi-Agent Orchestration, IPython REPL Agent, Continual Harness, Ollama Local LLM, qwen2.5-coder, WSL2 AI Setup, Open Source AI Harness
MIT License (c) 2026 Prime Intellect Community