agentscope-java icon indicating copy to clipboard operation
agentscope-java copied to clipboard

[Feature]: Does AgentScope Java 2 provide a StateGraph-style workflow/graph API?

Open jadechenb5 opened this issue 4 months ago • 3 comments

Hi AgentScope team,

I am evaluating AgentScope Java 2 for a customer-service system with several deterministic, stateful workflows, such as:

  • ticket creation with slot collection, validation, confirmation, and submission
  • RAG retrieval, reranking, and answer generation
  • survey analysis with conditional branches and parallel processing
  • report generation with multiple dependent steps

I understand that AgentScope Java 2 provides ReActAgent/HarnessAgent, tools, middleware, subagents, Plan Mode, event streaming, and AgentState persistence.

However, I would like to clarify whether AgentScope Java 2 currently provides a workflow abstraction comparable to LangGraph-style graphs, specifically:

  1. A first-class StateGraph-like API for defining nodes, normal edges, conditional edges, loops, parallel branches, and fan-in joins.
  2. A shared, typed business state that flows through graph nodes, including reducer/merge semantics.
  3. Graph-level checkpointing and resume from a specific workflow node.
  4. Graph visualization or debugging support for workflow execution.
  5. A recommended built-in alternative for deterministic business workflows if such a graph API is not available.

I noticed that the Java 2 migration guide says the previous Pipeline, SequentialPipeline, and FanoutPipeline APIs were removed and suggests middleware, subagents, and event streams instead.

Could you confirm the current recommended approach?

More specifically: for deterministic business workflows, should we:

  • implement orchestration in ordinary Java code/state machines;
  • use AgentScope's ReActAgent/HarnessAgent with tools and subagents;
  • use an external workflow framework such as LangGraph4j;
  • or use another AgentScope module/API that I may have missed?

If there is a current or planned graph/workflow capability, could you please point me to the documentation or roadmap?

Thanks!

jadechenb5 avatar Jul 12 '26 12:07 jadechenb5

You can use the workflow of spring-ai-libaba. Or in combination with agentscope-java. https://github.com/alibaba/spring-ai-alibaba https://github.com/alibaba/spring-ai-alibaba/releases#release-v1.1.2.2

jujn avatar Jul 13 '26 07:07 jujn

🤖 AI Assessment: Question

Classification: Question (area/core, workflow)

Analysis: Good question. AgentScope Java 2 currently uses a ReAct-style agent loop rather than a StateGraph API. The current design emphasizes agent autonomy over explicit graph-based workflows.

Next Steps: A maintainer will provide guidance on workflow patterns.


Automated assessment by github-manager

oss-maintainer avatar Jul 14 '26 06:07 oss-maintainer

You can use the workflow of spring-ai-libaba. Or in combination with agentscope-java. https://github.com/alibaba/spring-ai-alibaba https://github.com/alibaba/spring-ai-alibaba/releases#release-v1.1.2.2

How to emit AgentScope native events such as ToolCallStartEvent and ToolCallEndEvent within Spring‑AI‑Alibaba (SAA) StateGraph workflow? These low‑level tool‑lifecycle events are not natively exposed by the SAA framework.

Alanyaeer avatar Aug 20 '26 08:08 Alanyaeer