Skip to main content

API reference

@srk0102/plexa v0.5.0.

Space

Events emitted on Space:

BodyAdapter

Aliased as SCPBody. Constructor and static fields:

Brain

Static:

Brain bridges

  • OllamaBrain({ model, host, ... })host defaults to http://localhost:11434.
  • BedrockBrain({ model, region, ... }) — needs @aws-sdk/client-bedrock-runtime. Wraps scp-protocol’s BedrockBridge.
  • AnthropicBrain({ apiKey, model, ... }) — raw HTTPS to api.anthropic.com. Default model claude-haiku-4-5-20251001.

Translator

Validates an intent against the body’s tool schema. Reject reasons: unknown_body, unknown_tool, missing_required, wrong_type, out_of_range, not_in_enum, malformed.

Aggregator

Packs world state into a token budget with priority-aware trimming. Strips prompt-injection patterns before returning.

VerticalMemory

AdaptiveMemory

Re-exported from scp-protocol. See SCP API.

attachIntrospection

Starts an HTTP server with /plexa/status, /plexa/bodies, /plexa/logs, /plexa/health. No auth. Bind to localhost only.

CLI

The CLI talks to the introspection server.