SpiceDB is an open-source, graph-based authorization system inspired by Google Zanzibar. It provides fine-grained, relationship-based access control for your applications.
Installation and setup
Install the Python SDK:Define your schema and permissions
Define your schema and permissions
Create a SpiceDB schema that defines your authorization model:Create relationships between users and resources:
Retriever
TheSpiceDBRetriever wraps any LangChain retriever with SpiceDB authorization filtering, removing documents the user does not have permission to access.
Tools
TheSpiceDBPermissionTool and SpiceDBBulkPermissionTool enable agents to check SpiceDB permissions before taking actions.
Runnables
SpiceDBAuthFilter is an LCEL-compatible Runnable for authorization in chains. SpiceDBAuthLambda is a lightweight wrapper for use with RunnableLambda.
LangGraph nodes
Factory functions and classes for adding authorization as a node in LangGraph workflows:Related resources
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

