Back to directory

af4j

A Java framework and runtime for building multi-agent AI systems on the JVM with explicit governance: human approval gates, spending budgets, tool access policies and durable execution that survives restarts.

af4j

af4j (AgentFlow4J) lets a JVM application build multi-agent workflows with explicit orchestration on Spring AI and the Spring ecosystem. A ToolPolicy restricts which tools an agent may call, a BudgetPolicy caps spend for a run, and an ApprovalGate pauses execution until a person approves a step; a CheckpointStore persists graph state so a run resumes from its last completed node after a restart, backed by JDBC or Redis.

It offers two API levels: a Squad API for dynamic routing with minimal setup, and a Graph API for explicit flows, loops and full control over multi-agent orchestration, including a coordinator agent and a parallel agent for fan-out. Other capabilities include a retry policy and failure classifier for resilience, and metrics, run logs and streaming events through Micrometer for observability.

A bundled sample runs a governed multi-agent customer-support workflow with no API key required, falling back to deterministic stubs, or calling Mistral when a key is set. It is installed through Maven or Gradle and released under the Apache-2.0 license.

More in Agent frameworks

See all 902
  • Recurse

    recurse.run

    A serverless harness that lets a coding agent design, test, and deploy its own specialist sub-agents as tools, MCP servers, or bots, defined by a schema-validated manifest.

  • ProofForge

    shulgin.is-a.dev

    An AI-agent pipeline that decomposes a mathematics problem, proves each piece, and formalizes the result in Lean 4 and Mathlib until the Lean kernel accepts it, with six of its proofs already merged into Google DeepMind's formal-conjectures repository.

  • local-coder

    github.com

    Builds a local coding-agent team on top of Ollama and OpenCode by detecting the machine's hardware, recommending models for seven specialist roles, and testing whether each assigned model can actually use tools, edit a repository and pass verification.