AgentCore SDK Pro-Code Collaboration Guide

Updated at:
Copy as MD

For a high-code Agent to participate in team collaboration, it must first expose an AG-UI or OpenAI Chat Completions API. Either protocol is sufficient. After the collaboration capability is enabled on the platform, the application is deployed, and the Agent joins a team, the Agent can receive messages, reply, and participate in team discussions. Team communication alone does not require installing AgentCore SDK or integrating collaboration tools.

Note

Note: High-code collaboration is currently in a whitelist-only development phase. To try it out, submit a ticket to apply for access. This topic describes Worker integration. Leader task assignment and review capabilities through the collaboration extension package are not yet supported.

Prerequisites for SDK examples

  1. AgentCore is activated and a Workspace is created. For more information, see Manage Workspace.

  2. A model connection is created, a model that supports tool calling is configured, and the Agent is granted access. This topic uses my-model-connection and qwen3.8-max. Replace them with the actual names.

  3. The collaboration capability is enabled. Prepare to deploy the application to AgentCore and configure it as a Worker in a team.

  4. If the application needs to process files, prepare an existing, writable collaboration directory. Specify it using AGENT_WORKSPACE. If this variable is not set, the current working directory of the process is used.

The examples in this topic run in the AgentCore managed runtime environment. The platform provides the team configuration and access identity required for collaboration. You do not need to separately create an MCP service, cloud Skill, or MemoryStore. Integrate these resources as needed for your business requirements.

Integration overview

Protocol APIs handle team messaging, while collaboration tools operate on tasks and team collaboration resources. To fully use features such as task coordination and teamwork, including receiving and accepting subtasks, providing progress updates, sharing deliverables, and submitting results, you must register collaboration tools with the Agent through the SDK and use them with the collaboration prompt and built-in skills. Implementing only the protocol or replying "Completed" in a conversation does not automatically update the task status on the platform. The following examples describe this complete integration: add the following three components to the existing configuration when building the Agent.

Component

Purpose

Python

Node.js

Java

Collaboration prompt

Appends collaboration rules after the business prompt.

worker.compose_prompt(prompt)

worker.composePrompt(prompt)

collaboration.composePrompt(prompt)

Collaboration tools

Query tasks, accept tasks, provide progress updates, process files, and submit results.

worker.tools()

worker.tools()

collaboration.tools().block()

Collaboration skills

Provide instructions for task execution and team file sharing.

worker.skills()

await worker.skills()

collaboration.skills().block()

Built-in skills include task-execution (task execution) and file-sharing (team file sharing), and are provided with the collaboration package. Only installing the collaboration package or creating a Worker object does not automatically add these capabilities to the Agent. Complete registration as shown in the following examples.

Integrate with Python

Install dependencies

The following example uses Python 3.11 or later, builds the Agent with LangChain, and provides an HTTP service through AgentCoreServer.

python -m pip install \
  "alibabacloud-agentcore-sdk[server,langchain]==0.1.1" \
  "alibabacloud-agentcore-collaboration==0.1.1"

The collaboration extension package must be installed separately. Common capabilities are accessed through core.collaboration. For released versions, see PyPI.

Create the Agent service

Save the following code as app.py. Replace the model connection, model name, and business prompt with your configuration.

import logging

from langchain.agents import create_agent
from agentcore import AsyncAgentCore
from agentcore.integrations.langchain import (
    AgentCoreConverter,
    model,
    skill_tools,
    tools,
)
from agentcore.server import AgentCoreServer, AgentRequest

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger("collaboration_worker")
core = AsyncAgentCore.auto()
agent = None


async def startup():
    global agent
    try:
        worker = core.collaboration.worker()
        agent = create_agent(
            model=model("my-model-connection", model_name="qwen3.8-max"),
            system_prompt=worker.compose_prompt(
                "You are a business assistant. Answer user questions and use tools to complete the assigned work."
            ),
            tools=[
                *tools(worker.tools()),
                *skill_tools(worker.skills()),
            ],
        )
    except Exception:
        logger.exception("worker.startup.failed")
        await core.aclose()
        raise


server = AgentCoreServer(
    startup=startup,
    shutdown=core.aclose,
    readiness=lambda: agent is not None,
)


