Spine
A lightweight, modular, protocol-native runtime for production AI agents.
Documentation · Quickstart · Cookbook · Contributing
Spine is the kernel for AI agents — a tiny, load-bearing runtime that everything else plugs into. Where monolithic frameworks bundle heavy abstractions, Spine ships a small core and pushes every feature into opt-in middleware, swappable backends, and protocol adapters.
from spine_core import Agent
agent = Agent("openai:gpt-4o-mini")
print((await agent.run("say hello")).answer)
Three guarantees
- No hidden prompts — every model call consumes inspectable, typed
Messageobjects. - No runaway loops — guards are enforced inside the kernel, every iteration.
- Deterministic replay — any run can be recorded and replayed step-for-step.
Install
One package, lean core, opt-in extras:
pip install spinekit # kernel only (pydantic + anyio)
pip install "spinekit[openai]" # + OpenAI
pip install "spinekit[anthropic,redis,cli]" # pick parts
pip install "spinekit[all]" # everything
Import name stays spine_core. See the install guide.
What's in the box
| Module | Extra | What |
|---|---|---|
spine_core |
— | the kernel — loop, state, guards, tracer, protocols, HITL, streaming |
spine_middleware |
— | retry, fallback, guardrails, cache, memory recall, sandbox, replay, … |
spine_backends |
redis / postgres |
checkpoints (SQLite always; Redis/Postgres) + memory (vector/buffer/pgvector) |
spine_providers |
openai / anthropic |
OpenAI + Anthropic (and any OpenAI-compatible endpoint) |
spine_mcp · spine_a2a · spine_otel |
mcp · a2a · otel |
MCP tools · remote agents · OpenTelemetry |
spine_eval |
eval |
dataset + scorers + Cost/Latency/Efficacy/Reliability report |
spine_orchestration |
— | sequential / supervisor / handoff |
spine_cli |
cli |
init / run / chat / dev / trace / eval / doctor / plugin |
Develop
uv sync # install workspace + dev deps
uv run pytest # tests
uv run ruff check . # lint
uv run mypy # strict type-check
uv run mkdocs serve # preview docs at http://127.0.0.1:8000
See the Contributing guide to build your own middleware, provider, or backend and publish it as a plugin.
License
MIT © 2026 Research Analytics Solutions
Release files for spinekit 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| spinekit-0.3.0.tar.gz | 269.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spinekit-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 356.2 kB
Release files / spinekit-0.3.0.tar.gz
| Download URL | spinekit-0.3.0.tar.gz |
|---|---|
| Size | 269.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53e239f5bbb3f0f4e5dfa8f920a02b3575ec953697b5066ac712d84bcbb41738
|
|
BLAKE2b-256 checksum How to use checksums |
db7c9082e99161554a377e783b92a53025c8db303de951efac34f905c0672e7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 20, 2026.
Transparency logRelease files / spinekit-0.3.0-py3-none-any.whl
| Download URL | spinekit-0.3.0-py3-none-any.whl |
|---|---|
| Size | 86.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ef0aa33dc24c62ff851336993cb097d55ace09997a9c222b6c542c533315a3e7
|
|
BLAKE2b-256 checksum How to use checksums |
0f518d09c568d56d73ed59d5b7fb4522f1c70ef1b9af02b6a871f7c301f4cb22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 20, 2026.
Transparency log