AxAgentCitations
type AxAgentCitations =
| boolean
| {
field?: string;
includeMemoryIds?: boolean;
onCitations?: (citations: readonly string[]) => void | Promise<void>;
surface?: "output" | "hidden";
};Defined in: https://github.com/ax-llm/ax/blob/3ac75e381dcefb739712993c304c34295567283a/src/ax/agent/config.ts#L234
Chain-of-evidence citations knob: when enabled, the responder gains an
optional string-array output field whose entries must be evidence ids the
answer actually relies on — the top-level keys of the final(task, evidence) / respond(task, evidence) evidence object, plus (by default)
the id of any id-bearing records one level deep inside it, e.g. loaded
memories. Citations are validated subset-only against those ids; a
violation re-prompts the responder through the standard validation-retry
loop. Runs without evidence skip validation entirely.
Type declaration
boolean
{
field?: string;
includeMemoryIds?: boolean;
onCitations?: (citations: readonly string[]) => void | Promise<void>;
surface?: "output" | "hidden";
}| Name | Type | Description |
|---|---|---|
field? | string | Responder output field name. Default ’evidenceCitations'. |
includeMemoryIds? | boolean | Also accept id values of record arrays one level deep in the evidence object (the shape recall(...) memories arrive in). Default true. |
onCitations()? | (citations: readonly string[]) => void | Promise<void> | Observer for validated citations; failures are swallowed. |
surface? | "output" | "hidden" | Where validated citations land. 'output' (default) keeps the field on the returned result; 'hidden' strips it after validation so the result matches the user signature exactly — read citations via onCitations. |