Request Flow
When a query enters Xilos, it passes through a pipeline that observes, secures, and orchestrates the request before returning a response.
The Pipeline
- Agent Request — An AI agent sends a chat completion or query request to the Xilos API.
- Authentication — The API key is validated. If it is a virtual key, budget and rate limits are checked.
- Consolidation — Messages are consolidated into a single query for processing.
- Guardrails — PII detection, HAP, and jailbreak checks run locally. No external API calls.
- Restrictions — Restriction rules are evaluated. Queries may be blocked, masked, or flagged.
- Cache Check — The semantic cache is checked for a matching response. If found, the cached response is returned immediately.
- Routing — Smart Routing or routing rules select the target LLM based on query intent, cost, and model capabilities.
- Compression — If enabled and the prompt exceeds the threshold, context compression reduces the token count.
- LLM Call — The query is sent to the selected LLM provider.
- Response — The response is returned to the agent, logged, and cached for future queries.
- Quality Scoring — Faithfulness, answer relevance, and context relevance are scored automatically.
- Webhooks — Event-driven webhooks fire to notify subscribed endpoints.
What This Means for Users
- Every query is processed through the same pipeline, regardless of which agent or model is used
- Security checks happen before any LLM call — sensitive data never reaches a provider
- Caching and compression happen transparently — users get faster, cheaper responses
- The full pipeline is visible in the Query Log