Spectron connects to agents through HTTP, MCP, official SDKs, and harness adapters that mirror conversation turns into POST /api/v1/{context_id}/facts/batch, using the same provenance and trust model as the server.
The REST surface is described by an OpenAPI specification. The Python, TypeScript, Swift, and Kotlin clients track that spec so request and response shapes stay aligned with the server.
MCP server (coding assistants)
Native MCP at /mcp on the api port, with the same Authorization: Bearer auth as REST. Prefer this when the client already speaks MCP.
spectron mcp→ MCP server install · Per-client guides: Claude · Cursor · VS Code · JetBrains · Zed · Windsurf · Codex · Antigravity · OpenCode
SDKs
Call Spectron directly from application code.
| Language | Package |
|---|---|
| Python | surrealdb (Spectron ships inside it) |
| JavaScript / TypeScript | @surrealdb/spectron |
| Swift | Spectron product in surrealdb.swift |
| Kotlin | bundled in com.surrealdb:kotlin |
| Go | spectron package in surrealdb.go |
| Dart | surrealdb (import spectron.dart) |
| Elixir | :surrealdb (SurrealDB.Spectron) |
| Haskell | surrealdb-spectron |
→ Python · JavaScript & TypeScript · Swift · Kotlin · Go · Dart · Elixir · Haskell
AI SDKs
Drop-in memory for the popular TypeScript AI SDKs, with recall and storage wrapped around your model calls.
Vercel AI SDK:
@surrealdb/vercel-ai, viawrapLanguageModelmiddleware and a tool set.TanStack AI: the
@surrealdb/spectronclient in TanStack Start server routes.Cloudflare Workers AI: the client inside a Worker, alongside Workers AI models.
→ Vercel AI SDK · TanStack AI · Cloudflare Workers AI
Agent frameworks
Harness adapters expose Spectron as agent tools and add automatic per-turn memory, without changing your prompts.
| Framework | Package | Language |
|---|---|---|
| LangChain / LangGraph | @surrealdb/langchain, @surrealdb/langgraph | TypeScript |
| CrewAI | spectron-integration-crewai | Python |
| OpenAI Agents SDK | spectron-openai-agents | Python |
| Pydantic AI | spectron-pydantic-ai | Python |
| Google ADK | spectron-google-adk | Python |
| Strands Agents | spectron-strands | Python |
| Mastra | @surrealdb/mastra-ai | TypeScript |
| Hermes Agent | spectron-integration-hermes-agent | Python |
| OpenClaw | @surrealdb/spectron-openclaw | TypeScript |
| Eve | @surrealdb/spectron-eve | TypeScript |
→ LangChain · CrewAI · OpenAI Agents SDK · Pydantic AI · Google ADK · Strands Agents · Mastra · Hermes Agent · OpenClaw · Eve
Frameworks without a dedicated package integrate directly through the SDK: AutoGen · Agno · Camel AI · LlamaIndex
Voice & realtime
Give voice agents memory that persists across calls.
→ LiveKit · ElevenLabs
Automation
n8n: the
@surrealdb/n8n-nodes-surrealdbcommunity node, plus Spectron memory over the REST API.Zo Computer: a Zo skill that calls the Spectron SDK for recall and storage.
→ n8n · Zo Computer
Observability
Run Spectron for memory while an observability platform traces and evaluates the agent.
REST API
Direct HTTP from any language. End-user routes: /api/v1/{context_id}/…. Management: /api/v1/contexts/….
→ REST integration guide · Full reference
Not shipped yet
Embedded in-process library: use REST or an SDK against a deployed instance (Embedded quickstart).