STEERPLANE

Framework Integrations

Drop-in guardrails for LangChain, CrewAI, AutoGen, and the OpenAI Agents SDK.

SteerPlane integrates with popular agent frameworks by registering as their native callback or hook — so you get the full guardrail pipeline (loop detection, cost, policy, approvals) with your agent code unchanged. Each integration is a monitor/handler class that accepts the familiar agent_name, max_cost_usd, max_steps, max_runtime_sec, and model arguments.

LangChain

SteerPlaneCallbackHandler — a BaseCallbackHandler.

CrewAI

SteerPlaneCrewMonitor — step & task callbacks.

AutoGen

SteerPlaneAutoGenMonitor — a reply-function hook.

OpenAI Agents SDK

SteerPlaneAgentHooks — lifecycle hooks.

LangChain

from steerplane.integrations.langchain import SteerPlaneCallbackHandler

handler = SteerPlaneCallbackHandler(agent_name="research_agent", max_cost_usd=10)

llm.invoke(prompt, config={"callbacks": [handler]})

handler.finish()   # finalize the run (status="completed" by default)

CrewAI

from steerplane.integrations.crewai import SteerPlaneCrewMonitor

monitor = SteerPlaneCrewMonitor(agent_name="crew_run", max_cost_usd=15)

crew = Crew(
    agents=[...],
    tasks=[...],
    step_callback=monitor.step_callback,
    task_callback=monitor.task_callback,
)

result = monitor.kickoff(crew)   # runs the crew under SteerPlane control

AutoGen

from steerplane.integrations.autogen import SteerPlaneAutoGenMonitor

monitor = SteerPlaneAutoGenMonitor(agent_name="autogen_group", max_steps=40)

# Register SteerPlane as a reply hook on your agent...
assistant.register_reply([autogen.Agent, None], monitor.create_reply_hook())

# ...or drive the conversation through the monitor:
monitor.initiate_chat(user_proxy, assistant, message="Investigate the incident")

OpenAI Agents SDK

from steerplane.integrations.openai_agents import SteerPlaneAgentHooks

hooks = SteerPlaneAgentHooks(agent_name="oa_agent", max_cost_usd=8)

agent = Agent(
    name="oa_agent",
    instructions="...",
    hooks=hooks,   # SteerPlane captures LLM calls, tool calls, and handoffs
)

Every integration routes captured LLM calls, tool invocations, and agent steps through the same unified pipeline — so loop detection, cost ceilings, and policies behave identically across frameworks. Each is lazily imported, so you only need the framework you actually use installed.

On this page