📋 Cognitive Architecture Cheat Sheet

Quick reference for commands and configuration.


LLM Configuration

1
2
3
4
# Set API keys
export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...
export OLLAMA_BASE_URL=http://localhost:11434

Workflow Commands

1
2
3
4
5
6
7
8
9
10
11
# Run workflow
just cognitive-run --config router-config.yaml --query "..."

# View trace
just cognitive-trace --workflow-id <id>

# Validate configuration
just cognitive-validate --config router-config.yaml

# Test agent
just cognitive-test-agent --agent <id> --input "..."

Agent Configuration

1
2
3
4
5
6
7
8
9
10
11
agentId: "my-agent"
skill: "analysis"
model: "claude-sonnet"
maxOutputTokens: 1000
temperature: 0.7
tools:
  - "read-kgs"
outputSchema:
  type: object
  properties:
    result: { type: string }

Router Configuration

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
router:
  agentId: "router-v1"
  model: "claude-sonnet"
  maxOutputTokens: 200

specialists:
  - agentId: "agent-1"
    maxOutputTokens: 500

aggregator:
  strategy: "weighted-merge"
  conflictResolution: "majority-vote"

validator:
  checks:
    - type: "schema"
    - type: "concept-id-persistence"

execution:
  maxRounds: 5
  convergenceThreshold: 0.95

Specialist Types

Type Skill Output
Semantic Mapper term-to-concept-binding { "mappings": [...] }
Rule Analyst sbvr-evaluation { "violations": [...] }
Architecture Checker calm-boundary-validation { "status": "ok" }
Retrieval Agent context-retrieval { "nodes": [...] }

Validation Checks

1
2
3
4
5
6
checks:
  - type: "schema"           # Output schema
  - type: "concept-id-persistence"  # Identity
  - type: "sbvr-rules"       # Business rules
  - type: "calm-boundaries"   # Architecture
  - type: "state-size"       # Size limits

Tuning Parameters

Want Adjust
Less hallucination Stricter schemas, lower temperature
More creativity Higher temperature, looser scoring
Faster execution Fewer rounds, faster models
Higher accuracy More rounds, tighter validation

Convergence Settings

1
2
3
4
execution:
  maxRounds: 5               # Max iterations
  convergenceThreshold: 0.95  # Similarity to stop
  agentTimeout: 30           # Seconds per agent

Common Errors

Error Solution
Token budget exceeded Reduce maxOutputTokens
Schema mismatch Fix agent output format
No convergence Increase maxRounds
Identity drift Enable concept-id-persistence