SuperAPIAI Directory

agent-adapter

github.com · AI agents

Agent Adapter is an open-source, framework-agnostic Python SDK for registering ordinary Python functions as LLM tools and reusing them across 21 frameworks or engines such as LangChain, CrewAI, and ADK. All tool calls go through a single executor with built-in human approval, budgets, cost tracking, caching, guardrails, and tracing. The core depends only on pydantic, with each framework loaded on demand as an optional dependency. It can also be used standalone without an agent framework, providing the run_tool_loop agent loop and Flow graph orchestration, and supports integration via MCP, HTTP, and other means. It requires Python 3.11+ and is licensed under Apache-2.0.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsAPI

About this tool

Agent Adapter is an open-source agent framework built around "tools," positioned to let developers write a tool once and use it safely in any agent framework, any backend, or a standalone runtime environment. The project is maintained by VeloceAI, is currently at version 1.2.0, requires Python 3.11 or later, and is licensed under Apache-2.0.

Purpose and positioning: The core problem the project solves is that each agent framework has its own tool format, its own concept of approval, and no unified cost view; once you switch frameworks or run two frameworks at once, security rules must be rewritten. Agent Adapter centralizes these rules in one place so that every call from any source goes through the same executor, with frameworks, protocols, and model APIs serving only as thin adapter layers on top of the executor.

Key capabilities:

  1. Tool registration and reuse: Write tools as ordinary Python functions, register them to the default registry via @aa.tool, and call them through the default executor with aa.call; for asynchronous code, use await aa.acall(...). Tool schemas are validated uniformly at startup.
  2. Multi-framework support: Officially stated to support 21 frameworks and engines, including LangChain, CrewAI, ADK, and others; each framework is an optional extra dependency, imported lazily.
  3. Unified executor: All calls go through the same executor, which applies approval, budgets, guardrails, caching, and cost tracking.
  4. Human approval: Tools with confirm=True run only after one-time approval; calls can be persisted in SQLite and resumed later in any process.
  5. Budgets, limits, cost, and logging: Built-in budget, limit, cost tracking, and logging capabilities.
  6. Flow graph orchestration: A Flow is a validated graph built around a single pydantic state; it can be run by the local FlowRunner, and the same graph can be compiled to LangGraph and ADK; it supports Map fan-out, Join merging, and Merge rules that define how parallel writes are merged, and nodes can set pause=True to wait for human intervention.
  7. Built-in agent loop: run_tool_loop can drive any model port to make tool calls until an answer is produced, and each call likewise goes through the executor, so approval, caching, budget, and cost rules all apply.
  8. Protocol integration: Supports exposing the same set of tools via MCP and HTTP, and provides a TypeScript client; A2A and AG-UI are described in the "Connect anywhere" documentation.
  9. Run the viewer and chat: record runs via agent_adapter.viewer.record(executor), and open the local viewer to see the run list, a navigable flow diagram, a timeline, filtered events, state, and cost; when launched together with the agent, the same page becomes a chat interface. The viewer binds only to 127.0.0.1 and opens via a private token link.

Usage: after installation, write ordinary Python functions and register them with @aa.tool to call them in supported frameworks, or use run_tool_loop and Flow directly. The project provides a Quickstart, example files (such as examples/hello.py, examples/hello_approval.py, examples/first_flow.py, examples/tool_loop.py), a golden path tutorial, and feature documentation. You can also use an agent skill to let AI assist with configuration: npx skills add VeloceAI/agent-adapter --skill agent-adapter -a <agent>, or use /plugin marketplace add VeloceAI/agent-adapter in Claude Code.

Use cases: reusing tools across multiple agent frameworks, wanting unified approval and budget control, needing cost tracking and run tracing, needing human-in-the-loop approval or pause/resume, needing to orchestrate multi-step processes as graphs, and scenarios where you want to attach tools and safety capabilities directly to LLM calls in services such as FastAPI.

Limitations and notes: requires Python 3.11+; the core depends only on pydantic, and each framework integration is an optional dependency; the viewer binds locally only; before production use, you should read the threat model and the API stability policy. The project has a check gate requiring coverage of no less than 90%, and runs checks such as ruff, mypy --strict, and mkdocs build --strict. The specific pinned versions for each framework, the support matrix, and the complete feature list need to be checked in the official installation and feature documentation; this material does not provide them one by one.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools