ai_agent#
Reports which AI coding agent, if any, is running the process.
Every request sends an AI_AGENT_HEADER header naming the agent, or none when no agent
marks the process, so Nominal can tell agent-driven use apart from other use and from releases
that never checked. Detection matches the Nominal Python client.
Functions#
- pub fn detect_ai_agent() -> Option<String>#
The name of the AI coding agent running this process, or
Nonewhen there is none.AI_AGENTwins and names the agent; a false value such as0opts out. Otherwise a known agent’s own variable, then a genericAGENT, mark the process (AGENT=1givesunknown).
- pub fn ai_agent_header_value() -> HeaderValue#
The
AI_AGENT_HEADERvalue: the detected agent reduced to a single bounded token, orNO_AI_AGENT.
Constants#
- pub const AI_AGENT_HEADER: &str = "x-nominal-ai-agent"#
Request header carrying the detected AI coding agent, or
NO_AI_AGENT.
- pub const NO_AI_AGENT: &str = "none"#
AI_AGENT_HEADERvalue when no agent marks the process.