A declarative LangGraph-based framework for building multi-agent workflows
A plug-and-play multi-agent orchestration framework for developers building domain-specific AI systems with LangGraph β composable, declarative, and production-ready.
langgraph multi-agent llm ai-framework fastapi python orchestration yaml-config redis azure-openai agent-framework langchain workflow-engine conversational-ai state-management declarative modular production-ready
Multi-Agent Orchestration Framework
is a developer-oriented orchestration framework for building multi-agent, multi-domain AI systems powered by LangGraph.
It provides a structured, extensible runtime for combining:
- π§ Agents (decision-makers powered by LLMs)
- π Nodes (graph-executable logic units)
- π§° Tools (external integrations)
- πΎ Memory (Redis-based short-term state)
- βοΈ Providers (Azure OpenAI, etc.)
Together, they form intelligent conversational workflows defined declaratively via YAML β
so developers can rapidly compose and extend domain-specific AI applications without reimplementing orchestration logic.
Build modular, reasoning-driven AI systems β without writing orchestration code.
| Feature | Description |
|---|---|
| π§© Fully Modular | Agents, Nodes, Tools, and Providers are decoupled and reusable. |
| π§ Intent + Workflow System | Combine intents.yaml and workflow.yaml to define complex multi-domain logic. |
| π NodeβAgent Hierarchy | Nodes orchestrate, Agents decide β offering fine-grained control and LLM flexibility. |
| πΎ Stateful Memory Layer | Redis backend for short-term conversational memory and context recall. |
| π LangGraph-Powered Runtime | Build and execute dynamic computational graphs with full async support. |
| π FastAPI Integration | Out-of-the-box /chat endpoint ready for serving agents as microservices. |
| π§ Extensible by Design | Plug in your own domains, agents, or tools in minutes. |
+-----------------------------------------------------------+
| π§ Multi-Agent Orchestrator |
|-----------------------------------------------------------|
| AgentRouter | LangGraphBuilder | StateManager |
+-----------------------------------------------------------+
| YAML-defined Domain Workflows |
|-----------------------------------------------------------|
| Nodes β Agents β Tools β Providers β LLMs |
|-----------------------------------------------------------|
| Redis Memory | FastAPI API | Extensible Providers |
+-----------------------------------------------------------+
This structure allows you to design your own domain workflows
(e.g., school, finance, support) by simply defining intents and linking nodes/agents in YAML.
Example: The framework orchestrating a full reasoning flow β from intent classification and LangGraph construction to AzureOpenAI inference and Redis state persistence.
git clone https://github.com/yx-fan/agent-flow-framework.git
cd agent-flow-framework
pip install -r requirements.txt
cp .env.example .envThen edit .env to configure Redis and Azure OpenAI (or your preferred provider if you update related code).
uvicorn main:app --host 0.0.0.0 --port 8001 --reloadAccess the API at
π http://127.0.0.1:8001/chat
π Interactive API Documentation:
- Swagger UI: http://127.0.0.1:8001/docs
- ReDoc: http://127.0.0.1:8001/redoc
curl -X POST "http://127.0.0.1:8001/chat"
-H "Content-Type: application/json"
-d '{"query": "hello. what is llm?"}'In the body, you can also specify a domain and additional session_id if needed:
-d '{"query": "hello. what is llm?", "domain": "hello", "session_id": 20ffa3c6-4af9-4412-adc6-ed16ca1f71a7"}'{
"session_id": "20ffa3c6-4af9-4412-adc6-ed16ca1f71a7",
"query": "hello",
"domain": "hello",
"result": {
"domain": "hello",
"intent": "greet",
"result": {
"query": "hello. what is llm?",
"domain": "hello",
"greeting": "Hello there π! Let me think about that for you...",
"agent_reply": "π Hello! You said: 'hello. what is llm?'.\nLLM says: Hi there! π LLM stands for \"Large Language Model.\" It's a type of advanced AI designed to understand and generate human-like text. Think of it as a virtual assistant or brainy language buddy that can help with everything from answering questions to creating stories! Did you want to know more about it? π",
"timestamp": "2025-11-09T20:41:57.600949",
"llm_used": true
}
}
}β
The framework dynamically loads the hello domain workflow β
executes GreetingNode β calls HelloAgent β routes through AzureOpenAIProvider.
data/hello/intents.yaml
intents:
greet:
description: Simple greetings and small talk.
keywords: ["hello", "hi", "hey", "morning"]data/hello/workflows/hello_workflow.yaml
greet:
nodes:
- name: Greeting
type: node
class: GreetingNode
agent: HelloAgent
edges: []This modular structure lets you add new domains
by simply creating a folder like data/school/ or data/finance/
and defining custom intents.yaml + workflow.yaml files.
agent-flow-framework/ βββ core/ # Base abstractions & registry βββ orchestrator/ # LangGraph builder & orchestration logic βββ nodes/ # Domain-specific nodes βββ agents/ # Domain-specific agents βββ tools/ # External API / DB / function tools βββ data/ # Domain intents & workflows (YAML) βββ providers/ # LLM providers (AzureOpenAI, etc.) βββ memory/ # Memory interface & Redis implementation βββ api/ # FastAPI endpoints βββ main.py # FastAPI entrypoint βββ requirements.txt
Multi-Agent Orchestration Framework consists of three layers β from low-level abstraction to runtime orchestration β each clearly separated and independently extensible.
| Layer | Role | Key Components | Purpose |
|---|---|---|---|
| π§© Execution Layer | Executes business and cognitive logic directly | Node, Agent, Tool |
Executes domain rules and workflows, performs LLM reasoning, and interacts with external systems. |
| βοΈ Core Layer | Provides foundational abstractions and common capabilities | BaseAgent, BaseNode, BaseTool, Config, Logger, MemoryInterface, Registry, Exceptions |
Ensures unified lifecycle, structured logging, configuration management, memory abstraction, dynamic registration, and error modeling. |
| πΉοΈ Orchestration Layer | Runtime orchestration and multi-domain routing | LangGraphBuilder, AgentRouter, StateManager, OrchestratorImpl, ReflectionNode, FeedbackManager |
Builds LangGraph workflows from YAML, routes by domain or intent, manages session state and memory, and coordinates multi-agent execution. |
Base Abstractions:
base_agent.py, base_node.py, base_tool.py
Define a consistent lifecycle (pre_* β execute β post_*) and encapsulate error handling across all components.
Configuration & Logging:
config.py loads environment variables and system settings;
logger.py provides structured, contextual logging with traceable IDs.
Registry:
registry.py enables dynamic registration and runtime discovery of nodes, agents, and tools β supporting modular plug-and-play extensibility.
Memory Interface:
memory_interface.py unifies short-term (e.g., Redis) and long-term (e.g., vector store) memory operations through a consistent interface.
Exception Model:
exceptions.py defines standardized errors (AgentError, NodeError, β¦) to ensure predictable error propagation and graceful recovery.
Responsibilities:
Drives runtime orchestration, workflow construction, and multi-domain coordination.
- LangGraphBuilder: Parses YAML definitions and constructs executable LangGraph workflows.
- AgentRouter: Selects the appropriate agent based on intent recognition or contextual routing.
- StateManager: Manages conversation state, context persistence, and execution cache.
- OrchestratorImpl: The central execution engine β handles unified entrypoints, async execution, exception flow, and callback control.
- ReflectionNode / FeedbackManager: Support reflective reasoning, evaluation, and multi-agent feedback loops.
Node:
Encapsulates deterministic logic or structured data transformation steps.
Agent:
Handles reasoning and decision-making using LLMs, capable of invoking nodes and tools dynamically.
Tool:
Bridges the system to the external world (APIs, databases, file systems), designed to be declarative, stateless, and reusable.
You can easily extend the framework by adding:
- a new domain (e.g.,
data/finance/) - a new agent that inherits from
BaseAgent - or a new tool that implements
BaseTool.
Then just register it in your YAML workflow β no orchestration code changes required.
Contributions, issues, and feature requests are welcome!
Feel free to open a Pull Request or start a discussion.
Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.
If you find this framework useful, please give it a βοΈ star β it helps others discover the project and keeps development active!
MIT License Β© 2025 Yuxin Fan
