Skip to content

Getting Started

AgentSpine is an adaptive control plane for production AI agents. This guide will help you get up and running with the SDK in minutes.

You can install the AgentSpine SDK directly from PyPI:

Terminal window
pip install agentspine

If you need Redis support for high-performance deduplication, install with the optional dependency:

Terminal window
pip install "agentspine[redis]"

AgentSpine requires:

  • Python 3.11+
  • Postgres 16+ (Primary state store)
  • Redis 7+ (Optional, for deduplication and caching)

If you have Docker installed, you can start the required infrastructure with a single command using our provided compose file:

Terminal window
# Clone the repository
git clone https://github.com/Hrushi11/AgentSpine.git
cd AgentSpine
# Start Postgres and Redis
docker compose up -d postgres redis

Here is a minimal example of using the AgentSpine SDK to track a task execution:

import asyncio
from agentspine import AgentSpine
async def main():
# Initialize the spine for a specific workflow
spine = AgentSpine(workflow="customer_onboarding")
# Track a task execution
result = await spine.execute_task(
task_id="onboard_user_123",
action="send_welcome_email",
params={"email": "user@example.com"}
)
print(f"Task status: {result.status}")
if __name__ == "__main__":
asyncio.run(main())

Now that you have AgentSpine running, explore these topics: