Framework Integrations
Substr8 works with any framework that supports tool calling.
Supported Frameworks
| Framework | Status | Auto-detect |
|---|---|---|
| LangGraph | ✅ | Yes |
| PydanticAI | ✅ | Yes |
| AutoGen | ✅ | Yes |
| CrewAI | ✅ | Yes |
| DSPy | ✅ | Yes |
LangGraph
from langgraph.prebuilt import create_react_agent
from langchain_anthropic import ChatAnthropic
llm = ChatAnthropic(model="claude-sonnet-4-20250514")
tools = [...] # Your tools
agent = create_react_agent(llm, tools)Run with governance:
substr8 run agent.pyPydanticAI
from pydantic_ai import Agent
agent = Agent(
'anthropic:claude-sonnet-4-20250514',
tools=[...],
)Run with governance:
substr8 run agent.py --framework pydantic-aiAutoGen
from autogen import AssistantAgent, UserProxyAgent
assistant = AssistantAgent("assistant", llm_config={...})
user = UserProxyAgent("user")Run with governance:
substr8 run agent.py --framework autogenCrewAI
from crewai import Agent, Task, Crew
researcher = Agent(role="Researcher", goal="Find information", ...)
task = Task(description="Research topic", agent=researcher)
crew = Crew(agents=[researcher], tasks=[task])Run with governance:
substr8 run agent.py --framework crewaiDSPy
import dspy
lm = dspy.LM("anthropic/claude-sonnet-4-20250514")
dspy.configure(lm=lm)
class MyModule(dspy.Module):
def forward(self, question):
return dspy.ChainOfThought("question -> answer")(question=question)Run with governance:
substr8 run agent.py --framework dspyZero-Friction Integration
Wrap any agent with govern():
from substr8 import govern
# Before
agent = create_react_agent(llm, tools)
# After
agent = govern(create_react_agent(llm, tools))The wrapper automatically:
- Starts run lifecycle
- Wraps tool calls
- Records audit entries
- Generates RunProof on completion
Framework Detection
Substr8 auto-detects frameworks by scanning imports:
# Detected as langgraph
from langgraph.prebuilt import create_react_agent
# Detected as pydantic-ai
from pydantic_ai import Agent
# Detected as autogen
from autogen import AssistantAgentForce detection with --framework:
substr8 run agent.py --framework langgraph