@server.invoke
async def invoke(request: AgentRequest, _context):
    if agent is None:
        raise RuntimeError("Agent is not initialized")

    # This example processes the current text input and does not maintain server-side chat history.
    message = request.messages[-1] if request.messages else None
    if message is None or not isinstance(message.content, str):
        raise ValueError("Expected a text message")

    # Create a converter for each execution to preserve text, tool calls, and result events.
    async for event in AgentCoreConverter().stream(
        agent.astream_events(
            {"messages": [{"role": "user", "content": message.content}]},
            version="v2",
        )
    ):
        yield event

Start the service:

uvicorn app:server --host 0.0.0.0 --port 9000

Integrate with Node.js

Install dependencies

Node.js 22.22 or later is recommended for the following LangChain example.

Install dependencies in the application directory. For an existing project, make sure package.json contains "type": "module". For a new project, you can run npm init -y first.

npm pkg set type=module
npm install alibabacloud-agentcore-sdk@0.1.2 \
  alibabacloud-agentcore-collaboration@0.1.2
npm install langchain@^1 @langchain/core@^1 @langchain/langgraph@^1 \
  @langchain/openai@^1 @langchain/anthropic@^1 zod@^4
npm install --save-dev tsx typescript @types/node

For released versions, see npm.

Create the Agent service

Save the following code as app.ts. Replace the model connection, model name, and business prompt with your configuration.

import { createAgent } from 'langchain';
import { AgentCore } from 'alibabacloud-agentcore-sdk';
import { AgentCoreServer } from 'alibabacloud-agentcore-sdk/server';
import {
  model, tools, AgentCoreConverter,
} from 'alibabacloud-agentcore-sdk/integrations/langchain';
import { skillTools } from 'alibabacloud-agentcore-sdk/skill';

const core = AgentCore.auto({ logger: console });

async function buildAgent() {
  const worker = await core.collaboration.worker();
  const client = await core.model('my-model-connection', {
    model: 'qwen3.8-max',
  });
  return createAgent({
    model: await model(client),
    systemPrompt: worker.composePrompt(
      'You are a business assistant. Answer user questions and use tools to complete the assigned work.',
    ),
    tools: tools([
      ...worker.tools(),
      ...skillTools(await worker.skills()),
    ]),
  });
}

let agent: Awaited<ReturnType<typeof buildAgent>> | undefined;
const server = new AgentCoreServer({
  logger: console,
  startup: async () => {
    try {
      agent = await buildAgent();
    } catch (error) {
      console.error('worker.startup.failed', error);
      await core.close();
      throw error;
    }
  },
  shutdown: () => core.close(),
  readiness: () => agent !== undefined,
  invoke: async function* (request) {
    if (!agent) throw new Error('Agent is not initialized');

    // This example processes the current text input and does not maintain server-side chat history.
    const content = request.messages.at(-1)?.content;
    if (typeof content !== 'string') {
      throw new Error('Expected a text message');
    }

    // The converter belongs to this execution and is not shared between concurrent requests.
    const converter = new AgentCoreConverter();
    for await (const event of agent.streamEvents(
      { messages: [{ role: 'user', content }] },
      { version: 'v2', signal: request.signal },
    )) {
      yield* converter.convert(event);
    }
  },
});

await server.start({ port: 9000, hostname: '0.0.0.0' });
for (const signal of ['SIGINT', 'SIGTERM'] as const) {
  process.once(signal, () => {
    void server.close().catch(error => {
      console.error(error);
      process.exitCode = 1;
    });
  });
}

Start the service:

npx tsx app.ts

If the image uses this startup command, it must include tsx. If development dependencies are excluded during the build, compile TypeScript to JavaScript first, and then use node to start the compiled output.

Integrate with Java

Install dependencies

Use JDK 17 or later and Maven 3.9 or later. The following example builds the Agent with LangChain4j and provides an HTTP service through AgentCoreServer.

The Java collaboration module is released separately. The example uses version 0.1.3 of the base SDK, server, and LangChain4j modules, and version 0.1.0 of the independent collaboration module. All are available from Maven Central.

