Skip to main content
Every failed call to verifyAgentToken, verifyAgentAccount, or createAgentAccount returns { ok: false, code, error }.
  • code is a frozen string union for branching in your code and guiding agents.
  • error is a human-readable description. You can also import descriptions at runtime via VERIFY_ERROR_DESCRIPTIONS:

HTTP status code mapping

All @agentonboard/sdk and agentonboard-sdk framework bindings apply this status mapping automatically. Use the same mapping when calling core functions directly: By default, framework bindings return { "code": "...", "error": "..." } in the JSON body so agents can read code and follow your auth.md. Pass an onFailure callback to customize responses (see Framework Overview).

Token verification codes (VerifyErrorCode)

These 9 codes can be returned by verifyAgentToken and every function built on top of it:

Account resolution codes (AccountErrorCode)

verifyAgentAccount and createAgentAccount return VerifyErrorCode plus two account-layer codes:

Safe logging rules

Log result.code and (on success) result.jti. Never log raw JWT strings or Authorization headers:

Publishing auth.md

Testing & Production