Skip to content

llm-gateway (SSE + per-tenant concurrency)

Source: examples/llm-gateway/ Carried from: PI2-yaa

This example demonstrates advanced YAAgents gateway capabilities not covered in the campaign-api examples:

  • SSE streaming responses — long-running agent operations that emit partial results as Server-Sent Events
  • Per-tenant concurrency limits — the gateway’s license-check plugin enforces concurrent-operation limits per tenant
  • Execution timeout flow — the execution_timeout response type (504 application/vnd.yaagents.error+json) when an agent exceeds its time budget

Quick reference

Terminal window
git clone https://github.com/ai-mpathyminds/yaagents.git
cd examples/llm-gateway
docker compose up -d

For SSE, partial-result, and per-tenant-concurrency curl examples, see the source README.