Skip to content

intutic_clawde.gate.adapters ​

Framework-specific gate adapters (Wave 1).

framework.py (one level up) is the framework-agnostic core: @guard wraps any callable, and guard_tools duck-types LangChain/LangGraph-style tool objects without importing them. That core already covers CrewAI and AutoGen tools directly (they are plain callables) and pre-1.0 LangChain tool objects.

This subpackage adds a thin adapter per framework for the cases where the framework publishes its OWN veto point — a middleware hook, a plugin callback, a guardrail decorator — richer than "wrap the callable": LangChain v1.x's AgentMiddleware.wrap_tool_call, CrewAI's before_tool_call hook, Google ADK's before_tool_callback, the OpenAI Agents SDK's @tool_input_guardrail, AutoGen's InterventionHandler.on_send, AG2's BaseMiddleware.on_tool_execution, Pydantic AI's WrapperToolset.call_tool, and smolagents' PythonExecutor.__call__ (code text, not a discrete tool call — see smolagents.py's module doc). Every adapter funnels into the same Gate.guard(tool_name, tool_input) core framework.py uses — there is exactly one enforcement decision in this package, just several ways to plug it into a framework's own call graph.

Each module here is optional-import guarded: importing intutic_clawde.gate.adapters.<x> never raises even when <x>'s framework is not installed. Only instantiating the adapter class (or calling the guardrail factory) requires the framework — install the matching extra, e.g. pip install intutic-clawde[crewai].

Modules (Wave 1 — verified against a real install, each with a non-mocked test suite): langchain.py IntuticMiddleware (LangChain v1.x AgentMiddleware) crewai.py install() — registers a before_tool_call hook google_adk.py IntuticPlugin (BasePlugin) + a per-agent callback fallback openai_agents.py intutic_tool_guardrail (a @tool_input_guardrail)

Modules (Wave 2 — also verified against a real install; each has its own, sometimes load-bearing, honesty note in its module doc — read before relying on the narrower ones): autogen.py IntuticInterventionHandler (on_send) — runtime-routed FunctionCall messages only autogen_workbench.py IntuticWorkbench (Workbench.call_tool) + guard_assistant_agent — the in-process half AssistantAgent actually exercises ag2.py IntuticMiddleware (on_tool_execution) + make_intutic_middleware pydantic_ai.py IntuticWrapperToolset (call_tool) + guard_agent(agent) smolagents.py IntuticPythonExecutor (code text, not a tool call) + intutic_step_callback

Modules (A4 — AWS Strands Agents; same verified-against-a-real-install discipline): strands.py IntuticHookProvider (BeforeToolCallEvent.cancel_tool) + install(agent)

Modules (Microsoft Agent Framework; same verified-against-a-real-install discipline): agent_framework.py IntuticFunctionMiddleware (FunctionMiddleware, no call_next() on deny) + install(agent)

Modules ​

ModuleSummary
intutic_clawde.gate.adapters.ag2AG2 adapter: IntuticMiddleware, plus make_intutic_middleware for an explicit Gate.
intutic_clawde.gate.adapters.agent_frameworkMicrosoft Agent Framework adapter: IntuticFunctionMiddleware, plus install(agent).
intutic_clawde.gate.adapters.autogenMicrosoft AutoGen adapter: IntuticInterventionHandler.
intutic_clawde.gate.adapters.autogen_workbenchMicrosoft AutoGen adapter, in-process half: IntuticWorkbench.
intutic_clawde.gate.adapters.crewaiCrewAI adapter: install() registers a before_tool_call hook.
intutic_clawde.gate.adapters.google_adkGoogle ADK adapter: IntuticPlugin (global) plus a per-agent callback fallback.
intutic_clawde.gate.adapters.langchainLangChain adapter: IntuticMiddleware, plus notes on the pre-1.0 path.
intutic_clawde.gate.adapters.managed_agentsAnthropic Managed Agents (public beta since 2026-04-08) — a session confirmation responder, plus guidance for the two execution surfaces this adapter does NOT cover the same way.
intutic_clawde.gate.adapters.openai_agentsOpenAI Agents SDK (Python) adapter: intutic_tool_guardrail.
intutic_clawde.gate.adapters.pydantic_aiPydantic AI adapter: IntuticWrapperToolset, plus guard_agent(agent).
intutic_clawde.gate.adapters.smolagentssmolagents adapter: IntuticPythonExecutor, plus intutic_step_callback.
intutic_clawde.gate.adapters.strandsAWS Strands Agents adapter: IntuticHookProvider, install(agent), and install_multiagent(graph_or_swarm).

The circuit breaker for AI agents