Skip to main content

How to Configure Context

๐Ÿ“‹ Prompt ยท ๐Ÿ’ฌ Conversation

The agent can resolve what the user is currently looking at and inject that information into the conversation automatically. Without this, the user has to repeat context in every message. With context resolution, the agent already knows.

When calling the Chat API directly, pass context either as top-level conversation_context or as a context entry in message content_parts. See Passing Context for the API request shapes.

List and Enable Context Sourcesโ€‹

za agents capabilities context-sources list
za agents capabilities context-sources configure <source-name>

Configure Provider Settingsโ€‹

za agents capabilities context-sources settings
SettingTypeDefaultDescription
injection_mode"system_prompt" | "conversation" | "both""conversation"Where context appears โ€” as a system prompt section or injected into the conversation history
content_format"json" | "xml""xml"Serialization format for context items (xml recommended for Claude models)
max_item_content_lengthint or nullnullMax characters for a single item's serialized content; exceeded items are marked as summarized

Context Sourcesโ€‹

SourceCLI nameDefaultDescription
Document ContextdocumentsenabledMetadata of documents the user is currently viewing
Filter ContextfiltersenabledActive search filters from the UI
Tag ContexttagsenabledTag metadata and document listings when viewing a tag
User Documentsuser-documentsenabledUser's uploaded documents when on the My Documents page
User Workspaceuser-workspacedisabledLightweight workspace snapshot (tag count, document count)
Image Contextconversation-imagesenabledRegisters images from the conversation and assigns short IDs
Custom ContextcustomenabledPass-through for arbitrary context from the calling application
Scheduled Taskscheduled-taskdisabledTask parameters when running as a recurring job

Document Contextโ€‹

Injects metadata of documents the user is currently viewing or has selected in the frontend. Questions like "summarize this" work without specifying which document.

za agents capabilities context-sources configure documents

No additional configuration beyond enabled.


Filter Contextโ€‹

Surfaces active UI search filters so the agent includes them in search calls automatically.

za agents capabilities context-sources configure filters

No additional configuration beyond enabled.


Tag Contextโ€‹

When the user is viewing a tag (curated document collection), injects the tag metadata and document listings. Questions like "what's in this collection?" work immediately.

za agents capabilities context-sources configure tags

No additional configuration beyond enabled.


User Documentsโ€‹

When the user is on their My Documents page, injects their uploaded documents with metadata and previews. Questions like "summarize my uploads" or "find the paper I uploaded last week" work without specifying which documents.

za agents capabilities context-sources configure user-documents

No additional configuration beyond enabled.


User Workspaceโ€‹

A lightweight snapshot of the user's workspace โ€” tag count, names, and document count. Gives the agent enough awareness to make relevant suggestions.

za agents capabilities context-sources configure user-workspace

Configurationโ€‹

SettingTypeDefaultDescription
include_tagsbooltrueInclude tag summary (count and names, up to 10)
include_private_documentsbooltrueInclude private document count

Image Contextโ€‹

Scans conversation messages for images, registers each with a short ID, and makes them available for image tools. Enabled by default.

za agents capabilities context-sources configure conversation-images

No additional configuration beyond enabled.


Custom Contextโ€‹

Pass-through for arbitrary context items provided by the calling application via the API's custom_context.items field. Enabled by default.

za agents capabilities context-sources configure custom

No additional configuration beyond enabled.


Scheduled Task Contextโ€‹

Injects scheduled task parameters when the agent is running as a recurring job. Instructs the agent to focus on new information since last execution and use inline citations.

za agents capabilities context-sources configure scheduled-task

No additional configuration beyond enabled.