Sources
Use source documents as grounding material for Runiq agents.
Sources are the knowledge content inside a Context Space.
They are not prompts. They are documents that the runtime can read, search, preview in the dashboard, and use as grounding material for an agent run.
File-system sources
The travel guide sample registers local documents from ./Context:
That folder contains files such as:
For another domain, the same structure could be:
Supported file types
The current file-system reader supports:
| Extension | Content type |
|---|---|
.md | Markdown |
.txt | Plain text |
.json | JSON |
.pdf | PDF text extraction |
Files larger than the reader limit are skipped. The default file-system reader limit is 5 MB per file.
How source search works
When an agent with an attached Context Space runs, the runtime searches source documents using the user message.
| Step | What happens |
|---|---|
| 1 | The runtime reads documents from attached sources. |
| 2 | The user message is tokenized for deterministic text search. |
| 3 | Documents are scored by content, filename, relative path, and title-like areas. |
| 4 | Top matching snippets are selected. |
| 5 | Selected excerpts are added to the agent instructions for that run. |
The current implementation is deterministic text search, not a vector database. That makes the behavior simple to inspect and predictable for the sample runtime.
Grounding behavior
Source excerpts are added under Runiq Retrieved Source Context when relevant results are found.
The generated instruction text tells the model to prefer retrieved excerpts over general knowledge when they directly answer the request.
If no source excerpts are retrieved, the instructions explicitly tell the model not to claim it has read source contents.
Dashboard preview
The sources view groups readable documents by source and lets you preview the selected file content used for deterministic context search.
The dashboard can list source document groups and preview supported documents. Preview protects against unsafe paths and blocks common app settings/secrets file names.