Akairo
Description
A lightweight framework for optimizing LLM responses using DSPy, with support for both cloud and local models.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Akairo
DSPy-based optimizer for LLM responses. Supports local models via Ollama and cloud models via OpenAI.
Architecture
| Path | Purpose |
|---|---|
src/dspy_local_optimizer/core/models.py |
Data models |
src/dspy_local_optimizer/core/metrics.py |
Quality scoring |
src/dspy_local_optimizer/core/ollama.py |
Ollama client |
src/dspy_local_optimizer/core/openai.py |
OpenAI client |
src/dspy_local_optimizer/optimizers/guideline_optimizer.py |
Guideline optimization logic |
scripts/run_optimization.py |
CLI entry point |
tests/test_copro_optimizer.py |
1 test file |
Requirements
- Python 3.10+ with Poetry
- Ollama (for local models) or an OpenAI API key
Setup
git clone https://github.com/jmanhype/Akairo.git
cd Akairo
poetry install
# For local models:
ollama pull llama2
Usage
from dspy_local_optimizer import BatchOptimizedGuidelineManager
optimizer = BatchOptimizedGuidelineManager(
model_name="ollama/llama2", # or "openai/gpt-3.5-turbo"
use_optimizer=True
)
optimized = optimizer.optimize_guidelines(
guidelines=your_guidelines,
examples=training_data,
batch_size=5
)
Or via the script:
poetry run python scripts/run_optimization.py
Tests
poetry run pytest
1 test file.
Status
Small utility project. The optimization loop runs but there are no published benchmarks showing improvement over baseline. The codebase is ~6 source files.
License
MIT
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI TrendRadar
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的
AI mem0
| Universal memory layer for AI Agents | 51341 | 221 | 1 |
AI