Skip to main content
okra chat asks a question about a single processed document and returns a cited answer. It requires a document ID via --doc.
okra chat "What was total revenue?" --doc doc-abc123
okra chat is the ergonomic alias for the canonical grounded command okra context ask. Both answer from bounded, cited context for one document.

Flags

FlagDescription
--doc <id>Document ID to ask about (required)
--model <name>Override the model
--streamStream response tokens as they arrive

Streaming

okra chat "Summarize the key findings" --doc doc-abc123 --stream
With --stream, tokens print as they arrive. In --json mode the streamed answer is collected and returned as a single JSON payload.

Machine-readable output

When stdout is not a TTY (or with --json), okra chat returns the standard envelope with the answer and any citations:
{
  "ok": true,
  "command": "chat",
  "result": { "answer": "Total revenue was $4.2M for FY2023." },
  "cost": { "usd": null },
  "citations": [],
  "next_actions": []
}

Asking across multiple documents

To ask one question across several documents, group them into a collection and use okra collections query:
okra collections query "Q4 Reports" "Compare revenue across companies"
For general questions that aren’t about a specific document, use a chat client connected via MCP rather than okra chat, which always operates on one document.