Skip to main content
Framework adapters let you use OpenTools inside existing agentic frameworks. Instead of OpenTools running the tool loop itself, the framework is able to control orchestration, memory, retries, and agent state. OpenTools focuses purely on exposing tools and schemas in a form the framework understands. This means that if you have a preferred agentic flow that you are already incorporating, you are still able to leverage our ecosystem as this adapts the tools to the correct format.

What is a framework adapter?

A framework adapter translates OpenTools tools into framework-native primitives. For example, LangGraph expects tools as callable objects with typed arguments and can handle when tools are called, how results are stored, and how agents progress. The OpenTools framework adapter is responsible for converting tool schemas into ompatible argument models capable of wiring tool execution to the OpenTools runtime. Unlike model adapters, framework adapters do not run a tool loop for you.
It is important to note the tool loop itself is optional where the model adapter provides a helpful quickstart for testing the tools.

What are the supported frameworks?

The two frameworks that are currently supported are: PydanticAI and LangGraph. Both the frameworks have their own expectations on how their tooling should look, where the latter even includes some of their own. For example, PydanticAI tools are built as pydantic_ai.Tool wrappers around an async function. The adapter enriches the tool description using the JSON schema so the model sees clear parameters. LangGraph tools are built as StructuredTool and require a typed argument model, so the adapter converts the JSON schema into a Pydantic BaseModel using create_model(…). Regardless of framework, tool execution is handled the same way through service.call_tool(...) where OpenTools enforces the same error policy. This means error semantics stay consistent whether tools are called via a framework or via a model adapter.

Next steps