Skip to main content

A lightweight, modular, protocol-native runtime for production AI agents.

Project description

Spine

Spine

A lightweight, modular, protocol-native runtime for production AI agents.

CI MIT License Python 3.12+ Docs

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 Message objects.
  • 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spinekit-0.3.0.tar.gz (269.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spinekit-0.3.0-py3-none-any.whl (86.3 kB view details)

Uploaded Python 3

File details

Details for the file spinekit-0.3.0.tar.gz.

File metadata

  • Download URL: spinekit-0.3.0.tar.gz
  • Upload date:
  • Size: 269.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spinekit-0.3.0.tar.gz
Algorithm Hash digest
SHA256 53e239f5bbb3f0f4e5dfa8f920a02b3575ec953697b5066ac712d84bcbb41738
MD5 32bb34f76adc7b02f90362c9b75cfae2
BLAKE2b-256 db7c9082e99161554a377e783b92a53025c8db303de951efac34f905c0672e7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for spinekit-0.3.0.tar.gz:

Publisher: release.yml on Research-Analytics-Solutions/spine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spinekit-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: spinekit-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 86.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spinekit-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef0aa33dc24c62ff851336993cb097d55ace09997a9c222b6c542c533315a3e7
MD5 42f2431518d160f17edc6dcdafe22615
BLAKE2b-256 0f518d09c568d56d73ed59d5b7fb4522f1c70ef1b9af02b6a871f7c301f4cb22

See more details on using hashes here.

Provenance

The following attestation bundles were made for spinekit-0.3.0-py3-none-any.whl:

Publisher: release.yml on Research-Analytics-Solutions/spine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page