Quickstart¶
Get SumoSpace running and executing its first autonomous task in under 5 minutes.
Prerequisites¶
| Requirement | Version | Notes |
|---|---|---|
| Python | ≥ 3.10 | python --version to check |
| pip | ≥ 22 | pip --version to check |
| Ollama | Latest | For local models — see Step 2 |
Step 1 — Install¶
Verify the install:
Step 2 — Choose a Provider¶
Ollama is the easiest path for local inference — no API key, no internet.
# 1. Install Ollama (macOS / Linux)
curl -fsSL https://ollama.com/install.sh | sh
# 2. Pull a model (~2.4 GB for phi3:mini, ~4.7 GB for llama3:8b)
ollama pull phi3:mini # Fast — great for evaluation
ollama pull llama3:8b # Stronger — better plan quality
# 3. Confirm it's running
ollama list
Set in your .env:
Run inference using HuggingFace Transformers locally.
Step 3 — First Run¶
Create a file called run.py:
run.py
from sumospace import SumoKernel, SumoSettings
import asyncio
async def main():
async with SumoKernel(SumoSettings(
provider="ollama",
model="phi3:mini",
)) as kernel:
trace = await kernel.run(
"Add docstrings to all functions in ./src/utils.py"
)
print(trace.final_answer)
asyncio.run(main())
Or use the CLI directly:
Step 4 — Understanding the Output¶
The trace object contains everything that happened during execution:
trace.success # (1) True — all steps completed without error
trace.session_id # (2) "abc123" — replay with: sumo logs show abc123
trace.intent # (3) Intent.WRITE_CODE — what the classifier detected
trace.duration_ms # (4) 14200 — 14 seconds total wall-clock time
trace.step_traces # (5) list of StepTrace objects, one per tool call
trace.final_answer # (6) "Added docstrings to 8 functions in utils.py"
success—Trueonly if all plan steps executed, the Critic approved, and no tool raised an unhandled exception.session_id— a UUID identifying this agent run. Usesumo logs show <id>to re-read the full structured log.intent— theIntentenum value the classifier assigned. Controls which tools the Planner is allowed to propose.duration_ms— total time including model inference, tool execution, and committee deliberation.step_traces— eachStepTracehas:tool,args,result,duration_ms,error.final_answer— human-readable summary of what was accomplished.
Step 5 — What Just Happened¶
flowchart LR
A[Your Task] --> B[Classifier]
B --> C[Planner]
C --> D[Critic]
D -- Approved --> E[Tool Executor]
D -- Rejected --> C
E --> F[Snapshot]
F --> G[Final Answer] - Classifier — reads your task and assigns an
Intent(e.g.WRITE_CODE,READ_FILE,REFACTOR). - Planner — generates a structured JSON plan: ordered list of tool calls with arguments.
- Critic — reviews the plan. Checks for destructive operations, out-of-scope paths, and logical errors.
- Tool Executor — executes each step sequentially. Captures output after every step.
- Snapshot — before each write, the current file state is saved so rollback is possible.
- Final Answer — a summary of all actions taken.
Next Steps¶
Understand exactly what Planner, Critic, and Resolver do and how to tune them.
Register your own tools and make the agent aware of them.
Evaluate model performance on reproducible coding tasks.
Safely undo any agent action with one command.