Get started with AI reasoning and agent orchestration.
| Tool | Version | Purpose |
|---|---|---|
| Python | 3.11+ | Agent runtime |
| just | 1.0+ | Task runner |
| LiteLLM | latest | LLM provider |
1
2
3
4
5
6
7
# Set API keys in .env
export OPENAI_API_KEY=sk-...
export ANTHROPIC_API_KEY=sk-ant-...
# Or use local Ollama
export LLM_PROVIDER=ollama
export OLLAMA_BASE_URL=http://localhost:11434
Create agents/my-analyst.agent.yaml:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
agentId: "my-analyst"
skill: "document-analysis"
model: "claude-sonnet"
maxOutputTokens: 1000
tools:
- "read-document"
- "query-knowledge-graph"
outputSchema:
type: object
properties:
findings:
type: array
items:
type: string
confidence:
type: number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# router-config.yaml
router:
agentId: "router-v1"
model: "claude-sonnet"
maxOutputTokens: 200
specialists:
- agentId: "my-analyst"
skill: "document-analysis"
maxOutputTokens: 1000
aggregator:
strategy: "weighted-merge"
conflictResolution: "majority-vote"
execution:
maxRounds: 3
convergenceThreshold: 0.95
1
2
3
4
5
6
7
# Execute with query
just cognitive-run \
--config router-config.yaml \
--query "Analyze the quarterly report"
# View execution trace
just cognitive-trace --workflow-id <id>
1
2
3
4
5
# Check governance violations
just cognitive-validate --workflow-id <id>
# Export results
just cognitive-export --workflow-id <id> --format json
| Issue | Solution |
|---|---|
API key not found |
Set environment variable |
Token budget exceeded |
Reduce maxOutputTokens |
Schema validation failed |
Check output schema |
Convergence not reached |
Increase maxRounds |