Create pom.xml in the application directory:

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>example</groupId>
  <artifactId>collaboration-worker</artifactId>
  <version>1.0.0</version>
  <properties>
    <maven.compiler.release>17</maven.compiler.release>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <agentcore.version>0.1.3</agentcore.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>io.github.ai-agentcore</groupId>
      <artifactId>agentcore-sdk</artifactId>
      <version>${agentcore.version}</version>
    </dependency>
    <dependency>
      <groupId>io.github.ai-agentcore</groupId>
      <artifactId>agentcore-sdk-server</artifactId>
      <version>${agentcore.version}</version>
    </dependency>
    <dependency>
      <groupId>io.github.ai-agentcore</groupId>
      <artifactId>agentcore-sdk-langchain4j</artifactId>
      <version>${agentcore.version}</version>
    </dependency>
    <dependency>
      <groupId>io.github.ai-agentcore</groupId>
      <artifactId>agentcore-collaboration</artifactId>
      <version>0.1.0</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>2.0.17</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.14.0</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>3.5.1</version>
        <configuration>
          <mainClass>example.CollaborationApp</mainClass>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

Create the Agent service

Save the following code as src/main/java/example/CollaborationApp.java. Replace the model connection, model name, and business prompt with the actual configuration. This example runs in the AgentCore managed environment and does not require platform access credentials in the code.

package example;

import dev.langchain4j.invocation.InvocationParameters;
import dev.langchain4j.service.AiServices;
import dev.langchain4j.service.TokenStream;
import dev.langchain4j.service.UserMessage;
import io.agentcore.AgentCore;
import io.agentcore.Json;
import io.agentcore.collaboration.Collaboration;
import io.agentcore.collaboration.CollaborationContext;
import io.agentcore.langchain4j.AgentCoreLangChain4j;
import io.agentcore.langchain4j.LangChain4jEvents;
import io.agentcore.server.AgentCoreServer;
import io.agentcore.skill.Skill;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Map;

public class CollaborationApp {
    public interface Assistant {
        TokenStream chat(@UserMessage String input, InvocationParameters parameters);
    }


    public static void main(String[ ] args) throws Exception {

        var workspace = Path.of(
            System.getenv().getOrDefault("AGENT_WORKSPACE", ".")
        ).toAbsolutePath().normalize();
        Files.createDirectories(workspace);

        try (var core = AgentCore.auto();
             var collaboration = Collaboration.auto(core, workspace)) {
            // Resolve the model and register tools at application startup, rather than blocking initialization on request handling threads.
            var model = AgentCoreLangChain4j.streamingModel(
                core.model("my-model-connection", "qwen3.8-max").block()
            );
            var toolList = new ArrayList<>(collaboration.tools().block());
            toolList.addAll(Skill.tools(collaboration.skills().block(), workspace));

            var assistant = AiServices.builder(Assistant.class)
                .streamingChatModel(model)
                .systemMessageProvider(id -> collaboration.composePrompt(
                    "You are a business assistant. Answer user questions and use tools to complete the assigned work."
                ))
                .tools(AgentCoreLangChain4j.tools(toolList))
                .build();

            try (var server = new AgentCoreServer(request -> {
                // This example processes the current text input and does not maintain server-side chat history.
                if (request.messages().isEmpty()) {
                    throw new IllegalArgumentException("Expected a text message");
                }
                var message = request.messages().get(request.messages().size() - 1);
                var input = Json.text(message.get("content"), "message content");

                // The context comes from the actual platform request. Pass it independently for each invocation instead of storing it in the shared Agent.
                var context = CollaborationContext.fromHeaders(request.headers());
                Map<String, Object> metadata = context == null
                    ? Map.of() : Map.of(CollaborationContext.KEY, context);
                var parameters = InvocationParameters.from(metadata);

                // Preserve text, tool calls, tool results, and message boundaries.
                return LangChain4jEvents.from(() -> assistant.chat(input, parameters));
            }).start(9000)) {
                Runtime.getRuntime().addShutdownHook(new Thread(server::close));
                server.await();
            }
        }
    }
}

Start the service:

mvn compile exec:java

This command requires Maven in the image. You can also package and start the application using its existing build method, but make sure all runtime dependencies are included in the image.

The default AG-UI path for Java is /agui, and the OpenAI Chat Completions path is /openai/v1/chat/completions. Both listen on port 9000. The platform configuration must match the actual service. Do not apply the Python/Node.js /ag-ui/agent path directly to this example.

Integrate with other Java frameworks

The collaboration prompt, tools, and skills are not limited to LangChain4j. Existing Spring AI or AgentScope Java applications can retain their original frameworks and change only how tools are registered and the request context is passed:

Framework

Tool registration

Collaboration context for the current request

LangChain4j

AgentCoreLangChain4j.tools(toolList)

InvocationParameters.from(metadata)

Spring AI

Convert AgentCoreSpringAI.tool(tool) to ToolCallback

chatClient.prompt().toolContext(metadata)

