Download the PHP package arcp/sdk without Composer

On this page you can find all versions of the php package arcp/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sdk

ARCP PHP SDK

PHP SDK for the Agent Runtime Control Protocol (ARCP) — submit, observe, and control long-running agent jobs from PHP.

Packagist CI PHP version ARCP Codecov

Specification · Concepts · Install · Quick start · Guides · API reference


arcp/sdk is the PHP reference implementation of ARCP, the Agent Runtime Control Protocol. It covers both sides of the wire — Arcp\Client\ARCPClient for submitting and observing jobs, Arcp\Runtime\ARCPRuntime for hosting agents — so either side can talk to any conformant peer in any language without hand-rolling the envelope, sequencing, or lease enforcement.

ARCP itself is a transport-agnostic wire protocol for long-running AI agent jobs. It owns the parts of agent infrastructure that don't change between products — sessions, durable event streams, capability leases, budgets, resume — and stays out of the parts that do. ARCP wraps the agent function; it does not define how agents are built, how tools are exposed (that's MCP), or how telemetry is exported (that's OpenTelemetry).

Installation

Requires PHP 8.4 or newer and Composer 2.x. The SDK ships as a single Composer package; the bin/arcp CLI is registered automatically so vendor/bin/arcp is available in any project that pulls it in.

The pdo_sqlite, mbstring, and json extensions are required (all bundled with most PHP distributions). The runtime uses Amp v3 + fibers; no extra extension is needed for async.

Quick start

Connect to a runtime, submit a job, stream its events to completion:

This is the whole shape of the SDK: open a session, submit work, consume an ordered event stream, get a terminal result or error. Everything below is detail on those four moves.

Concepts

ARCP organizes everything around four concerns — identity, durability, authority, and observability — expressed through five core objects:

The SDK models each of these as first-class objects; the rest of this README shows how.

Guides

Sessions and resume

Open a session, negotiate features, and reconnect transparently after a transport drop using the resume token — jobs keep running server-side while you're gone.

Submitting jobs

Submit a job with an agent (optionally version-pinned as name@version), an input, and an optional lease request, idempotency key, and runtime limit.

Consuming events

Iterate the ordered event stream — log, metric, event.emit, tool.invoke, tool.result, job.progress, job.result_chunk, artifact.ref — and optionally acknowledge progress so the runtime can release buffered events early.

Leases and budgets

Request capabilities, a budget, and an expiry; read budget-remaining metrics as they arrive; handle the runtime's enforcement decisions.

Subscribing to jobs

Attach read-only to a job submitted elsewhere and observe its live stream (with optional history replay) without cancel authority.

Error handling

Catch the typed error taxonomy and respect the retryable flag — LEASE_EXPIRED and BUDGET_EXHAUSTED are never retryable; a naive retry fails identically.

Feature support

ARCP features this SDK negotiates during the hello/welcome handshake:

Feature flag Status
heartbeat Supported
ack Partial
list_jobs Supported
subscribe Supported
lease_expires_at Supported
cost.budget Supported
model.use Supported
provisioned_credentials Supported
progress Supported
result_chunk Supported
agent_versions Supported

Transport

ARCP is transport-agnostic. This SDK ships a WebSocket transport (default), an stdio transport for in-process child runtimes, and an in-memory transport for tests. WebSocket is the default for networked runtimes; stdio is used for in-process child runtimes. Select one by constructing the corresponding Arcp\Transport\Transport implementation (new WebSocketTransport($connection, $serializer), new StdioTransport(...), MemoryTransport::pair()) and passing it to new ARCPClient($transport); the bundled bin/arcp serve --host H --port P exposes a WebSocket runtime that mirrors the same protocol on the wire.

API reference

Full API reference — every type, method, and event payload — is in docs/.

Versioning and compatibility

This SDK speaks ARCP v1.1 (draft). The SDK follows semantic versioning independently of the protocol; the protocol version it negotiates is shown above and in session.hello. A runtime advertising a different ARCP MAJOR is not guaranteed compatible. Feature mismatches degrade gracefully: the effective feature set is the intersection of what the client and runtime advertise, and the SDK will not use a feature outside it.

Contributing

See spec repository; SDK bugs and feature requests belong here.

License

Apache-2.0 — see LICENSE.


All versions of sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
ext-pdo Version *
ext-pdo_sqlite Version *
ext-mbstring Version *
ext-json Version *
amphp/amp Version ^3.0
amphp/pipeline Version ^1.0
amphp/socket Version ^2.0
amphp/websocket Version ^2.0
amphp/websocket-client Version ^2.0
amphp/websocket-server Version ^4.0
amphp/byte-stream Version ^2.0
amphp/process Version ^2.0
amphp/sync Version ^2.0
revolt/event-loop Version ^1.0
psr/log Version ^3.0
firebase/php-jwt Version ^7.0
symfony/uid Version ^7.0
justinrainbow/json-schema Version ^6.0
symfony/console Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package arcp/sdk contains the following files

Loading the files please wait ...