Developer guide · 33 skills · A2A protocol v0.3.0

Build with Nexus A2A

Any A2A-compatible client works. Get an OAuth2 token from the NexRev gateway, then call it with JSON-RPC 2.0 message/send. Two ways to ask: the direct nexus route returns one capability's result verbatim, or the supervisor (nexus-supervisor) reasons across several capabilities into one synthesised answer.

Public discoverythe agent card describes auth + skills, no token required
Open standardAgent2Agent (A2A) v0.3.0 — any compliant client
Verbatim or synthesisedthe exact result from the direct route; a reasoned answer from the supervisor

Connect your agent

Get an OAuth2 token from the NexRev gateway, then call the nexus agent. You'll need a provisioned machine-to-machine client from your NexRev administrator.

1. Get a token

curl -X POST https://nexusauth.nexrev.com/oauth/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d grant_type=client_credentials \
  -d client_id=$CLIENT_ID \
  -d client_secret=$CLIENT_SECRET \
  -d resource=https://nexusa2a.nexrev.com \
  -d scope=a2a:read:site

2. Call the nexus agent

curl -X POST https://nexusa2a.nexrev.com/a2a/nexus \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "message/send",
    "params": {
      "message": {
        "kind": "message",
        "role": "user",
        "contextId": "conv-1",
        "parts": [{ "kind": "text", "text": "Give a short HVAC summary for site <siteId>" }],
        "messageId": "<uuid>"
      }
    }
  }'

Send a stable contextId across turns for a continuous conversation (the router remembers the thread); omit it and each turn is independent.

3. Discover capabilities

# Public discovery — no token required
curl https://nexusa2a.nexrev.com/.well-known/nexus/agent-card.json

Two ways to ask

Same token, same message/send shape — pick the endpoint that fits the job.

Direct agent — /a2a/nexus

Interprets the request, calls the one right capability, and returns its result verbatim — no reformatting. Best for systems and pipelines that need the exact payload.

Supervisor agent — /a2a/nexus-supervisor

Calls several read capabilities in one turn and reasons across them into a single synthesised answer with the priorities called out. Best for people and chat. Read-only unless the token carries a write scope (see below).

Call the supervisor

curl -X POST https://nexusa2a.nexrev.com/a2a/nexus-supervisor \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "message/send",
    "params": {
      "message": {
        "kind": "message",
        "role": "user",
        "contextId": "conv-1",
        "parts": [{ "kind": "text", "text": "Give an operational review of site <siteId> across HVAC and alarms." }],
        "messageId": "<uuid>"
      }
    }
  }'

Long-running requests: swap message/send for message/stream to watch progress as Server-Sent Events, and reuse the same contextId across calls to continue the conversation. Each endpoint has its own public discovery card — /.well-known/nexus-supervisor/agent-card.json.

Acting on something — with an approval

When the token carries a2a:write:controls, the supervisor can propose a change. It never actuates on its own — a person approves, and only then is it carried out.

Ask the supervisor to make a change (e.g. “raise the dining-area cooling setpoint 2°F at site <siteId>”). Nothing happens yet: it returns a dry-run proposal — the exact current and proposed values — plus a runId. A human then approves with one call, and the change is carried out:

# Approve (and execute) the proposal the supervisor returned
curl -X POST https://nexusa2a.nexrev.com/workflow/controls-with-approval/resume \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "runId": "<runId from the proposal>",
    "step": "human-approval",
    "resumeData": { "approved": true, "execute": true }
  }'

To reject instead, resume with { "approved": false } — no change is made. Every proposal, approval and outcome is on the record.

Capabilities & scopes

Each capability is a scope-gated skill. A caller's token determines which skills the router will offer — a skill the token isn't scoped for is never even presented. Skills are added in configuration, so this set grows without a redeploy.

Site Analysis

Reasoned analysis of a site's operational picture, driven by the SiteAnalyst agent.

a2a:read:site

Energy & Facilities

Consumption, demand, cost and facilities analytics across a customer's estate.

a2a:read:energy

HVAC

Diagnostics, efficiency, runtime, temperature and predictive analysis for RTUs.

a2a:read:hvac

Power & Metering

Meter consumption, demand, power quality, health and reporting.

a2a:read:meters

Cold-Chain & Storage

Refrigeration / FDA temperature compliance and cold-storage monitoring.

a2a:read:coldchain a2a:read:coldstorage

Alarms

Current open alarms across a customer's fleet, scoped by the caller's token.

a2a:read:alarms

Sensors

Sensor overview and environment analysis — temperature, humidity, air quality.

a2a:read:sensors

Devices & Core Data

Device queries plus customer, site and organization reference data.

a2a:read:devices a2a:read:core

Reports & Controls

Generate reports, and — with a write scope — propose building-control changes for human approval.

a2a:read:reports a2a:write:controls

Endpoints

Served at the root. A2A task calls and workflow routes require a Bearer token; discovery and health probes are public.

A2A

  • POST /a2a/nexus
  • POST /a2a/nexus-supervisor
  • GET /.well-known/nexus/agent-card.json
  • GET /.well-known/nexus-supervisor/agent-card.json

Workflows

  • GET /workflow
  • POST /workflow/:id
  • POST /workflow/:id/resume
  • GET /workflow/:id/runs
  • GET /workflow/:id/runs/:runId

Health

  • GET /health
  • GET /ready