AgentScope Java

Register AgentCoreAgentScope.tool(tool) with Toolkit

RuntimeContext.builder().sessionId(sessionId).putAll(metadata).build()

The metadata in the table is the same as in the complete example: use CollaborationContext.KEY as the key and pass the context parsed from the actual platform request headers. If no collaboration context exists, use an empty map. The sessionId for AgentScope Java uses the application's own session identifier.

Tools are registered during initialization, and the request context is passed for each execution. You do not need to rebuild the Agent for each request for collaboration, and you must not store the context of a request in a shared Agent field. Use LangChain4jEvents, SpringAIEvents, or AgentScopeEvents for streaming output to preserve tool calls and message boundaries.

For information about other frameworks and existing business resources, see Java SDK User Guide.

Deploy and verify collaboration

Deploy the application

Build the application and its dependencies into an image, and create or update a high-code Agent in AgentCore. The preceding examples use the following configuration.

Configuration item

Value or description

Service port

9000

Listen address

0.0.0.0

AG-UI protocol path

Python/Node.js: /ag-ui/agent; Java: /agui

OpenAI Chat Completions protocol path

/openai/v1/chat/completions

Liveness check

GET /healthz

Readiness check

GET /readyz

Collaboration directory

For example, AGENT_WORKSPACE=/workspace. Create the directory in advance and grant the application read and write permissions.

AgentCoreServer provides both of the preceding protocols by default. The protocol, path, and port configured on the platform must match the application. AG-UI is recommended if you need to display tool calls, results, and the execution process.

Join a team

Create or select a team on the platform, and add the high-code Agent as a Worker. Team configuration is managed by the platform. You do not need to write the team member list in the code or prompt.

Verify task execution

  1. Send a normal greeting to the Worker in a team conversation and confirm that it can reply properly.

  2. Ask, "Which team do you belong to, and who are the members?", and confirm that it can retrieve team information.

  3. Create a task through the Leader and assign a clearly scoped subtask to the Worker, such as preparing a brief summary and submitting the results.

  4. Check whether the Worker accepts the task, performs the work, and submits the results. If the task requires files, check whether the results include the deliverables.

  5. In the task view, confirm that the results have been submitted and proceed with the review. If revision is required, initiate the revision through the team workflow.

Note

Note: Verify team messaging and full task collaboration separately. A successful ordinary conversation verifies only messaging, and a successful health check verifies only service liveness. After integrating the SDK tools, actually assign a subtask to verify task acceptance, progress updates, and result submission. Sending "Test collaboration" does not automatically create a task.

Integrate with an existing Agent

You can retain the existing Agent's model, business prompt, tools, and skills, and add only the collaboration configuration:

  • Pass the business prompt to compose_prompt() / composePrompt(), and use the return value as the system prompt.

  • Convert worker.tools() for Python/Node.js or collaboration.tools() for Java into framework tools, and merge them with the existing business tools.

  • Add the skills returned by worker.skills() (collaboration.skills() for Java) to the Agent through the Skill adapter. Node.js uses await; Java returns Mono, and the example calls block() on the main initialization thread.

See the preceding complete examples for the composition method. Existing business tools and collaboration tools should not have duplicate names.

Normal conversations are still processed according to the business logic. The Agent does not need to query tasks for every request. When it receives a task assignment or revision notification, the Agent uses the collaboration tools and built-in skills to complete the corresponding work.

When using another framework, select its tool and event adapters. For detailed usage, see the Python SDK User Guide, Node.js SDK User Guide, and Java SDK User Guide.

Use a self-hosted server for collaboration

If an existing Agent uses its own HTTP service, you can retain the original server without switching to AgentCoreServer. The model can also continue to use its original integration method. You do not need to switch to a platform model connection for collaboration.

A self-hosted server must provide an AG-UI or OpenAI Chat Completions API supported by the platform. Collaboration tools are not required for team messaging alone. To fully use collaboration features such as task coordination and file delivery, add the collaboration prompt, tools, and skills provided by the SDK to the Agent during initialization. After receiving a request, Python/Node.js uses the request wrapping method, while Java passes the collaboration information for the current request through the framework's native invocation context. The requirements for platform activation, deployment, and joining a team are the same as described earlier.

The following Python/Node.js examples use an existing LangChain Agent. business_model/businessModel, business_prompt/businessPrompt, and business_tools/businessTools represent the application's existing model, prompt, and LangChain tool list, respectively. The Java example reuses the LangChain4j Assistant created earlier. Install dependencies as described in the respective language sections.

