# FastAgency

> An open-source Python framework for deploying AG2 multi-agent workflows to production with unified UI, REST API, and distributed messaging support.

FastAgency is an open-source Python framework maintained by ag2ai that accelerates the transition from prototype to production for multi-agent AI workflows. It provides a unified programming interface for deploying AG2 (formerly AutoGen) agentic workflows across development and production environments. The project is licensed under Apache License 2.0 and hosted at github.com/ag2ai/fastagency.

## What It Is

FastAgency sits between the AG2 agentic framework and production infrastructure. Rather than being another agent framework itself, it solves the deployment gap: developers write their multi-agent workflows once using AG2, then FastAgency handles how those workflows are served — as a console app, a web chat interface, a REST API, or a fully distributed message-broker system. The framework is designed so that scaling from a local Jupyter notebook prototype to a multi-datacenter deployment requires only a few lines of code changes.

## Core Architecture

FastAgency is built around three composable layers:

- **User Interfaces**: `ConsoleUI` for terminal-based interaction and `MesopUI` (via Google's Mesop) for web-based chat applications.
- **Network Adapters**: `FastAPIAdapter` for serving workflows over REST using FastAPI/ASGI workers, and `NatsAdapter` for high-throughput distributed setups using NATS.io message broker via FastStream.
- **Runtime**: Currently, the only supported runtime is AG2 (formerly AutoGen), with plans to add more frameworks.

These layers are chainable, so a single workflow definition can be wired to a console for local testing, then re-wired to FastAPI + NATS for production without rewriting agent logic.

## Key Capabilities

- **Unified workflow interface**: Write agent logic once; deploy to console or web without code duplication.
- **OpenAPI integration**: Import an OpenAPI spec and connect it to agents in a few lines, enabling real-time external API calls from within workflows.
- **Tester Class for CI**: A built-in testing utility lets developers write automated tests for multi-agent interactions and plug them into CI pipelines.
- **CLI orchestration**: A command-line interface manages workflow execution, parameter passing, and agent monitoring without a GUI.
- **Cookiecutter scaffolding**: A Cookiecutter template generates a full project structure with devcontainer support, Docker scripts, and Fly.io deployment scripts out of the box.

## Setup Path

The recommended setup uses Cookiecutter to scaffold a project, which generates folder structure, a default workflow, devcontainer configuration for VS Code, and deployment scripts. After scaffolding, developers set an LLM API key (e.g., OpenAI), run tests with pytest, and iterate locally using MesopUI at localhost:8000. Production deployment is handled via Docker or GitHub Actions pushing to Fly.io.

## Update: v0.10.2

The latest release is v0.10.2, published on December 9, 2025, according to the GitHub repository. The repository shows version history going back to v0.0, with the current stable series at v0.10. The project was created in July 2024 and remains actively maintained, with the last push recorded in February 2026. The roadmap notes planned support for additional agent frameworks beyond AG2, additional network providers, and additional UI frameworks.

## Features
- Unified programming interface across ConsoleUI and MesopUI
- Seamless OpenAPI/external API integration into agent workflows
- FastAPI REST adapter for ASGI-based production serving
- NATS.io message broker adapter for distributed deployments
- Tester Class for CI pipeline integration
- Command-line interface for workflow orchestration
- Cookiecutter project scaffolding with devcontainer support
- Docker build and run scripts
- Fly.io deployment via GitHub Actions
- AG2 (AutoGen) runtime support
- Multi-worker workflow serving
- Chainable network adapters

## Integrations
AG2 (AutoGen), FastAPI, NATS.io, FastStream, Google Mesop, OpenAI, Fly.io, GitHub Actions, Docker, Visual Studio Code devcontainers, Cookiecutter

## Platforms
WINDOWS, MACOS, LINUX, WEB, API, VSC_EXTENSION, DEVELOPER_SDK, CLI

## Pricing
Open Source

## Version
v0.10.2

## Links
- Website: https://fastagency.ai/
- Documentation: https://fastagency.ai/latest/user-guide/getting-started/
- Repository: https://github.com/ag2ai/fastagency
- EveryDev.ai: https://www.everydev.ai/tools/fastagency
