Skip to content

Why YAAgents

Most “AI agent” integrations today expose a single /agents/invoke endpoint that accepts freeform JSON and returns freeform JSON. That works for demos — it breaks down the moment you need governance, observability, or multi-framework interoperability.

YAAgents is a thin, normative REST profile that closes the gap with three properties:


1. Domain resources, not /agents/invoke

Agentic operations are expressed as ordinary REST resource actions:

POST /campaigns/{id}/optimizations
POST /contracts/{id}/reviews
POST /inventory/{id}/reorder-suggestions

Standard HTTP semantics apply: POST creates a resource, GET retrieves it, DELETE cancels it. Clients, gateways, load balancers, and API management tools treat agentic endpoints exactly like any other REST endpoint — no special-casing required.


2. Typed responses for every agentic outcome

The Profile defines 10 normative response types — each with a fixed HTTP status, Content-Type header, and JSON body shape:

TypeStatusWhen
success200Operation completed; result in body
created201Resource created; result in body
accepted202Async operation queued
clarification_required400Agent needs more input before proceeding
validation_failed422Inputs are structurally invalid
approval_required412Human-in-the-loop approval required
forbidden403Authorization or policy failure
conflict409Conflicting state prevents the operation
failed_dependency424Dependent tool or service failure
error500Unhandled failure

Every response carries a discriminator field (type) so clients can switch cleanly — no guessing at status-code ranges or parsing error strings.


3. Gateway-controlled access + framework-neutral runtime

The YAAgents gateway enforces governance at the edge via a plugin chain:

  • token-validator — validates bearer tokens; rejects unauthenticated requests before they reach any agent code.
  • tenant-injector — extracts and propagates X-Tenant-ID; scopes every agentic operation to the correct tenant context automatically.
  • license-check — verifies feature entitlements per tenant; returns policy_violation (403) for unlicensed operations at the gateway — agent code never runs.

Because governance is a gateway concern, any agent framework runs behind it: LangChain, LlamaIndex, custom Python, Go, Node — all serve the same Profile-compliant responses through the same gateway plugin chain.