Skip to main content

FlowGram Overview

The AI4J FlowGram direction is not the frontend canvas itself, but rather the Java backend execution layer built around the FlowGram.ai canvas.

Let's clarify the boundaries first:

  • FlowGram.ai is the frontend workflow canvas / editor.
  • ai4j-flowgram-spring-boot-starter provides the Java backend task API, runtime facade, node execution, and trace bridge.
  • ai4j-flowgram-demo and ai4j-flowgram-webapp-demo are demo surfaces for demonstration and integration testing.

In One Sentence

AI4J FlowGram solves:

Converting workflow graphs drawn on the frontend into verifiable, runnable, cancellable, and observable Java tasks on the backend.

It is not about wrapping an Agent in a visual UI, but rather centers on an explicit workflow schema, task lifecycle, and node executor contract.

When to Use FlowGram

ScenarioSuitable?
The task is naturally a node graph, with conditional branches, loops, and stable inputs/outputsSuitable
The frontend needs to let users drag, edit, and run workflowsSuitable
The platform needs validate, run, report, result, and cancel APIsSuitable
You want the model to freely decide the next step at each stepSee Agent instead
Local repo read/write, shell, patch, approvalSee Coding Agent instead
Just a single model callOnly Core SDK needed

System Layers

LayerModule / Entry PointResponsibility
Frontend canvasai4j-flowgram-webapp-demo, FlowGram.aiEdit nodes, connections, forms, and the run UI
Spring Boot integrationai4j-flowgram-spring-boot-startertask API, configuration, authentication extensions, task store
Execution engineFlowGramRuntimeServiceParse schema, create tasks, schedule nodes, finalize results
Node extensionsFlowGramNodeExecutorHTTP, VARIABLE, CODE, TOOL, KNOWLEDGE, and other node extensions
AI capabilitiesai4j, ai4j-agentReuse of LLM nodes, Tool, Knowledge, and trace

Default Task API

By default, the starter exposes the task control plane around /flowgram:

APIPurpose
POST /flowgram/tasks/validateValidate the workflow schema
POST /flowgram/tasks/runStart an asynchronous task
GET /flowgram/tasks/{taskId}/reportView node status, trace, and process report
GET /flowgram/tasks/{taskId}/resultGet the final result
POST /flowgram/tasks/{taskId}/cancelCancel the task

This shows that FlowGram's default form is an asynchronous task backend, not a "single HTTP request that returns model text directly".

Relationship with Agent

FlowGram and Agent can reuse the same set of AI4J capabilities, but advance differently.

DimensionAgentFlowGram
AdvancementThe model and runtime decide the next stepThe workflow graph decides the next step
StructureFree-form loops, tool loops, handoffsExplicit nodes, edges, conditions, and task lifecycle
Suitable forMulti-step reasoning, dynamic tool selectionStable processes, platform-level orchestration, visual operations
ObservabilityAgent event / tracetask report / node status / trace bridge

LLM nodes can reuse the Agent runtime, but FlowGram does not turn the entire workflow back into free-form reasoning.

What to Confirm Before Going Live

Default config targets demos, not production-ready

The default configuration is more suited to demos and intranet integration testing. Before going to production, confirm:

  • Whether the API has authentication or gateway protection.
  • Whether the task store has been switched from memory to a persistence solution that meets your needs.
  • Whether report is allowed to return node details and trace.
  • Whether HTTP / CODE / TOOL / KNOWLEDGE nodes have allowlists, timeouts, and audit.
  • Whether the conversion from the frontend editing schema to the backend execution schema is stable.
  • Whether cancel, failure retry, exception display, and log masking are covered.

For more checklist items, see Production Checklist.

  1. Why FlowGram
  2. Use Cases and Paths
  3. Quickstart
  4. Architecture
  5. Runtime
  6. Frontend / Backend Integration
  7. API and Runtime
  8. Built-in Nodes
  9. Custom Nodes

If you are working on local repo tasks, you should start with Coding Agent; if you are building a general-purpose business agent, you should start with Agent.