A3S Docs
A3S Code

AHP Integration

Agent Harness Protocol 2.4 integration

AHP Integration

A3S Code exposes AHP 2.4 transport configuration so an external harness can be connected to the agent loop. Node sessions accept stdio, HTTP, WebSocket, and Unix socket transport objects; validate live harness behavior against the AHP server you deploy.

Event Surface

AHP events include handshake, session start/end, pre-action, post-action, pre-prompt, post-response, error, query, heartbeat, and idle.

Treat AHP decisions as an integration contract with your harness. Do not rely on organization policy behavior until it has been tested against the live AHP server you deploy.

Transports

Node sessions accept AHP transport objects:

import {
  HttpTransport,
  StdioTransport,
  WebSocketTransport,
  UnixSocketTransport,
} from '@a3s-lab/code';

const session = agent.session('/repo', {
  ahpTransport: new HttpTransport('http://localhost:8080/ahp', 'token'),
});

Available transports:

  • StdioTransport(program, args)
  • HttpTransport(url, authToken)
  • WebSocketTransport(url, authToken)
  • UnixSocketTransport(path) on Unix targets only

Unix sockets are not available on Windows targets.

ACL

ahp = {
  enabled = true
  url     = "http://harness:8080/ahp"
  idle_ms = 10000
}

Keep AHP decisions small and explicit. Let the coding agent continue doing local reasoning, while the harness handles the safety, context, approval, or idle control paths that your live integration test covers.

On this page