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.2.0.tar.gz (207.0 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.2.0-py3-none-any.whl (84.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for spinekit-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d274294f29ab88b88d0410d7d9e5f8409a1f8a953bcb80e6e9d7a53b01b063bd
MD5 f4033764a596d1c8f0086a185ea162b2
BLAKE2b-256 f4a4749eec449b9e18b021dc6e5a925371a99f14633cdb30a415563182b0eac8

See more details on using hashes here.

Provenance

The following attestation bundles were made for spinekit-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: spinekit-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 84.5 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ba88b968a654575b99d36d6f14bdbe6edb8343fd3f2dcb0a1c463c8e89ed3af
MD5 bd617a1e7a9be8b56690e520e4a2c1cd
BLAKE2b-256 4ab72f851434e2046badf5745abe9468a6313cb62bea4890365946244f1bf292

See more details on using hashes here.

Provenance

The following attestation bundles were made for spinekit-0.2.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