AxioRankDocs
Integrations

LangGraph

Govern every tool a LangGraph agent runs through the AxioRank gateway.

LangGraph builds on LangChain's tool layer, so the AxioRank adapter wraps your tools once and every node that calls them is governed, whichever prebuilt or custom graph runs them.

npm install @axiorank/sdk @langchain/core
import { AxioRank } from "@axiorank/sdk";
import { guardTools } from "@axiorank/sdk/langgraph";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const axio = new AxioRank({ apiKey: process.env.AXIORANK_API_KEY! });

const agent = createReactAgent({
  llm,
  tools: guardTools(myTools, axio, { onDeny: "return" }),
});

One adapter, both frameworks

@axiorank/sdk/langgraph and @axiorank/sdk/langchain expose the same functions; use whichever name matches your stack. The guarded tool keeps the original name, description, and schema, so it drops into any graph node.

pip install "axiorank[langchain]"

LangGraph (Python) executes tools through LangChain's tool layer too, so wrap each tool with the LangChain adapter and hand the wrapped tools to your graph:

from axiorank import AxioRank
from axiorank.integrations.langchain import guard_tool
from langgraph.prebuilt import create_react_agent

axio = AxioRank(api_key="axr_live_...")

agent = create_react_agent(
    llm,
    tools=[guard_tool(t, axio, on_deny="return") for t in my_tools],
)

onDeny: "return" feeds the refusal back to the model as the tool result so the graph can re-plan instead of crashing the run.

Next steps

On this page