Skip to main content

API reference

scp-protocol v0.5.0.

PatternStore

Events: pattern_invalidated fires when a pattern crosses failureThreshold.

AdaptiveMemory

Events: entry_purged fires when a decision is removed.

SCPBody

Static fields a subclass may override:

SCPAdapter (legacy)

The v0.1 contract. Kept for backward compatibility. New code should use SCPBody.

SCPBridge

Base class for any LLM client.

Bridges

  • OllamaBridge — local, free. host defaults to http://localhost:11434.
  • BedrockBridge — AWS Converse. Requires @aws-sdk/client-bedrock-runtime.
  • OpenAIBridge — raw HTTPS to api.openai.com. Reads OPENAI_API_KEY.

Transports

SCPBody is in-process by default. Two explicit transports:
  • HTTPTransportnode:http server with /emit, /poll, /health. No external dependency.
  • WebSocketTransport — requires ws (optional peer dep).

PRIORITY