Faramesh offers one-line governance for popular AI agent frameworks. Wrap your tools or agents and route every action through Faramesh for policy checks before execution.
Supported Frameworks
Framework
Integration
What You Get
LangChain
GovernedTool wrapper
Wrap LangChain tools; tool calls go through Faramesh
CrewAI
GovernedCrew, GovernedTool
Govern crew and tool execution
AutoGen
GovernedFunction
Wrap AutoGen function calling
MCP
GovernedMCPClient
Govern Model Context Protocol tools
LangGraph
Governed graph nodes
Wrap tool calls in graph nodes
LlamaIndex
Tool wrapping
Wrap LlamaIndex agent tools
DSPy
GovernedModule
Govern DSPy module execution
LangChain
Wrap any LangChain tool with GovernedTool. Tool calls are submitted to Faramesh first; if allowed or approved, execution proceeds.
fromlangchain.toolsimportShellToolfromfaramesh.integrations.langchainimportGovernedToolshell_tool = ShellTool()governed_shell = GovernedTool(tool=shell_tool,agent_id="my-agent")# Use like a regular LangChain toolresult = awaitgoverned_shell.arun("ls -la")
fromlangchain.toolsimportShellToolfromfaramesh.integrations.langchainimportGovernedToolshell_tool = ShellTool()governed_shell = GovernedTool(tool=shell_tool,agent_id="my-agent")# Use like a regular LangChain toolresult = awaitgoverned_shell.arun("ls -la")
fromlangchain.toolsimportShellToolfromfaramesh.integrations.langchainimportGovernedToolshell_tool = ShellTool()governed_shell = GovernedTool(tool=shell_tool,agent_id="my-agent")# Use like a regular LangChain toolresult = awaitgoverned_shell.arun("ls -la")
Set FARAMESH_URL (or FARAMESH_API_BASE) and FARAMESH_API_KEY (or FARAMESH_TOKEN).
Demo: Run demo_agents/01_langchain_delete_all.py to see blocking rm -rf while allowing safe commands. See LangChain Demo.
CrewAI
Use GovernedCrew or GovernedTool to govern crew and tool execution.
fromfaramesh.integrations.crewaiimportGovernedTool,GovernedCrew# Wrap tools or crewgoverned_tool = GovernedTool(tool=my_tool,agent_id="crew-agent")
fromfaramesh.integrations.crewaiimportGovernedTool,GovernedCrew# Wrap tools or crewgoverned_tool = GovernedTool(tool=my_tool,agent_id="crew-agent")
fromfaramesh.integrations.crewaiimportGovernedTool,GovernedCrew# Wrap tools or crewgoverned_tool = GovernedTool(tool=my_tool,agent_id="crew-agent")
Demo: Run demo_agents/02_crewai_infinite_loop.py to see rate limiting and loop prevention.
AutoGen
Wrap AutoGen function calling with GovernedFunction.
fromfaramesh.integrations.autogenimportGovernedFunction# Wrap your function; calls go through Farameshgoverned_refund = GovernedFunction(fn=refund_fn,agent_id="autogen-agent")
fromfaramesh.integrations.autogenimportGovernedFunction# Wrap your function; calls go through Farameshgoverned_refund = GovernedFunction(fn=refund_fn,agent_id="autogen-agent")
fromfaramesh.integrations.autogenimportGovernedFunction# Wrap your function; calls go through Farameshgoverned_refund = GovernedFunction(fn=refund_fn,agent_id="autogen-agent")
Demo: Run demo_agents/03_autogen_high_value_approval.py to see human-in-the-loop for high-value transactions.
MCP (Model Context Protocol)
Use GovernedMCPClient for MCP tool servers.
fromfaramesh.integrations.mcpimportGovernedMCPClient# MCP tool calls routed through Farameshclient = GovernedMCPClient(agent_id="mcp-agent")
fromfaramesh.integrations.mcpimportGovernedMCPClient# MCP tool calls routed through Farameshclient = GovernedMCPClient(agent_id="mcp-agent")
fromfaramesh.integrations.mcpimportGovernedMCPClient# MCP tool calls routed through Farameshclient = GovernedMCPClient(agent_id="mcp-agent")
Demo: Run demo_agents/04_mcp_filesystem_security.py for path-based access control.
LangGraph
Wrap tool calls in your graph nodes. Submit actions to Faramesh before executing.