Sign inSign up

[Open-source] A high-controllable, YAML-driven Agent framework with autonomous evolution capabilities

Open SourceReports & Dashboards
2026-12-03 12:56 1 views • 0 downloads 0KB
[Open-source] A high-controllable, YAML-driven Agent framework with autonomous evolution capabilities

1. Project Overview

Hanflow

Harmony AI Nexus —— Based on LangGraph's High-Controllable Agent Orchestration Framework

Static Workflow · Dynamic Agent · Hybrid Orchestration, Unified DSL, No Mode Switching Required

2. Open Source License

Licensed under Apache-2.0

3. Screenshots

Image

4. Feature Overview

Hanflow (Harmony AI Nexus) is a highly controllable, YAML-driven Agent framework, equipped with autonomous evolution capabilities, built on LangGraph. It designs privacy model routing, RAG retrieval, human-machine collaborative approval, and full-link observability as first-class citizens — rather than after-the-fact patches.

Project Positioning

There are two lines of thought in the current AI orchestration field, each with its limitations:

  • AI Autonomous Planning (Dynamic Agent)
    Highly intelligent and flexible, but with poor controllability, prone to hallucinations, and difficult to meet the requirements of stability in production environments;
  • Workflow Orchestration (Static Workflow)
    Stable, reproducible, but lacks adaptability, unable to adapt to open-ended tasks.

Hanflow does not require a choice between the two.It inSame YAML DSLSupports both static and dynamic workflows simultaneously, as well as their recursive combinations, compiled to LangGraph StateGraph for execution, without mode switching throughout.

Furthermore, Hanflow will treat the following capabilities as first-class citizensrather than afterthoughts:

  • Privacy model routing (sensitive data automatically routed through local models)
  • RAG search (vector / full-text / hybrid)
  • Human-in-the-Loop (HITL)
  • Full-Path Observability (LangSmith / OpenTelemetry)

Key Advantages

1. Unified DSL, three types of orchestration forms

Declarative YAML is the system's only single source of truth, and can be integrated with Git version management, and subject to code review. The same syntax can express three types of orchestration forms at the same time:

Form

Applicable scenarios

Features

Pure static workflow

Standardized SOP process, compliance audit

Compiled DAG, strong determinism, reproducibility

Pure dynamic Agent

Open research, exploratory tasks

Coordinator coordinates multiple Agents, on-demand planning

Hybrid orchestration

Both deterministic skeleton and dynamic decision-making

Static nodes embedded with dynamic subgraphs, recursive composition

DSL natively supports depends_on, condition, retry, and error handling strategies per node.

2. 13 types of primitive nodes

An all-inclusive orchestration primitive, covering control flow, capability invocation, and state management, supporting static and dynamic recursive composition:

Grouping

Nodes

Control Flow

Sequential

 

·

 

Parallel

 

·

 

Loop

 

·

 

Branch

 

·

 

HITL

Capabilities

LLM

 

·

 

Tool

 

·

 

Research

 

·

 

Execution

Dynamically coordinated

Coordinator

Status

Memory

 

·

 

Subworkflow

Search

Knowledge

  • Research Atom
    With reference tracing, in-depth research with traceable conclusions.
  • Execution Atom
    With file system-based memory, task execution supports long-period work.
  • Subworkflow
    Workflows can be referenced, nested, and modularized for reuse.

3. Privacy Routing — Enterprise-level data compliance

ModelRouter provides6 routing strategiesWith priority arbitration:

privacy (hard)  >  role  >  task  >  cost  >  static+  fallback (only activated in case of failure)

Among themPrivacyStrategy is a veto-style constraint (score = ∞):

  • Based on sensitivity grading and PII (Personal Identifiable Information) detection, it automatically routes regulated loads to local models;
  • Supporting hard (no local model available, directly throw PrivacyViolationError to reject execution) and soft (soft degradation) two levels of enforcement;
  • Including PII, automatic execution of redaction (redact) before routing.

This enables Hanflow to safely land in strong compliance scenarios such as finance, healthcare, and government.

4. Multi-backend RAG Search

  • Three search modes:Vector search、 Full-text search、 Hybrid search;
  • Three fusion algorithms:RRF、 Weighted fusion、 Cascaded fusion;
  • Embedding and Reranker are both pluggable.

5. MCP Tool Bus

Unified Tool Access Layer, shielding underlying differences.5 types of transmission protocols:: stdio · sse · http · websocket · inprocess, and built-in flow control and destructive operation protection.

6. Sandbox Isolation Execution

Providing multi-level isolation for code execution nodes, balancing flexibility and security:

Mode

Description

LOCAL

Host process execution, zero additional dependencies

DOCKER

Container-level isolation, supporting resource restrictions, workspace mounting, and network policies

K8S

Cluster-level isolation (reserved)

NONE

No isolation (only used in trusted controlled environments)

7. Time Travel and Crash Recovery

L5 Persistent Layer adoptsCheckpoint / Session / Artifact three-level storage:

  • Run-time state can be checkpointed, and processes can be recovered from breakpoints after crashes;
  • Supports time travel (Time Travel) replay, which can be located at any historical state and replayed for execution.

8. Full-Link Observability

L6 Observability Layer cuts across the entire run-timeOne line to enable:

  • LangSmith
    Out-of-box Trace / Eval / Monitoring;
  • OpenTelemetry
    Integrate with existing observability systems.

Each node, each LLM call, and each tool call are automatically instrumented.

5. Tech Stack

Six-layer architecture

┌──────────────────────────────────────────────────────────┐│  L1 Delivery Layer Delivery      CLI · Web Studio · Python SDK      ││                          REST · WebSocket · Webhook        │├──────────────────────────────────────────────────────────┤│  L2 Orchestration Layer Orchestration  YAML DSL  ───compile──▶  LangGraph ││                           13Primitive nodes · static / dynamic recursive composition │├──────────────────────────────────────────────────────────┤│  L3 Capabilities Layer Capabilities  Research · Execution atomic │├──────────────────────────────────────────────────────────┤│  L4 Foundation Layer Foundation      ModelRouter · MCPBus · RAG │├──────────────────────────────────────────────────────────┤│  L5 Persistence Layer Persistence    Checkpoint · Session · Artifact │├──────────────────────────────────────────────────────────┤│  L6 Observability Layer Observability  LangSmith · OpenTelemetry │└──────────────────────────────────────────────────────────┘

Each layer has clear responsibilities and is mutually decoupled: DSL describes intent, the compilation layer converts it into executable graphs, the foundation layer is responsible for model and tool scheduling, the persistent layer ensures recoverability, and the observability layer provides transparency.


Quick Start

Environment Requirements

  • Python ≥ 3.11
  • (Optional) Docker, used for containerized deployment and sandbox isolation

One-Click Deployment (Docker Compose)

6. Source Code Repository

Open-source project address:

https://github.com/xpc1024/hanflow

#1
资源直链https://github.com/xpc1024/hanflow
Download

Next steps

Browse similar deployable resources