CEL reference explorer
Explore the CEL expression context interactively, including all available variables and their nested fields.
- sessionstring
- methodstring
- uristring
- hoststring
- schemestring
- pathstring
- pathAndQuerystring
- versionstring
- headersobject
- bodystring
- bodyPrefixstring
- startTimestring
- endTimestring
- agent
- codeinteger
- grpcStatusinteger
- headersobject
- bodystring
- bodyPrefixstring
- *reasonstring
- *messagestring
- namespacestring
- namestring
- namestring
- namespacestring
- namestring
- kindstring
- rulestring
- error
- bindstring
- gateway
- listener
- route
- requestProcessingDurationstring
- upstreamDurationstring
- responseProcessingDurationstring
- podNamestring
- namespacestring
- gatewaystring
- rawTokenstring
- *keystring
- *usernamestring
- *rolestring
- *contentstring
- *idstring
- *namestring
- *arguments
- temperaturenumber
- top_pnumber
- frequency_penaltynumber
- presence_penaltynumber
- seedinteger
- max_tokensinteger
- encoding_formatstring
- dimensionsinteger
- reasoning_effortstring
- 1hnumber
- 12hnumber
- *totalnumber
- *inputnumber
- *outputnumber
- *cacheReadnumber
- *cacheWritenumber
- cacheWriteDetails
- *reasoningnumber
- *inputAudionumber
- *outputAudionumber
- *pagesnumber
- audioDurationnumber
- inputnumber
- outputnumber
- cacheReadnumber
- cacheWritenumber
- cacheWriteDetails
- reasoningnumber
- inputAudionumber
- outputAudionumber
- perPagenumber
- perAudioMinutenumber
- contextinteger
- inputinteger
- outputinteger
- inputstring[]
- outputstring[]
- reasoningboolean
- structuredOutputboolean
- toolCallboolean
- temperatureboolean
- mininteger
- maxinteger
- toggleboolean
- effortstring[]
- budgetTokens
- *idstring
- namestring
- statusstring
- releasedstring
- tagsstring[]
- limits
- modalities
- capabilities
- reasoning
- *streamingboolean
- *requestModelstring
- *originalModelstring
- responseModelstring
- responseIdstring
- finishReasonsstring[]
- *providerstring
- inputTokensinteger
- providerInputTokensinteger
- inputImageTokensinteger
- inputTextTokensinteger
- inputAudioTokensinteger
- audioSecondsnumber
- cachedInputTokensinteger
- cacheCreationInputTokensinteger
- outputTokensinteger
- outputImageTokensinteger
- outputTextTokensinteger
- outputAudioTokensinteger
- reasoningTokensinteger
- totalTokensinteger
- providerTotalTokensinteger
- serviceTierstring
- timeToFirstTokenstring
- timePerOutputTokenstring
- countTokensinteger
- prompt
- completionstring[]
- toolCalls
- *params
- cost
- costRates
- model
- *trustDomainstring
- *namespacestring
- *serviceAccountstring
- namestring
- namespacestring
- serviceAccountstring
- addressstring
- portinteger
- rawAddressstring
- rawPortinteger
- identity
- spiffeIdstring
- subjectAltNamesstring[]
- issuerstring
- subjectstring
- subjectCnstring
- certificatestring
- unverifiedWorkload
- connectHeadersobject
- addressstring
- portinteger
- hostnamestring
- *namestring
- *targetstring
- *namestring
- argumentsobject
- result
- error
- targetstring
- namestring
- *targetstring
- *namestring
- methodNamestring
- sessionIdstring
- target
- tool
- prompt
- resource
- task
- toolsList
- promptsList
- resourcesList
- resourceTemplatesList
- params
- result
- namestring
- endpointstring
- typestring
- protocolstring
- *phasestring
- *guardstring
- *actionstring
- guardrailIdstring
- guardrailVersionstring
- actionReasonstring
- assessmentsobject[]
- Primarystring
- Policystring
- Mirrorstring
- *headersobject
- codeinteger
- grpcStatusinteger
- *kind
- *subtypestring
- *targetstring
- *request
- *response
- durationstring
- errorstring
- request
- response
- proxy
- env
- jwt
- apiKey
- basicAuth
- llm
- llmRequest
- source
- destination
- mcp
- backend
- extauthzobject
- extprocobject
- mcpGuardrailsobject
- guardrails
- upstreamCalls
- metadataobject
The HTTP method of the request. For example,
GETValidation
DefaultGET
The complete URI of the request. For example,
http://example.com/path.Validation
Default/
The hostname of the request. For example,
example.com.Validation
Defaultnull
The scheme of the request. For example,
https.Validation
Defaultnull
The path of the request URI. For example,
/path.The path and query of the request URI. For example,
/path?foo=bar.Validation
Default/
The version of the request. For example,
HTTP/1.1.Validation
DefaultHTTP/1.1
The headers of the request.
Validation
Default{}
The request's body, buffered up to
this field is not available and will fail to evaluate.
Including this attribute in an expression will trigger the body to be buffered.
maxBufferSize. If the body exceeds the max buffer size,this field is not available and will fail to evaluate.
Including this attribute in an expression will trigger the body to be buffered.
The request body buffered up to
this contains the first
maxBufferSize. If the complete body exceeds the limit,this contains the first
maxBufferSize bytes.The time the request started
The time the request completed
The agent session the request belongs to, from
well-known agent headers such as
standardAttributes.session or detected fromwell-known agent headers such as
x-claude-code-session-id.The agent harness that sent the request.
request contains attributes about the incoming HTTP requestThe HTTP status code of the response.
Validation
Default0
Formatuint16
Minimum0
Maximum65535
The gRPC status code of the response, when present.
Validation
Formatuint8
Minimum0
Maximum255
The headers of the response.
Validation
Default{}
The response's body, buffered up to
this field is not available and will fail to evaluate.
Including this attribute in an expression will trigger the body to be buffered.
maxBufferSize. If the body exceeds the max buffer size,this field is not available and will fail to evaluate.
Including this attribute in an expression will trigger the body to be buffered.
The response body buffered up to
this contains the first
maxBufferSize. If the complete body exceeds the limit,this contains the first
maxBufferSize bytes.response contains attributes about the HTTP responseBroad classification of the failure, such as
UpstreamFailure or Timeout.Human-readable failure detail. Exact message is subject to change.
The final gateway error when the response was synthesized from a failed request.
The bind that accepted the request.
The namespace of the selected Gateway.
The name of the selected Gateway.
The selected Gateway.
The name of the selected listener.
The selected listener.
The namespace of the selected route.
The name of the selected route.
The kind of the selected route.
The selected route rule name, when available.
The selected route.
Time spent processing the request before sending the primary outbound call.
Time spent waiting for the primary outbound call.
Time spent processing the primary outbound response before sending the downstream response.
proxy contains proxy timing information for the request.The name of the pod (when running on Kubernetes)
The namespace of the pod (when running on Kubernetes)
The Gateway we are running as (when running on Kubernetes)
env contains selected process environment attributes exposed to CEL.This does NOT expose raw environment variables, but rather a subset of well-known variables.
The raw bearer token. Redacted by default; use
jwt.rawToken.unredacted() to access the actual value.jwt contains the claims from a verified JWT token. This is only present if the JWT policy is enabled.The API key value. Redacted by default; use
apiKey.key.unredacted() to access the actual value.apiKey contains the claims from a verified API Key. This is only present if the API Key policy is enabled.In addition to
key, user-supplied metadata fields are flattened into this object; for example,apiKey.group. Metadata values are plain JSON and are not treated as secrets.basicAuth contains the claims from a verified basic authentication Key. This is only present if the Basic authentication policy is enabled.basicAuth contains the claims from a verified basic authentication Key. This is only present if the Basic authentication policy is enabled.Whether the LLM response is streamed. If it is streamed some fields may be inconsistent based on when accessed during the response flow.
The model requested for the LLM request. Before LLM processing, this is extracted from
the incoming URL or body, before provider overrides. This may differ from the actual model used.
the incoming URL or body, before provider overrides. This may differ from the actual model used.
The model the client asked for, before any virtual model, alias, provider override, or
request body rewrite. Equal to
request body rewrite. Equal to
requestModel when the model was not rewritten.The model that actually served the LLM response.
The provider's identifier for the response.
The provider's reasons for ending generation, one per returned choice.
The provider of the LLM.
The total number of tokens in the input/prompt, including tokens read from or written to
cache. This has consistent semantics across providers.
cache. This has consistent semantics across providers.
Validation
Formatuint64
Minimum0
The provider-reported number of tokens in the input/prompt. This is inconsistent across
providers: some include cached tokens while others exclude them.
providers: some include cached tokens while others exclude them.
Validation
Formatuint64
Minimum0
The number of image tokens in the input/prompt.
Validation
Formatuint64
Minimum0
The number of text tokens in the input/prompt.
Note: this field is only set in multi-modal calls where the total token count is split out by
text/image/audio; for standard all-text calls, this is unset.
Note: this field is only set in multi-modal calls where the total token count is split out by
text/image/audio; for standard all-text calls, this is unset.
Validation
Formatuint64
Minimum0
The number of audio tokens in the input/prompt.
Validation
Formatuint64
Minimum0
Seconds of input audio, for models billed by duration rather than tokens (such as
whisper-1).Validation
Formatdouble
The number of tokens in the input/prompt read from cache (savings)
Validation
Formatuint64
Minimum0
Tokens written to cache (costs)
Validation
Formatuint64
Minimum0
The number of tokens in the output/completion.
Validation
Formatuint64
Minimum0
The number of image tokens in the output/completion.
Validation
Formatuint64
Minimum0
The number of text tokens in the output/completion.
Validation
Formatuint64
Minimum0
The number of audio tokens in the output/completion.
Note: this field is only set in multi-modal calls where the total token count is split out by
text/image/audio; for standard all-text calls, this is unset.
Note: this field is only set in multi-modal calls where the total token count is split out by
text/image/audio; for standard all-text calls, this is unset.
Validation
Formatuint64
Minimum0
The number of reasoning tokens in the output/completion.
Validation
Formatuint64
Minimum0
The total number of input and output tokens for the request. Input tokens include tokens read
from or written to cache, giving this field consistent semantics across providers.
from or written to cache, giving this field consistent semantics across providers.
Validation
Formatuint64
Minimum0
The provider-reported total number of tokens for the request. This is inconsistent across
providers because some include cached input tokens while others exclude them.
providers because some include cached input tokens while others exclude them.
Validation
Formatuint64
Minimum0
The service tier the provider served the request under.
Validation
Enumstandard, flex, priority, reserved, ultrafast, fast
Time from request start until the first response token is received.
Average time from first response token to response completion per output token.
The number of tokens in the request, when using the token counting endpoint
These are not counted as 'input tokens' since they do not consume input tokens.
These are not counted as 'input tokens' since they do not consume input tokens.
Validation
Formatuint64
Minimum0
Message role, such as "system", "user", or "assistant".
Message text content.
The prompt sent to the LLM. Warning: accessing this has some performance impacts for large prompts.
The completion from the LLM. Warning: accessing this has some performance impacts for large responses.
No description for this field.
No description for this field.
The tool calls from the LLM. Warning: accessing this has some performance impacts for large responses.
No description for this field.
Validation
Formatdouble
No description for this field.
Validation
Formatint64
No description for this field.
Validation
Formatuint64
Minimum0
No description for this field.
The reasoning effort requested by the client: OpenAI
Unset when the request does not specify one, in which case the provider default applies.
reasoning_effort orreasoning.effort, Anthropic output_config.effort, or Gemini thinkingLevel.Unset when the request does not specify one, in which case the provider default applies.
Validation
Enumnone, minimal, low, medium, high, xhigh, max, null
The parameters for the LLM request.
No description for this field.
Validation
Formatdouble
No description for this field.
The realized USD cost of the request from the model cost catalog.
Unset when the model could not be priced.
Unset when the model could not be priced.
Effective model catalog rates in USD per 1M tokens after tier selection.
Unset when the model could not be priced.
Unset when the model could not be priced.
The catalog model ID the request resolved to.
Human-readable display name.
Lifecycle stage (alpha, beta, deprecated); absent means generally available.
Release date, as YYYY-MM-DD or YYYY-MM.
Freeform capability/routing tags for this model.
Total context window, shared by input and output.
Validation
Formatuint64
Minimum0
Maximum input tokens, when tighter than the context window allows.
Validation
Formatuint64
Minimum0
Maximum output tokens.
Validation
Formatuint64
Minimum0
Token limits.
Validation
Default{}
Input modalities, such as text, image, pdf, audio, or video.
Output modalities, such as text, image, audio, or video.
Supported input and output modalities.
Validation
Default{}
Whether the model supports reasoning.
Whether the model supports JSON Schema structured outputs.
Whether the model supports tool calling.
Whether the model accepts the temperature parameter.
Supported features. Absent fields are unknown.
Validation
Default{}
Whether reasoning can be turned on and off.
Accepted effort levels.
Minimum reasoning token budget.
Validation
Formatuint64
Minimum0
Maximum reasoning token budget.
Validation
Formatuint64
Minimum0
Accepted reasoning token budget range.
How reasoning can be controlled.
Validation
Default{}
Model catalog metadata for the model that served the request.
Unset when the model is not in the catalog.
Unset when the model is not in the catalog.
llm contains attributes about an LLM request or response. This is only present when using an ai backend.llmRequest contains the raw JSON LLM request during route and LLM policies.Policies occurring after LLM processing, such as logs, will not have this field present.
The IP address of the downstream connection.
Validation
Default0.0.0.0
Formatip
The port of the downstream connection.
Validation
Default0
Formatuint16
Minimum0
Maximum65535
The original TCP peer IP address of the downstream connection.
This can differ from the
This can differ from the
address when using tunneling protocols like PROXY.Validation
Default0.0.0.0
Formatip
The original TCP peer port of the downstream connection.
This can differ from the
This can differ from the
port when using tunneling protocols like PROXY.Validation
Default0
Formatuint16
Minimum0
Maximum65535
The trust domain of the identity.
The namespace of the identity.
The service account of the identity.
The (Istio SPIFFE) identity of the downstream connection, if available.
Validation
Defaultnull
The raw SPIFFE ID (first
present. Unlike
spiffe:// URI SAN) of the downstream client certificate, ifpresent. Unlike
identity, this is populated for any SPIFFE ID, not only the Istiospiffe://td/ns/<ns>/sa/<sa> format.Validation
Defaultnull
The subject alt names from the downstream certificate, if available.
Validation
Default[]
The issuer from the downstream certificate, if available.
The subject from the downstream certificate, if available.
The CN of the subject from the downstream certificate, if available.
Validation
Defaultnull
PEM of the downstream client certificate. Present only when the client presented a certificate during the TLS handshake.
Validation
Defaultnull
The pod name of the source workload.
The namespace of the source workload.
The service account of the source workload.
The workload context of the downstream connection, resolved from the
workload discovery store by source IP. Available when the source pod is
known to the controller's workload discovery store.
workload discovery store by source IP. Available when the source pod is
known to the controller's workload discovery store.
Fields are nested under
from the source IP (not cryptographically authenticated). Policy
authors should prefer
unverified to signal that they are derivedfrom the source IP (not cryptographically authenticated). Policy
authors should prefer
source.identity.* for trust-sensitive checks.HTTP CONNECT request headers, when this stream originated from a CONNECT
tunnel. Empty otherwise. Exposed in CEL as
supports the same accessors as
tunnel. Empty otherwise. Exposed in CEL as
source.connectHeaders, whichsupports the same accessors as
request.headers (indexing, join(),split(), etc.).CONNECT headers are client-supplied and unauthenticated at the transport
layer, so trust decisions should validate the values (e.g. signature or
issuer checks) rather than trusting header presence alone.
layer, so trust decisions should validate the values (e.g. signature or
issuer checks) rather than trusting header presence alone.
source contains attributes about the source of the request.The IP address of the downstream request destination at agentgateway.
Validation
Default0.0.0.0
Formatip
The port of the downstream request destination at agentgateway.
Validation
Default0
Formatuint16
Minimum0
Maximum65535
The requested destination hostname, when known. For TLS connections this is the sniffed SNI.
destination contains attributes about the downstream request destination at agentgateway.The MCP target for the current target-scoped operation.
The target handling the tool call after multiplexing resolution.
The resolved tool name sent to the upstream target.
The JSON arguments passed to the tool call.
The terminal tool result payload, if available.
The terminal JSON-RPC error payload, if available.
The target of the resource
The name of the resource
The target handling the task.
The task ID.
The terminal tools/list result returned to the client, if available.
The terminal prompts/list result returned to the client, if available.
The terminal resources/list result returned to the client, if available.
The terminal resources/templates/list result returned to the client, if available.
Current request parameters, with the same structure as the
Available only during request-phase CEL guardrails.
params object in an MCP request.Available only during request-phase CEL guardrails.
Current response result, with the same structure as the
Available only during response-phase CEL guardrails.
result object in an MCP response.Available only during response-phase CEL guardrails.
mcp contains attributes about the MCP request.Request-time CEL includes identity fields (
tool, prompt, resource,task) plus methodName. Post-request CEL may also include fields likesessionId, tool payloads, and list results.The name of the backend being used. For example,
my-service or service/my-namespace/my-service:8080.The resolved target for directly addressed backends, including the port for network endpoints.
Absent for Service backends, whose workload endpoints are selected separately.
Absent for Service backends, whose workload endpoints are selected separately.
The type of backend.
Validation
Enumai, mcp, static, dynamic, service, unknown
Defaultunknown
The protocol of backend.
Validation
Enumhttp, tcp, a2a, mcp, llm
Defaulthttp
backend contains information about the backend being used.extauthz contains dynamic metadata from ext_authz filtersextproc contains dynamic metadata from ext_proc filtersmcpGuardrails contains dynamic metadata returned by mcpGuardrails policy processors.The phase the guardrail was evaluated in:
request or response.The guard kind that was evaluated, such as
bedrockGuardrails.The action the guardrail took.
Validation
Enumallow, failOpen, audit, mask, reject
The configured guardrail identifier.
The configured guardrail version.
The reason the guardrail reported for its action.
Assessment detail reported by the guardrail provider, redacted to metadata
only. Content-bearing fields (such as the matched text) are never included.
only. Content-bearing fields (such as the matched text) are never included.
guardrails contains entries for prompt-guard guardrail evaluations, in either therequest or response phase. Only present in CEL that runs after the request completes,
such as log and metric fields.
The primary backend call
Validation
ConstPrimary
A callout as part of a policy execution
Validation
ConstPolicy
A mirrored call
Validation
ConstMirror
Call category:
Primary (backend request) or Policy (policy callout).Call subtype:
Http, Llm, Mcp, ExtAuthz, Substrate, ExtProc,Guardrail, RateLimit, Oidc, Callout, or a custom subtype name.The MCP target name for MCP calls, otherwise the connection address (host:port).
Headers sent to the backend, after backend auth. Tunnel proxy credentials are left out.
No description for this field.
HTTP status code. Empty when no response came back.
Validation
Formatuint16
Minimum0
Maximum65535
gRPC status code, from the response headers or trailers.
Trailers that arrive after the access log is written aren't included.
Trailers that arrive after the access log is written aren't included.
Validation
Formatuint8
Minimum0
Maximum255
Time from before DNS resolution through response headers, including connection setup.
Error description when the call fails. Exact wording may change between versions.
upstreamCalls lists the outbound calls made for this request, such as MCP target and policy calls.It's only filled in for access log expressions that reference it.
Its request headers are the ones sent to the backend.
request.headers still has the client's headers.metadata contains values set by transformation metadata expressions.Was this page helpful?