Python

from langchain.agents import create_agent
from agentcore import AsyncAgentCore
from agentcore.integrations.langchain import AgentCoreConverter, skill_tools, tools

# Run once during application initialization.
core = AsyncAgentCore.auto()
worker = core.collaboration.worker()
agent = create_agent(
    model=business_model,
    system_prompt=worker.compose_prompt(business_prompt),
    tools=[
        *business_tools,
        *tools(worker.tools()),
        *skill_tools(worker.skills()),
    ],
)


# Call this in the existing HTTP request handler and consume the returned events.
async def stream_agent(headers, messages):
    with worker.request_context(headers):
        async for event in AgentCoreConverter().stream(
            agent.astream_events({"messages": messages}, version="v2")
        ):
            yield event

Use the actual inbound request headers for headers, such as dict(request.headers) in FastAPI. Use the LangChain messages already converted by the application for messages. The existing service consumes the output of stream_agent() and writes the response using the original protocol. Call await core.aclose() when the application exits.

Node.js

import { createAgent } from 'langchain';
import { AgentCore } from 'alibabacloud-agentcore-sdk';
import {
  tools, AgentCoreConverter,
} from 'alibabacloud-agentcore-sdk/integrations/langchain';
import { skillTools } from 'alibabacloud-agentcore-sdk/skill';

// Run once during application initialization.
const core = AgentCore.auto({ logger: console });
const worker = await core.collaboration.worker();
const agent = createAgent({
  model: businessModel,
  systemPrompt: worker.composePrompt(businessPrompt),
  tools: [
    ...businessTools,
    ...tools([
      ...worker.tools(),
      ...skillTools(await worker.skills()),
    ]),
  ],
});

type AgentInput = Parameters<typeof agent.invoke>[0];

// Call this in the existing HTTP request handler.
async function streamAgent(
  headers: Record<string, string>,
  input: AgentInput,
  signal: AbortSignal,
  emit: (event: unknown) => Promise<void>,
) {
  await worker.requestContext(headers, async () => {
    const converter = new AgentCoreConverter();
    for await (const raw of agent.streamEvents(
      input, { version: 'v2', signal },
    )) {
      for (const event of converter.convert(raw)) await emit(event);
    }
  });
}

headers is a string map of the actual inbound request headers, input is the original Agent input, signal cancels execution when the client disconnects, and emit is implemented by the existing service. Call await core.close() when the application exits.

Java

Java can reuse the LangChain4j Assistant created earlier. The existing HTTP service calls the following method without starting AgentCoreServer:

import dev.langchain4j.invocation.InvocationParameters;
import example.CollaborationApp.Assistant;
import io.agentcore.collaboration.CollaborationContext;
import io.agentcore.event.AgentEvent;
import io.agentcore.langchain4j.LangChain4jEvents;
import java.util.Map;
import reactor.core.publisher.Flux;

// Add this method to an existing Java service class.
public static Flux<AgentEvent> streamAgent(
        Assistant assistant, Map<String, String> headers, String input) {
    return Flux.defer(() -> {
        var context = CollaborationContext.fromHeaders(headers);
        Map<String, Object> metadata = context == null
            ? Map.of() : Map.of(CollaborationContext.KEY, context);
        var parameters = InvocationParameters.from(metadata);
        return LangChain4jEvents.from(() -> assistant.chat(input, parameters));
    });
}

headers comes from the authenticated platform endpoint, and input is the text input for the current turn extracted by the application. The existing service converts the returned Flux<AgentEvent> into a response for the corresponding protocol and cancels the subscription when the client disconnects. Do not start a subscription detached from the request lifecycle just to output results. The collaboration object and Core are initialized by the application and closed when it exits.

Spring AI and AgentScope Java use the native invocation contexts in the preceding table. The Python/Node.js request wrapping methods are not needed.

Integrate with existing request handling logic

  • Retain the original ingress authentication. Python/Node.js passes platform request headers to the request wrapping method. Java parses CollaborationContext from the actual request headers and passes it through the framework invocation context. Do not generate collaboration context from the chat content.

  • The preceding functions output the SDK's AgentEvent, not SSE text that can be written directly to an HTTP response. The existing service must convert the events into the configured AG-UI or OpenAI Chat Completions response and preserve streaming heartbeats and disconnect cancellation. Raw LangChain events cannot be directly serialized as a protocol response.

  • Fully consume streaming results within the request wrapping scope. The Python example places the wrapper inside the generator. The Node.js example iterates and emits within the callback. Do not only return the generator and then consume it externally.

  • On the platform, enter the actual port and protocol paths provided by the self-hosted service. The preceding port 9000 and default paths belong to the AgentCoreServer examples. A self-hosted service is not required to use the same configuration.

