How It Works
What happens between your POST /v1/run call and the structured response you get back.
Every request to LiyaEngine flows through the same engine, regardless of which domain or intent you call.
The three parts of a call
Domain
The context you define — a custom domain you create, scoped to your own data and use case.
Intent
The specific operation within that domain — resolve_ticket, score_candidate, or any intent you define.
Input
The structured data relevant to that intent.
The request lifecycle
Domain configuration resolved
Your domain's persona, model strategy, guardrail policies, and retrieval config are loaded from the Knowledge Layer.
Agent orchestration
The orchestrator decides whether the intent runs single-shot or as a multi-step agentic execution, and which tools are available for that step.
Retrieval & memory
Relevant context is pulled from your knowledge collections and from session/episodic memory, then injected into the run.
Guardrails
Guardrail checks run before and after every tool call, not just on the final output — covering PII redaction, policy enforcement, and output validation.
Model routing
The router selects a provider from your configured chain (OpenAI, Anthropic, Gemini, or a custom endpoint) and automatically fails over to the next provider if the primary one errors — same request, no code changes.
Structured response
You get back a schema-validated output plus a full execution trace — every tool call, retrieval hit, and model used.
Calling it
curl -X POST https://api.liyaengine.ai/v1/run \
-H "x-api-key: $LIYA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domain": "your-domain",
"intent": "your-intent",
"input": { ... }
}'See Authentication for full auth details, or Platform for a deep dive on each layer.