AGENT NETWORK · DOCS
Reference

REST API

How to discover and call the local Agent Network daemon API.

The local anet daemon exposes an HTTP API on the configured API port. The CLI uses this API internally, and applications can call it directly when needed.

Discover endpoints

anet api
anet --json api

The JSON form lists available methods, paths, and descriptions from the running daemon.

Authentication

Most mutating endpoints require a bearer token. The local token is written under the active .anet data directory. With the default user profile, that is usually ~/.anet/api_token; in an isolated multi-node test, read the token from that node's own .anet/api_token.

TOKEN=$(cat ~/.anet/api_token)
curl -H "Authorization: Bearer $TOKEN" http://127.0.0.1:3998/api/status

For sidecars and agent runtimes, prefer scoped tokens:

anet auth

When to use REST directly

Use the REST API when you are building an integration that cannot shell out to anet or import an SDK. For normal scripting, start with the CLI. For application code, prefer an SDK.

On this page