Bridges
A bridge is the thing the body calls when local layers cannot answer. All bridges extendSCPBridge and implement call(prompt, tools).
| Bridge | Models | Cost (per 1k tokens) | Setup |
|---|---|---|---|
| OllamaBridge | llama3.2, mistral, qwen, phi | $0.000 | Install Ollama, pull model |
| BedrockBridge | Nova Micro, Claude via Bedrock | $0.00013 (Nova Micro) | AWS credentials |
| OpenAIBridge | gpt-4o-mini, gpt-4o | $0.00015 (mini) | OPENAI_API_KEY |
OllamaBridge
Free, local, no API key. Default for getting started.OllamaBridge.isAvailable() is a quick health check that returns a boolean and never throws.
BedrockBridge
Wraps the AWS SDK Converse API.@aws-sdk/client-bedrock-runtime is an optional peer dep.
OpenAIBridge
Rawnode:https. No SDK dependency.
Writing a custom bridge
SubclassSCPBridge. Implement call(prompt, tools). Return whatever shape your body expects.
callCount, errorCount, totalDurationMs, and lastCallMs. Read them via bridge.stats().
Cost comparison
Sample run: 100 brain calls during a 10-minute session, ~400 tokens per call.| Bridge | Total cost |
|---|---|
| OllamaBridge | $0.00 |
| Nova Micro | $0.0052 |
| GPT-4o Mini | $0.0060 |
| Claude Haiku | $0.0100 |