Skip to content

Sessions

A normal request is signed, verified and recorded. For many small requests, open a session once and reuse it:

curl -s -X POST http://127.0.0.1:7500/v1/session/call -H "Authorization: Bearer $API_TOKEN_A" \
  -H "Content-Type: application/json" -d '{"name": "finance-bot@platform.test:8080", "route": "/echo", "args": {"n": 1}}'

The first call opens the session, and later calls reuse it until it expires.

How it works

  1. The agent opens the session with a signed request, which is decided by policy for each route.
  2. The other side returns a token that is valid for 300 seconds, for these routes, and only from this Iroh key.
  3. Further requests carry the token and an increasing number over the authenticated QUIC connection.

Rules

  • Sessions exist only over QUIC.
  • Routes with a price cannot use sessions.
  • A repeated number is refused. Numbers may arrive out of order within a window of 1024.