Fundamental breaking changes are happening now, affecting protocol, transport, and APIs. Consider this version experimental. Join Alpha discussions to help shape it.

The pre-alpha version of the Agent Communication Protocol is built on top of the Model Context Protocol. It extends the MCP specification with agents capability on the server side. The agents capability gives the client the means to discover and run agents.

Capabilities

Servers that support agents MUST declare the agents capability:

{
  "capabilities": {
    "agents": {}
  }
}

Protocol Messages

Listing Agents

To discover available agents, clients send a agents/list request.

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "agents/list",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "agents": [
      {
        "name": "gpa",
        "description": "General purpose agent",
        "inputSchema": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            }
          },
          "required": ["text"]
        },
        "outputSchema": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            }
          },
          "required": ["text"]
        }
      }
    ]
  }
}

Running Agents

To run an agent, clients send a agents/run request.

Request:

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "agents/run",
  "params": {
    "name": "gpa",
    "input": {
      "text": "Howdy!"
    }
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "output": {
      "text": "Howdy back at ya!"
    }
  }
}

The definition of input and output schemas is NOT part of the specification. Clients SHOULD NOT expect any specific schema for an agent prior to discovery through the agents/list response.

Progress

When a client wants to receive progress updates during a run, it MUST include a progressToken as defined in MCP specification. The server then MAY send agent progress notifications throughout the run.

Notification:

{
  "jsonrpc": "2.0",
  "method": "notifications/agents/run/progress",
  "params": {
    "progressToken": "abc123",
    "delta": {
      "text": "Howd"
    }
  }
}

The delta is a subset of the outputSchema. The sequence of deltas SHOULD constitute the final output when joined using the following algorithm.

Delta Algorithm

The rules for applying a delta to an existing in-progress output JSON are as follows, where output + delta => new_output denotest the combining operation:

  • Different types can’t be combined.
1 + ["hello"] => ERROR
  • Numbers combine by addition.
1 + 2 => 3
  • Strings combine by concatenation.
"hello" + "there" => "hellothere"
  • Objects combine by merging and combining values in common keys.
{a: 1, b: "hello"} + {b: "world", c: 2} => {a: 1, b: "helloworld", c: 2}
  • Combining a value with null results in the value.
value + null => value
null + value => value
  • Combining an empty array with an another array results in the another array.

    • Exception: When output is [] | null | undefined and the first element of delta is null, it is dropped. This is to ensure that appending to an array can be done without the knowledge of whether the array is currently empty or not.
array + [] => array
[] + array => array
[] + [null, "general", "Kenobi"] => ["general", "Kenobi"]
  • Non-empty arrays combine by combining the last element of output array with the first element of delta array, and appending the rest of the elements.
["hello", "there"] + ["general", "Kenobi"] => ["hello", "theregeneral", "Kenobi"]
["hello", "there"] + [null, "general", "Kenobi"] => ["hello", "there", "general", "Kenobi"]
[] + ["general", "Kenobi"] => ["general", "Kenobi"]
[] + [null, "general", "Kenobi"] => ["general", "Kenobi"]