Skip to content

Question: Clarify difference between StdioAcpAgentTransport and StdioAcpClientTransport ? #5

@cmoulliard

Description

@cmoulliard

Question

What is the difference between the StdioAcpAgentTransport and StdioAcpClientTransport as the class definition looks very similar ?
Is it because when we use StdioAcpAgentTransport, the JSON RPC ACP server is already running and the agent will read the messages from it ? How then can it read such messages ?

Is the main purpose of the StdioAcpAgent instead to create for testing purposes ACP agent replying the JSON RPC prompts, messages, etc. Example: https://github.com/markpollack/acp-java-tutorial/blob/main/module-12-echo-agent/src/main/java/com/acptutorial/module12/EchoAgent.java ?

/**
 * Implementation of the ACP Stdio transport for agents that communicates with clients
 * using standard input/output streams. Messages are exchanged as newline-delimited JSON-RPC
 * messages over stdin/stdout, with errors and debug information sent to stderr.
 *
 * <p>
 * This is the agent-side counterpart to {@code StdioAcpClientTransport}. While the client
 * spawns an agent process and connects to its stdin/stdout, the agent transport reads from
 * the process's System.in and writes to System.out.
 * </p>
 *
 * <p>
 * Key features:
 * <ul>
 * <li>Thread-safe message processing with dedicated schedulers</li>
 * <li>Proper resource management and graceful shutdown</li>
 * <li>Backpressure support via Reactor Sinks</li>
 * </ul>
 *
 * @author Mark Pollack
 */
public class StdioAcpAgentTransport implements AcpAgentTransport {

vs

/**
 * Implementation of the ACP Stdio transport that communicates with an agent process using
 * standard input/output streams. Messages are exchanged as newline-delimited JSON-RPC
 * messages over stdin/stdout, with errors and debug information sent to stderr.
 *
 * <p>
 * This is a full-featured transport with:
 * <ul>
 * <li>Thread-safe message processing with dedicated schedulers</li>
 * <li>Proper resource management and graceful shutdown</li>
 * <li>Error stream handling</li>
 * <li>Backpressure support via Reactor Sinks</li>
 * </ul>
 *
 * @author Mark Pollack
 * @author Christian Tzolov (MCP Java SDK)
 * @author Dariusz Jędrzejczyk (MCP Java SDK)
 */
public class StdioAcpClientTransport implements AcpClientTransport {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions