agentao

ACP Support Epic

Epic

Title

ACP support for Agentao via stdio JSON-RPC server

Summary

Implement minimum viable Agent Client Protocol (ACP) support in Agentao so ACP-compatible clients can launch Agentao over stdio, create and load sessions, send prompts, receive streaming session updates, request tool permissions, and cancel active turns.

The first milestone targets a pragmatic compatibility layer on top of existing Agentao runtime abstractions rather than a full architecture rewrite. The implementation should reuse the current transport abstraction, session persistence, permission engine, cancellation flow, and MCP support where possible.

Goals

Non-goals for v1

Acceptance Criteria

Dependencies / Reuse

Risks

Issue 1

Title

Create ACP module skeleton and stdio JSON-RPC server foundation

Problem

Agentao does not expose any ACP-compatible server endpoint today. There is no JSON-RPC server, no ACP method dispatcher, and no ACP-specific module boundary.

Scope

Implementation Checklist

Acceptance Criteria

Issue 2

Title

Implement ACP initialize handshake and capability negotiation

Problem

ACP clients require an initialize handshake before any session methods. Agentao currently has no ACP capability advertisement layer.

Scope

Implementation Checklist

Acceptance Criteria

Issue 3

Title

Add ACP session registry and per-session Agentao runtime lifecycle

Problem

ACP is session-based, but Agentao currently does not maintain ACP session state or a registry of runtime instances keyed by ACP session ID.

Scope

Implementation Checklist

Acceptance Criteria

Issue 4

Title

Implement ACP session/new and runtime initialization from request params

Problem

There is no ACP entry point for creating a new session, binding a working directory, or injecting per-session MCP configuration.

Scope

Implementation Checklist

Acceptance Criteria

Issue 5

Title

Refactor Agentao to support per-session working directories

Problem

Current runtime code relies on Path.cwd() in several places. ACP sessions require working directory semantics that are not tied to the server process global cwd.

Scope

Implementation Checklist

Acceptance Criteria

Issue 6

Title

Implement ACP session/prompt with ContentBlock to Agentao message conversion

Problem

ACP prompt requests use structured content blocks, but Agentao currently accepts mostly string user input at its runtime boundary.

Scope

Implementation Checklist

Acceptance Criteria

Issue 7

Title

Implement ACP transport adapter for session/update notifications

Problem

Agentao emits internal runtime events, but ACP clients expect session/update notifications using ACP update types.

Scope

Implementation Checklist

Acceptance Criteria

Issue 8

Title

Map Agentao tool confirmations to ACP session/request_permission

Problem

Agentao tool confirmation is currently synchronous and transport-local. ACP requires a protocol-level permission request flow.

Scope

Implementation Checklist

Acceptance Criteria

Issue 9

Title

Implement ACP session/cancel using existing Agentao cancellation flow

Problem

ACP clients must be able to cancel an active turn. Agentao already has cancellation primitives, but they are not exposed as ACP session methods.

Scope

Implementation Checklist

Acceptance Criteria

Issue 10

Title

Implement ACP session/load and replay saved session history as ACP updates

Problem

Agentao can persist and load sessions locally, but ACP requires protocol-level session loading and replay through session/update.

Scope

Implementation Checklist

Acceptance Criteria

Issue 11

Title

Support session-scoped MCP server injection from ACP session/new

Problem

ACP session creation may include MCP server configuration, but Agentao currently loads MCP mostly from local config files at startup.

Scope

Implementation Checklist

Acceptance Criteria

Issue 12

Title

Add ACP CLI entrypoint and runtime wiring for stdio mode

Problem

There is no supported way to launch Agentao as an ACP server from the command line.

Scope

Implementation Checklist

Acceptance Criteria

Issue 13

Title

Add ACP unit, integration, and end-to-end test coverage

Problem

ACP support spans protocol framing, session state, transport mapping, cancellation, permissions, and persistence. Without dedicated tests, regressions will be hard to detect.

Scope

Implementation Checklist

Acceptance Criteria

Issue 14

Title

Document ACP support, limitations, and launch flow

Problem

ACP support will be non-obvious to users and contributors without dedicated documentation and clear statement of current limits.

Scope

Implementation Checklist

Acceptance Criteria

Suggested Milestones

M1: Basic ACP Connectivity

M2: Streaming, Permissions, Cancellation

M3: Persistence and MCP

M4: Hardening and Release