Agent Knowledge (RAG)
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Give an agentic worker its own knowledge corpus — a set of
documents (PDFs, text) the worker retrieves from automatically. Before each LLM call the
worker searches the corpus and injects the most relevant passages as a <knowledge> block in
the system prompt. This is retrieval-augmented generation (RAG) as auto pre-retrieval: the
model always sees grounded context, without you wiring a retrieval tool by hand.
How it works
Section titled “How it works”- Attach documents to the worker. They are extracted, chunked, and baked into the
worker’s
.gtpackas a corpus — the pack is self-contained. - At runtime, each turn: the worker embeds the query, searches the corpus for the top
top_kpassages, and prepends them to the prompt (after any long-term memory facts). - The model answers grounded in the retrieved passages.
"knowledge": { "provider": "chronicle", // cap://dw.knowledge "embedding": { "provider": "openai", "model": "text-embedding-3-small" }, // cap://dw.embedding "top_k": 5}provider— the knowledge store capability (cap://dw.knowledge), e.g. Chronicle.embedding— the embedding provider (cap://dw.embedding) used to index the corpus and embed queries.top_k— how many passages to retrieve per turn (default 5).
Runtime requirement
Section titled “Runtime requirement”Knowledge retrieval is opt-in at the runner build, the same as
long-term memory: the runner must be built with the
knowledge-chronicle feature, and retrieval stays silently disabled unless the embedding
environment is set. An unconfigured tier never fails startup — the worker just answers without
retrieval.
| Variable | Purpose |
|---|---|
GREENTIC_KNOWLEDGE_EMBED_BASE_URL | Embedding API base URL. |
GREENTIC_KNOWLEDGE_EMBED_API_KEY | Embedding API key. |
GREENTIC_KNOWLEDGE_EMBED_MODEL | Embedding model. |
GREENTIC_KNOWLEDGE_BACKEND | Graph/vector store (defaults to embedded SurrealDB). |
Authoring
Section titled “Authoring”In the Designer, manage a reusable tenant knowledge library (upload and manage PDFs), then attach documents to a worker in the composer’s Knowledge section; the corpus is emitted into the worker’s pack.
See also
Section titled “See also”- Agent Types — single_turn, agent_graph, deep_worker
- Agent Memory — short-term and long-term memory