Skip to main content

Substr8 CLI

PyPI version License: MIT

Verifiable AI Infrastructure — The governance plane for AI agents.

Substr8 provides provable, auditable, and deterministic infrastructure for AI agents. Any framework that can call tools can plug into Substr8.

What Substr8 Does

Problem Substr8 Solution
What version of the agent ran? FDAA — File-Driven Agent Architecture
Was it allowed to do that? ACC — Agent Capability Control
What did it actually do? DCT — Tamper-evident audit ledger
What did it remember? GAM — Git-Native Agent Memory
Was the conversation valid? CIA — Conversation Integrity Assurance
How do I deploy it? Gateway — Docker Swarm orchestration

Installation

pip install substr8

Quick Start

For Developers (Any Framework)

Connect your LangGraph, AutoGen, PydanticAI, or custom agent to Substr8:

# Start the MCP governance server
substr8 mcp start --local

# In another terminal, run your agent
python my_agent.py  # calls Substr8 MCP tools

Your agent calls MCP tools like substr8.run.start, substr8.policy.check, substr8.memory.write. Every action is policy-checked and logged.

For Operators (Infrastructure)

Deploy the full Substr8 stack:

# Start the gateway (OpenClaw runtime + governance services)
substr8 gateway start

# Check status
substr8 gateway status

Command Groups

substr8 mcp — MCP Governance Server

The MCP server exposes Substr8 governance as tools any framework can call.

substr8 mcp start [--local] [--require-auth] [--port 3456]
substr8 mcp stop
substr8 mcp status
substr8 mcp tools           # List available MCP tools

12 MCP Tools:

Category Tools
RIL (Runtime) run.start, run.end, tool.invoke
ACC (Policy) policy.check
DCT (Audit) audit.timeline, verify.run
GAM (Memory) memory.write, memory.search
CIA (Integrity) cia.status, cia.report, cia.repairs, cia.receipts

With Auth + Rate Limiting:

# Require API keys
substr8 mcp start --local --require-auth

# Call with key
curl -H "X-Substr8-Key: sk-substr8-xxx" http://localhost:3456/tools/run/start

Rate limits: Free (100/min), Pro (1000/min), Enterprise (10000/min)


substr8 gateway — Infrastructure Orchestration

Manages Docker Swarm stacks for the Substr8 runtime.

substr8 gateway start       # Deploy OpenClaw + FDAA proxy + services
substr8 gateway stop        # Tear down stacks
substr8 gateway status      # Health check all services
substr8 gateway logs        # View service logs

What it deploys:

  • OpenClaw runtime (compiles markdown agents → system prompts)
  • FDAA proxy (CIA middleware for LLM calls)
  • GAM service (memory with provenance)
  • Postgres/pgvector (embeddings)

When to use: You're running your own Substr8 infrastructure (self-hosted).


substr8 dev — Developer Scaffolding

Creates starter projects and demos.

substr8 dev init            # Scaffold example agents in current directory
substr8 dev demo            # Run a complete demo (start → agent → audit)

What dev init creates:

my-project/
├── examples/
│   ├── langgraph/agent.py
│   ├── pydantic-ai/agent.py
│   └── autogen/agent.py
├── .env.example
└── README.md

When to use: You're starting a new project that uses Substr8.


substr8 gam — Git-Native Agent Memory

Manage agent memory with cryptographic provenance.

substr8 gam init                    # Initialize repository
substr8 gam remember "text" --tag x # Store a memory
substr8 gam recall "query"          # Search memories
substr8 gam verify <id>             # Verify provenance
substr8 gam status                  # Show status

substr8 fdaa — Agent Identity & Registry

Package, version, and register agents.

substr8 fdaa hash <path>            # Hash an agent bundle
substr8 fdaa register <path>        # Register with FDAA registry
substr8 fdaa verify <hash>          # Verify agent integrity

substr8 acc — Capability Control

Manage agent policies.

substr8 acc policy list             # List policies
substr8 acc policy check <action>   # Check if action is allowed

substr8 dct — Audit Ledger

Query tamper-evident logs.

substr8 dct timeline <run_id>       # Get audit trail
substr8 dct verify <run_id>         # Verify chain integrity

How the Commands Work Together

# 1. OPERATORS: Deploy infrastructure
substr8 gateway start

# 2. DEVELOPERS: Start governance server
substr8 mcp start --local

# 3. DEVELOPERS: Scaffold a new project
mkdir my-agent && cd my-agent
substr8 dev init

# 4. DEVELOPERS: Run your agent
python examples/langgraph/agent.py

# 5. ANYONE: View audit trail
substr8 dct timeline run-abc123

Architecture

┌─────────────────────────────────────────────────────────┐
│                    Your Agent Framework                 │
│              (LangGraph, AutoGen, PydanticAI)           │
└─────────────────────────┬───────────────────────────────┘
                          │ HTTP tool calls
                          ▼
┌─────────────────────────────────────────────────────────┐
│                   Substr8 MCP Server                    │
│                   (substr8 mcp start)                   │
├─────────────────────────────────────────────────────────┤
│  RIL  │  ACC  │  DCT  │  GAM  │  CIA                    │
└───────┴───────┴───────┴───────┴─────────────────────────┘
                          │
                          ▼
┌─────────────────────────────────────────────────────────┐
│                   Substr8 Gateway                       │
│              (substr8 gateway start)                    │
├─────────────────────────────────────────────────────────┤
│  OpenClaw  │  FDAA Proxy  │  Postgres  │  GAM Service   │
└────────────┴──────────────┴────────────┴────────────────┘

Hosted Endpoints

Endpoint Purpose
mcp.substr8labs.com Hosted MCP server (coming soon)
fdaa.substr8labs.com Agent registry + identity

Research

Paper DOI
FDAA: File-Driven Agent Architecture 10.5281/zenodo.18675147
ACC: Agent Capability Control 10.5281/zenodo.18704577
GAM: Git-Native Agent Memory 10.5281/zenodo.18704573

Links


License

MIT — Substr8 Labs

Frameworks run agents. Substr8 proves what they did.

Metadata

Release files for substr8 1.10.1

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

Source distribution (sdist)

Source distribution for substr8 1.10.1
File Size Uploaded Provenance Actions
substr8-1.10.1.tar.gz 239.6 kB Without provenance Details for substr8-1.10.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for substr8 1.10.1
File Interpreter ABI Platform Actions
substr8-1.10.1-py3-none-any.whl Python 3 none any Details for substr8-1.10.1-py3-none-any.whl

Total release size: 517.5 kB

Release files / substr8-1.10.1.tar.gz

Download URL substr8-1.10.1.tar.gz
Size 239.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ae9405b98037cb43d8b6d1d3d34f6ef873309dda775251b1ba21c11d5f26ae9c
BLAKE2b-256 checksum
How to use checksums
5e3581a9880a4ac388b615bb8aece8036a6c8c54ac5cc40d5ff181dcf8629ea6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / substr8-1.10.1-py3-none-any.whl

Download URL substr8-1.10.1-py3-none-any.whl
Size 277.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32359f4d91c7295f054c9b486750a6257559aa6659a56926d36e49054eba2b38
BLAKE2b-256 checksum
How to use checksums
1ff71534bcf12e4eabb376247c26aa4c84c542d244cbdd9803bb470237202cbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for substr8 1.10.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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