Spctre Odysseus Adapter
spctre-odysseus provides a Spctre middleware adapter for Odysseus runtimes
that support the ToolMiddleware protocol:
async def before_call(self, tool_name: str, args: dict, ctx: dict) -> dict | None: ...
Install
pip install spctre-odysseus
For local development:
pip install -e ".[dev]"
python -m pytest tests/ -x
Usage
from spctre_odysseus import SpctreOdysseus
spctre = SpctreOdysseus(
api_key="spctre_api_key",
base_url="https://api.spctre.example",
agent_id="agent_123",
tenant_id="tenant_123",
workspace_id="workspace_123",
environment="production",
)
framework.add_middleware(spctre)
Before each tool call, the adapter posts to Spctre's /evaluate endpoint with
Authorization: Bearer {api_key}. ALLOW, WARN, and ESCALATE decisions
return None so Odysseus proceeds. DENY returns:
{"blocked": True, "reason": "policy reason"}
Set dry_run=True to skip all network calls and allow every tool call.
Evidence
After evaluation, the adapter emits evidence to /ingest/evidence in a
fire-and-forget task. Evidence ingest errors are swallowed and do not change the
tool-call decision.
Evidence records include:
runtimeTarget.stack = "ODYSSEUS"runtimeTarget.adapter = "spctre-odysseus"agentId,tenantId,workspaceId, andenvironmentfrom constructor configconnectorfromctx["connector"]or inferred fromtool_nameactionfromctx["action"]ortool_nametriggerKindfromctx.get("trigger_kind", "interactive")parentAgentIdfromctx.get("parent_agent_id")when presentrawEvidence.source = "odysseus.before_call"- raw tool call context under
rawEvidence.toolName,rawEvidence.args, andrawEvidence.ctx
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spctre_odysseus-0.1.0.tar.gz.
File metadata
- Download URL: spctre_odysseus-0.1.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4858562d82d05c3741b9604282cffea0d4449c5169e7a9df1c0c8ebeebf0504e
|
|
| MD5 |
4258babff60aa463401ec024f0d29daa
|
|
| BLAKE2b-256 |
04d5afa63ea365f5df237547af76bdf7e458ebf0ea293a3b25d7efc3e8c6d11f
|
Provenance
The following attestation bundles were made for spctre_odysseus-0.1.0.tar.gz:
Publisher:
release-python.yml on getspctre/spctre
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spctre_odysseus-0.1.0.tar.gz -
Subject digest:
4858562d82d05c3741b9604282cffea0d4449c5169e7a9df1c0c8ebeebf0504e - Sigstore transparency entry: 2412305722
- Sigstore integration time:
-
Permalink:
getspctre/spctre@0964146e3ac5820784df78887b8f0c5ee19fa6e5 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/getspctre
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@0964146e3ac5820784df78887b8f0c5ee19fa6e5 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file spctre_odysseus-0.1.0-py3-none-any.whl.
File metadata
- Download URL: spctre_odysseus-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a36da42b0f7baa05f8feba7c2d0fd0a0960ffe0a530a7df870978f1968b71d5
|
|
| MD5 |
9967b58cf1312a7a2cfea51a9faa14bc
|
|
| BLAKE2b-256 |
834d433a09d3edb40ef0da87f2d3ebf00a381c3dde417fa7b0647b663fbd0e7e
|
Provenance
The following attestation bundles were made for spctre_odysseus-0.1.0-py3-none-any.whl:
Publisher:
release-python.yml on getspctre/spctre
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spctre_odysseus-0.1.0-py3-none-any.whl -
Subject digest:
7a36da42b0f7baa05f8feba7c2d0fd0a0960ffe0a530a7df870978f1968b71d5 - Sigstore transparency entry: 2412305735
- Sigstore integration time:
-
Permalink:
getspctre/spctre@0964146e3ac5820784df78887b8f0c5ee19fa6e5 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/getspctre
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@0964146e3ac5820784df78887b8f0c5ee19fa6e5 -
Trigger Event:
workflow_dispatch
-
Statement type: