Skip to main content
This is preview documentation. The official release is not yet available.
A customer asks why an order has not shipped and requests delivery tomorrow. Specialized Agents investigate orders, inventory, logistics, and service policy; a fulfillment Leader coordinates a resolution and verifies actual business outcomes. This reduces cross-system lookup and handoffs while retaining evidence, decisions, and execution history. All five Agents, including the Leader, are AgentScope Java applications registered as External Agents. Applications retain their deployment and tools. Service provides discovery, dispatch, collaboration, and observation; business systems retain their rules and data.

Prepare data and connectivity

Download the fixed business dataset as business-data.json. It contains three fictional orders, inventory, logistics, and policies for tool development and acceptance. It is not a running OMS/WMS/TMS service or a complete Agent application. Prepare Java 17+, matching AgentScope and agentscope-extensions-aistio versions, a model, Service connectivity, and application credentials for the target Namespace. For standard Service deployments, start with Java HTTP registration. First back tools with the fixture and validate individual tasks, then connect actual enterprise APIs. Enforce caller access to orders in the business system; a supplied customerId is not an identity credential.

1. Develop five business Agents

Implement business functions in each AgentScope Toolkit. These are example application tool contracts, not built-in Service APIs: Diagnosis uses read-only tools. Business writes validate the approved action, order version, and authorization in the service. Model text saying “approved” does not authorize a change; an invented number is not a real resolution record.

2. Connect task execution

Use a distinct agentKey per application and stable, distinct instanceKey values per replica. Adapt the following initialization fragment:
This is an integration fragment. catalogAgent is the directory Agent; taskAgentFactory is a Supplier<HarnessAgent> providing the role’s model, tools, instructions, and isolated execution context. Configure config using the registration guide. An administrator supplies controlUrl and serviceToken to the trusted application backend, not Endpoint callers. HarnessAgentTaskStarter connects task context, collaboration actions, and result reporting. Implement business tools separately and avoid shared mutable conversation state. The Leader must also use delegation and coordinator completion correctly. Validate success, failure, cancellation, and concurrent isolation before forming a Team. Registration alone does not establish these capabilities; see External execution.

3. Create the fulfillment Team

Under DESIGN → Agents, check all five External Bindings, online instances, and task capabilities. Under DESIGN → Teams, select fulfillment-lead as Leader and add the four specialists.
Create an Issue for O-1001, requesting arrival on 2026-09-15, with phase diagnose. Specify that these are fixed exercise dates rather than relative to today.

4. Verify investigation

The result must establish:
  • O-1001 is awaiting_stock; original warehouse W-A has zero availability.
  • W-B has eight units, which does not mean they were reserved or the warehouse changed.
  • There is no tracking number. Candidate earliest arrival is 2026-09-16, without a guarantee.
  • The requested 2026-09-15 cannot be promised from the evidence; a warehouse change needs approval.
  • The diagnosis proposes options and open questions without modifying business state.
O-1002 has shipped and calls for shipment investigation. O-1003 is cancelled and cannot reuse the warehouse-change plan. Also test unknown orders, inconsistent data, and unavailable business APIs, including explicit escalation or uncertainty.

5. Publish for an online application

Publish a Team Job Endpoint named order-triage from Connections. Configure its input schema as follows. This diagnostic interface accepts only diagnose; callers cannot select an execution phase themselves.
Set BASE_URL to the Gateway origin and ENDPOINT_TOKEN to this Endpoint’s key. Submit from the business backend:
Retain invocationId, eventsUrl, and statusUrl. Display progress using the SSE guide and read invocation.result after completion. Its business structure follows your output contract; intermediate model messages are not final customer responses. Keep the Endpoint key in the business backend, which supplies and verifies customer authorization context.

6. Approve, execute, and verify

For the complete loop, connect diagnosis Team → approval → execution Team in a Workflow. Team nodes may use the same team with different phases and tool authorization:
  1. Diagnosis produces the exact plan, order version, action, and evidence. Define structured output before mapping actual fields in the designer.
  2. Present that plan to the designated approver. Rejection ends this disposition without business changes.
  3. Execution reads the approval and refreshes business state. Changed versions or material conditions require a new diagnosis rather than an outdated action.
  4. Create a resolution with a stable business idempotency key, query its outcome, and consolidate results. An accepted record with failed execution is partial completion.
Validate and publish a revision following Workflow guidance, then publish a separate Endpoint for the complete process. Automatic Endpoint Job completion is not business approval. SSE reconnection must not repeat business writes.

Acceptance and production integration

Keep tool contracts and criteria when replacing fixtures with production sources, authentication, and business validation. Disable exercise Endpoints, resolve outstanding runs, and clean simulated records afterward. Fixtures and SDK fragments do not establish a completed enterprise integration.