Skip to main content

spectron-strands-agents

Spectron agent memory as tools for the Strands Agents SDK.

Spectron is SurrealDB's provenance-first, tri-temporal memory and knowledge layer for AI agents. This package exposes Spectron's memory operations as Strands tools, so any Strands agent can store and retrieve long-term memory with a single line of setup:

from strands import Agent
from spectron_strands import spectron_tools

agent = Agent(tools=spectron_tools())

agent("Remember that we signed a contract with Meditech Solutions for 1.2M GBP.")
print(agent("What is the value of the Meditech Solutions contract?"))

Installation

pip install spectron-strands-agents
pip install "spectron-strands-agents[bedrock]"

Requires Python 3.10 or newer.

Configuration

The tools need a Spectron client. Provide the connection details as environment variables:

export SPECTRON_ENDPOINT="https://api.spectron.example"
export SPECTRON_API_KEY="your-bearer-token"
export SPECTRON_CONTEXT="acme-prod"

With those set, spectron_tools() builds the client for you. You can also pass the values directly, or hand in a client you already have:

from surrealdb import Spectron
from spectron_strands import spectron_tools

# From explicit arguments.
tools = spectron_tools(
    endpoint="https://api.spectron.example",
    api_key="your-bearer-token",
    context="acme-prod",
)

# Or reuse an existing client.
client = Spectron(context="acme-prod", endpoint="...", api_key="...")
tools = spectron_tools(client=client)

Tools

spectron_tools() returns seven tools by default, one per Spectron operation:

Tool Purpose
spectron_remember Store a fact or observation for later recall.
spectron_recall Search memory and return the most relevant stored information.
spectron_context Assemble a working-memory context block for a query.
spectron_reflect Run a synthesis pass that consolidates and connects memories.
spectron_forget Delete memories that match a query.
spectron_upload Ingest a document so its contents become recallable.
spectron_inspect Browse the substrate as queryable data for debugging or audit.

Choose a subset with include or exclude:

# Only the everyday read/write pair.
tools = spectron_tools(include=["remember", "recall"])

# Everything except deletion and inspection.
tools = spectron_tools(exclude=["forget", "inspect"])

Scopes

Spectron scopes isolate memory by principal, tenant or session. A scope is a path string such as "org/acme/user/alice", or a list of paths. Set a default scope for all tools, and let the agent override it per call when needed:

tools = spectron_tools(scope="org/acme/user/alice")

Every tool also accepts a scope argument, so a multi-user agent can direct a single memory operation at a specific principal.

How it works

Each tool is a thin wrapper over one method on the synchronous surrealdb.Spectron client. Because that client is synchronous, the tools call it directly. There is no background event loop or async shim to manage.

Spectron is in early preview. The remember, recall and context tools follow the documented client signatures. The reflect, forget, upload and inspect tools cover operations whose keyword arguments are still settling. If a method name or argument differs in the version of surrealdb you have installed, the fix is a single call inside the matching factory in src/spectron_strands/tools.py.

Examples

Runnable examples live in examples/. They use Amazon Bedrock, which is Strands' default model provider. See examples/README.md for what each one shows and how to run it.

Roadmap

  • Async tools built on AsyncSpectron.
  • Streaming chat and the grouped resources (sessions, entities, and others).

License

Apache License 2.0. See LICENSE.

Metadata

Release files for spectron-strands-agents 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spectron-strands-agents 0.1.0
File Size Uploaded
spectron_strands_agents-0.1.0.tar.gz 16.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spectron-strands-agents 0.1.0
File Interpreter ABI Platform
spectron_strands_agents-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.3 kB

Release files / spectron_strands_agents-0.1.0.tar.gz

Download URL spectron_strands_agents-0.1.0.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9d399259c2a81f09ef3b126f575e2d1f988cc50b9c6ce6ee841546482c3d0b26
BLAKE2b-256 checksum
How to use checksums
5f0489bd73d3a945bee5398f0054ddc77dc3ada2757597a7116fff337b8959f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.

Transparency log

Release files / spectron_strands_agents-0.1.0-py3-none-any.whl

Download URL spectron_strands_agents-0.1.0-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0d166eb18ce4b5373392e6284354ed7d29f490ca863a02569c7826a01e2b56f
BLAKE2b-256 checksum
How to use checksums
9b4a7826d5f54886365f2d602a9adc5b4d46d370817d45c97e681e9f142ea622
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page