infy.integrations wraps the tool or action chokepoint of frameworks you already use, so you can add deny-by-default policy, human approval, and a tamper-evident audit to agents you already run, without changing them.
The pattern
Every governed framework follows the same shape. You build aGovernance object once, then pass your existing tools through a govern adapter. The adapter returns drop-in replacements that route each execution through governance first.
verify().
The core stays zero-dependency. Each adapter lazily imports its framework, so nothing is pulled in until you import the adapter you need (for example
infy.integrations.smolagents).How govern works
govern takes your list of tools and the Governance object, plus an optional risk map, and returns wrapped tools.
1
You pass tools plus a risk profile
risk maps a tool name to {"verb": ..., "risk_tier": ..., "side_effect": ...}. This is the static metadata infy’s risk engine reads to decide whether a call is high enough risk to need a human.2
Unprofiled tools fail safe
Any tool not named in
risk gets the default profile, which is conservatively high-risk and side-effecting (verb: "EXECUTE", risk_tier: "high", side_effect: True). An unprofiled tool is escalated to a human approver rather than waved through.3
Execution passes through the chokepoint
Each wrapped tool calls
governance.before_tool(...) first. If the decision is not allowed, the original tool never runs and the block reason is returned to the model. If it is allowed, the tool runs and governance.after_tool(...) records the result.default argument:
What you get
The same governance guarantees that apply to native infy agents apply to wrapped ones:- Deny-by-default, fail-closed. Any error in policy, risk, or approval yields a deny, and is still audited. There is no path to a silent allow.
- Human approval gate. A pluggable
Approverpauses high-risk calls for a human yes or no, recorded in the audit chain. - Tamper-evident audit. Every decision is appended to a hash-chained log you can
verify().
Choose your framework
smolagents
Wrap
smolagents tools with infy.integrations.smolagents.govern. Governance gates each tool at Tool.forward.LangChain
Wrap LangChain tools with
infy.integrations.langchain.govern, the same pattern at the LangChain tool boundary.OpenHands
Plug infy governance into OpenHands through
infy.integrations.openhands.build_analyzer, an adapter for its SecurityAnalyzer hook.Runnable demos, including a real smolagents agent that has a destructive action denied and a deploy paused for a human, are in the repository
examples/ directory.