These code snippets integrate with existing request handlers and do not start another HTTP service. If you use another Agent framework, retain the same request context passing method and use the tool and event adapters for that framework.

Usage notes

  • Task scope: A Worker executes the subtasks assigned to it. Task operations such as accepting tasks, providing progress updates, and submitting results must be initiated through the corresponding task collaboration entry point on the platform. Entering a task ID in an ordinary chat cannot replace task assignment.

  • File delivery: Local directories are used to temporarily store files. Files to be delivered should be uploaded through collaboration tools before the results are submitted. Generating only a local file does not mean it has been delivered. Local files are not guaranteed to be retained after an application restart.

  • Team file sharing: Use file-sharing for materials unrelated to a specific task. Confirm the file scope before synchronization to avoid uploading sensitive content such as credentials. When downloading a file with the same name, note the overwrite behavior.

  • Business execution capabilities: The collaboration package provides task and file collaboration capabilities, but does not replace business tools. To operate databases, generate files, or perform other business actions, you must still provide the Agent with the appropriate tools.

  • Chat history: The preceding examples process only the current text input and do not automatically save chat history. For multi-turn conversations, use the framework's session storage. Integrate long-term memory separately as needed for your business.

FAQ

Will the original prompt stop working after integration?

No. compose_prompt() / composePrompt() appends collaboration instructions after the original prompt and does not replace the business identity. Business tools and skills can also continue to be used.

Is AgentCoreServer required?

No. Existing AG-UI or OpenAI Chat Completions services can continue to be used. After the platform capability is enabled, the application is deployed, and the Agent joins a team, the collaboration SDK is not required for messaging alone. To fully use task coordination and teamwork, integrate the collaboration prompt, tools, and skills. Python uses worker.request_context() and Node.js uses worker.requestContext() to wrap the complete execution. Java places CollaborationContext in the framework's native invocation context, which the Java examples in this topic explicitly do. The Python/Node.js AgentCoreServer examples automatically bind the request context. Retain the application's original ingress authentication, protocol responses, and disconnect cancellation handling.

Why can't the Agent execute tasks after the collaboration package is installed?

Check the following in order: whether collaboration is enabled, whether the Agent has joined a team as a Worker, whether collaboration Prompt/Tools/Skills are registered, and whether a task has been assigned through the team workflow. Installing the package alone does not automatically complete these configurations.

Can the Agent still chat normally if it has not joined a team?

Yes. Without a team, collaboration operations are unavailable, but model conversations are not separately disabled as a result. The prerequisite is that the application itself has been initialized properly.

Why is there a final response but no visible tool execution process?

Make sure you use the event adapter for the corresponding framework and do not only concatenate text output. Python/Node.js uses AgentCoreConverter. The Java examples in this topic use LangChain4jEvents.from(). Convert each execution independently to preserve tool calls, tool results, and message boundaries. Use the AG-UI protocol when the full process needs to be displayed.

Why isn't the task completed immediately after results are submitted?

Submitting results and passing the review are two separate steps. After the Worker submits the results, the Leader or platform workflow continues the review. Refer to the actual status in the task view.

How do I troubleshoot call failures?

First check the application logs and error messages returned by collaboration tools. Confirm that the model is available, the team configuration is correct, and the task is still assigned to the current Worker. The Python example has logging enabled, and the Node.js example uses console for logging. Do not log access credentials or sensitive file content.

After a write operation times out, check the task status or results first to avoid duplicate submissions. If the issue remains unresolved, retain the occurrence time, Agent and task identifiers, and related error information, and contact technical support.

How do I upgrade collaboration capabilities?

The collaboration package can be upgraded independently, but version compatibility with the base SDK must be maintained. The Python example in this topic uses version 0.1.1 of both the base and collaboration packages, and the Node.js example uses version 0.1.2 of both. The Java example uses version 0.1.3 of the base SDK, server, and framework modules, and version 0.1.0 of the independent collaboration module. After updating dependencies, rebuild and redeploy the application.

Related topics