Documentation Index
Fetch the complete documentation index at: https://docs.okrapdf.com/llms.txt
Use this file to discover all available pages before exploring further.
Chat
okra chat is the unified entry point for all chat. It routes automatically based on what you pass:
| Flag | Description |
|---|---|
--doc <ids> | Comma-separated job IDs (ocr-*) |
-c, --collection <name> | Collection name or ID |
-m, --message <text> | Message (alternative to positional) |
--schema <json> | JSON Schema for structured output |
--model <model> | Model override |
--share | Generate a public share link |
--agent <type> | Agent type: canvas (LLM-driven canvas manipulation) |
--tools <type> | Tool mode (coming soon) |
-q, --quiet | Suppress spinners (just the answer) |
Routing
| What you pass | Mode | Backend |
|---|---|---|
No --doc, no -c | General chat | Fireworks (no document context) |
--doc ocr-XXX (single) | Single-doc | DocumentAgent DO /completion |
--doc ocr-XXX,ocr-YYY | Multi-doc | Lead agent + DO fan-out |
-c my-collection | Multi-doc | Same as above, resolves collection first |
--doc ocr-XXX --agent canvas | Canvas agent | CanvasAgent DO /canvas/completion |
General chat
Ask anything without a document — helpful for finance questions, OCR concepts, or quick lookups.Single-document chat
Query a specific extracted document. The agent has tools to search text, query tables, and retrieve pages.Multi-document chat
Compare across documents. The lead agent fans out queries to each document and synthesizes results.Canvas agent (--agent canvas)
Use --agent canvas for LLM-driven canvas manipulation — the agent can read and modify the document canvas using tool calls.
DOCUMENT_AGENT_SHARED_SECRET to be set. Streams tool calls and text deltas to the terminal, with cost and tool-call count reported at the end.
--agent canvas only supports single-document mode. The first --doc ID is used if multiple are provided.Structured output (--schema)
Pass a JSON Schema to get structured JSON responses. Works with single-doc mode.
Parallel sessions
Run multiple single-doc queries in parallel — each runs independently.Legacy syntax
The oldsend subcommand still works:
Prefer the new syntax:
okra chat "question" --doc ocr-abc123