Skip to content

AF4J

Build AI agents you can trust in production.

AF4J is a framework and runtime for governed, stateful multi-agent systems on the JVM.

Human approvals · Checkpoints · Budget controls · Tool policies · Durable execution

Get started Core concepts GitHub


Why AF4J?

  • Build multi-agent workflows with explicit orchestration
  • Persist execution across failures and restarts
  • Add human approval where it matters
  • Control tool access and AI spend
  • Run natively on the JVM and Spring ecosystem

Core capabilities

Capability What it does AF4J
Multi-agent orchestration Build agent teams with routing and fan-out AgentGraph, CoordinatorAgent, ParallelAgent
Governance Control what agents can call, change, or spend ToolPolicy, StatePolicy, BudgetPolicy, ApprovalGate
Durable execution Survive restarts, resume from last checkpoint JdbcCheckpointStore, RedisCheckpointStore
Human-in-the-loop Pause before critical actions, resume on approval ApprovalGate
Resilience Classify failures, retry smart, route to fallback RetryPolicy, FailureClassifier, BudgetAwareRouter
Observability Metrics, run logs, streaming events Micrometer, RunLog, Flux<AgentEvent>

Install

AF4J is on Maven Central:

<dependency>
    <groupId>io.github.datallmhub</groupId>
    <artifactId>agentflow4j-starter</artifactId>
    <version>1.0.2</version>
</dependency>

See Getting started for Gradle and the first agent.


Try the demo in 5 minutes

git clone https://github.com/datallmhub/agentflow4j.git
cd agentflow4j
mvn install -DskipTests -q
mvn -pl agentflow4j-samples exec:java

Runs SupportTriageDemo: a governed multi-agent workflow with ToolPolicy and ApprovalGate active. No API key required.


Where to next


Scope

AF4J is an independent open-source project. It is not an official Spring project.