Skip to main content
This guide helps you migrate existing agent code from other frameworks to AFK.

From LangChain

LangChain → AFK concepts

Basic agent migration

LangChain:
AFK:

Key differences

1. Agent is a config object, not a runtime:
2. Tools use Pydantic for validation:
3. Explicit execution modes:

Tool migration

LangChain tools:
AFK equivalents:

Memory migration

LangChain memory:
AFK memory:

Callback → Middleware migration

LangChain callbacks:
AFK middleware:

RAG migration

LangChain retrieval:
AFK approach:

From OpenAI Assistants API

Assistants → AFK concepts

Basic migration

OpenAI Assistants:
AFK:

Key advantages of AFK over Assistants API

  1. Local execution — No API calls needed for simple tasks
  2. Portable — Switch LLM providers without code changes
  3. Debuggable — Step through agent logic locally
  4. Testable — Run evals locally in CI
  5. Controllable — Full access to prompts, tools, and behavior

From custom agent code

Common patterns migration

Custom retry logic:
AFK:
Custom circuit breaker:
AFK:

Next steps

Quickstart

Build your first AFK agent in 5 minutes.

Core Concepts

Understand AFK’s design philosophy.

API Reference

Complete API documentation.

Examples

Runnable examples for every feature.