Autonomous agent framework for executing development tasks using Ollama.
- Ensure Ollama is running:
ollama serve - Python 3.9+
- Install:
pip install ollama
from pathlib import Path
from claudeclockwork.agents.base_agent import BaseAgent
from claudeclockwork.agents.orchestrator import TaskOrchestrator
# Create orchestrator
orchestrator = TaskOrchestrator(Path.cwd())
# Define small task
task = {
"id": "task-1",
"description": "Generate unit tests",
"agent_type": "test_generator",
"files": ["src/module.py"],
}
# Execute
result = orchestrator.execute_task(task)
print(result)- Small Tasks Only: Each task must be atomic (1 function, 1 file, single concern)
- Fast Models: Use
gemma3:latestby default - Hybrid Execution: Python for structure, Ollama for content
- Autonomous: No human decision gates
- Self-Committing: Agents commit their own work
test_generator: Generate unit testsdoc_fixer: Fix documentationcode_fixer: Fix bugs in codetest_runner: Execute tests and report
Edit claudeclockwork/config/ollama_config.py to:
- Change model selection
- Set Ollama host/port
- Configure timeout
- Enable/disable decomposition
See examples/ folder for working agent implementations.