Catalog PyPI
PACKAGE EXPLORERView in registry

agentspine

PyPI

Open-source adaptive control plane for production AI agents

agentsaicontrol-planeproductionsafety
Versions collected1
Direct dependencies18From release 0.1.7
Last observed20 Oct, 23:28 UTC

README

Version 0.1.7 documentation
AgentSpine Hero

PyPI - Version Python Postgres Redis License

Open-source adaptive control plane for production AI agents.

AgentSpine is an embedded Python SDK that sits between your AI agents and the tools they use — enforcing policies, preventing duplicates, managing locks, scoring risk, and logging every action for full observability.

Features

  • Policy Engine — Declarative rules that deny, allow, or require approval for agent actions
  • Semantic Deduplication — Prevent agents from repeating the same action using embedding similarity
  • Distributed Locks — Prevent two agents from modifying the same resource simultaneously
  • Risk Scoring — Score every action on a 0–1 scale and route to fast-path, judiciary, or human approval
  • Knowledge Graph — Track relationships between agents, actions, tools, and resources
  • Credential Vault — Encrypted at-rest storage for API keys and OAuth tokens
  • Event Timeline — Append-only audit log of every action and decision
  • Rate Limiting & Circuit Breakers — Per-agent, per-tool, per-workflow limits
  • Feature Flags — Enable only the subsystems you need; disable the rest for zero overhead

Quickstart

# Start infrastructure
docker compose up -d

# Install SDK
pip install agentspine[all]
import asyncio
from agentspine import AgentSpine

async def main():
    spine = AgentSpine(workflow="demo")

    async def local_echo(payload, context):
        return {"echo": payload}

    spine.register_tool("demo.echo", local_echo)

    result = await spine.request_action(
        agent="demo_agent",
        action_type="demo.echo",
        payload={"text": "Hello from AgentSpine!"},
        idempotency_key="demo_001",
    )
    print(f"Status: {result.status}")
    await spine.close()

asyncio.run(main())

If no local tool is registered for an action type, AgentSpine emits a normalized execution signal so an external worker or service can perform the real side effect and report the result back later.

Feature Flags

from agentspine import AgentSpine
from agentspine.features import FeatureFlags

# Full mode (default) — all features on
spine = AgentSpine(workflow="my_workflow")

# Standard — no KG or judiciary
spine = AgentSpine(workflow="my_workflow", features=FeatureFlags.standard())

# Minimal — policy + events only
spine = AgentSpine(workflow="my_workflow", features=FeatureFlags.minimal())

Architecture

Agent → AgentSpine SDK → Pipeline → Tool
           │
           ├── Policy Engine (allow/deny/approve)
           ├── Semantic Dedupe (pgvector)
           ├── Risk Scorer (0-1 score)
           ├── Knowledge Graph (Postgres)
           ├── Distributed Locks (Redis)
           └── Event Timeline (append-only)

Requirements

  • Python 3.11+
  • PostgreSQL 16+ (with pgvector extension)
  • Redis 7+ (optional, for locks/rate-limiting/circuit-breakers)

Documentation

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

Apache 2.0 — See LICENSE.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.72 May 202618

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
hrushi11/agentspine

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 23:28 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:5e072c4d33d47d4d6741650e8ad70c90509b499404ee225710174ba12b94df52