rifft-sdk
Python SDK for Rifft, a cross-framework debugger for multi-agent AI systems.
rifft-sdk lets you instrument Python agents, spans, handoffs, tool calls, and decisions, then view the resulting trace in Rifft with communication graphs, timelines, replay, and MAST failure classification.
Install
pip install rifft-sdk
Add the optional adapter for your framework:
pip install rifft-sdk rifft-langgraph # LangGraph
pip install rifft-sdk rifft-crewai # CrewAI
pip install rifft-sdk rifft-autogen # AutoGen / AG2
pip install rifft-sdk rifft-mcp # MCP
Quickstart
import rifft
rifft.init()
@rifft.trace(agent_id="researcher", framework="custom")
def run_research():
with rifft.span("tool.call", agent_id="researcher"):
return {"summary": "Agent trace debugging helps teams inspect handoffs."}
run_research()
rifft.init() now works with sensible defaults:
project_id="default"endpoint="http://localhost:4318"service_nameinferred from your current directory- installed adapters like
rifft-langgraph,rifft-crewai,rifft-autogen, andrifft-mcpauto-instrument on init
For hosted cloud projects, pass the project credentials directly or set env vars:
import rifft
rifft.init(
project_id="proj_your_project_id",
endpoint="https://ingest.rifft.dev",
api_key="rft_live_xxxxxxxxxxxx",
)
Supported env vars:
RIFFT_PROJECT_IDRIFFT_ENDPOINTRIFFT_API_KEYRIFFT_SERVICE_NAME
Claude Code Integration
Automatically trace every Claude Code session — every tool call, timing, and error — without changing your workflow.
pip install rifft-sdk
rifft-claude init --project-id YOUR_PROJECT_ID --api-key YOUR_API_KEY
rifft-claude init registers hooks in ~/.claude/settings.json. From then on, every Claude Code session sends a trace to Rifft when it ends: one root claude-code.session span with a child span per tool call (Bash, Read, Edit, Write, Task, and so on).
What you'll see in Rifft:
- Full tool call sequence with timing
- Errors surfaced automatically (failed Bash commands, missing files)
- MAST classification applied to the session (tool loops, hallucinated tool calls)
- Traces appear the moment a session ends — no code changes needed
Check your setup:
rifft-claude status
Credentials are stored in ~/.rifft/config.json (chmod 600). You can also use env vars:
export RIFFT_PROJECT_ID=your_project_id
export RIFFT_API_KEY=rft_live_xxxxxxxxxxxx
What You Get
- trace capture for Python multi-agent workflows
- agent and tool spans with timing and cost metadata
- communication edges and handoff visibility
- Claude Code session tracing with zero code changes
- compatibility with Rifft adapters: LangGraph, CrewAI, AutoGen, and MCP
Links
- Repository: https://github.com/rifft-dev/rifft
- Issues: https://github.com/rifft-dev/rifft/issues
Metadata
Release files for rifft-sdk 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rifft_sdk-0.1.2.tar.gz | 14.8 kB | Without provenance | Details for rifft_sdk-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rifft_sdk-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for rifft_sdk-0.1.2-py3-none-any.whl |
Total release size: 27.2 kB
Release files / rifft_sdk-0.1.2.tar.gz
| Download URL | rifft_sdk-0.1.2.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
624daf20ea101ccf47cbcb82cea499f4dace170e7e55c63411ef2b2eb45bec97
|
|
BLAKE2b-256 checksum How to use checksums |
cc0f825f0db8d686924e53ef9e63f340b84fd8cbcb68ced3e33278e1b10544f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.12
|
Release files / rifft_sdk-0.1.2-py3-none-any.whl
| Download URL | rifft_sdk-0.1.2-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e4e942347149ba42f249f49d9c6410627e9558e705fde2e2a8df743ec622b91
|
|
BLAKE2b-256 checksum How to use checksums |
3c4dde0ad2d9b619d023d28ba6af8e61d6e90319fd5d1950dd958f4b1bc398f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.12
|
Security for rifft-sdk 0.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.