Skip to content

gitstq/agent-adapter

Repository files navigation

agent-adapter

Multi-framework AI Agent Definition Format Converter

Convert AI agent definitions between Claude Code, LangChain, CrewAI, OpenAI Agents SDK, and AutoGen with a single command.

Features

  • 5 Frameworks Supported: Claude Code, LangChain, CrewAI, OpenAI Agents SDK, AutoGen
  • Auto-Detection: Automatically detect source format from file structure
  • CLI + Web UI: Use the command line or the optional web interface
  • Batch Processing: Convert entire directories at once
  • Schema Validation: Built-in validation ensures output correctness
  • Zero Dependencies (core): Only Python stdlib + pydantic required

Installation

pip install agent-adapter

With web UI:

pip install "agent-adapter[web]"

Development:

git clone https://github.com/gitstq/agent-adapter
cd agent-adapter
pip install -e ".[dev]"

Quick Start

CLI

# Auto-detect and convert
agent-adapter convert input.json output.yaml

# Specify formats explicitly
agent-adapter convert input.yaml output.json --from langchain --to claude_code

# Detect format
agent-adapter detect input.json

# Batch convert a directory
agent-adapter batch ./agents/ ./converted/ --to claude_code

# Show all supported formats
agent-adapter info

Web UI

agent-adapter-web
# Then open http://localhost:8000

Python API

from agent_adapter.core.converter import Converter

# Convert between formats
result = Converter.convert(
    source_data,
    source_format="langchain",
    target_format="claude_code",
)

# Convert a file
Converter.convert_file("input.yaml", "output.json", target_format="crewai")

Supported Formats

Format CLI Name Description
Claude Code claude_code Claude Code project definition
LangChain langchain LangChain agent and chain definition
CrewAI crewai CrewAI crew and agent definition
OpenAI Agents SDK openai_agents OpenAI Agents SDK format
AutoGen autogen Microsoft AutoGen multi-agent config

License

MIT

About

Multi-framework AI Agent definition format converter - Claude Code, LangChain, CrewAI, OpenAI Agents SDK, AutoGen

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages