You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[x]**[Hybrid inference](https://bug-ops.github.io/zeph/concepts/providers.html)** — Ollama, Claude, OpenAI, Gemini, any OpenAI-compatible API, or fully local via Candle (GGUF)
52
52
-[x]**[Task orchestration](https://bug-ops.github.io/zeph/concepts/task-orchestration.html)** — DAG-based task graphs with LLM goal decomposition, parallel execution, plan template caching
-[x]**[ACP server](https://bug-ops.github.io/zeph/advanced/acp.html)** — stdio, HTTP+SSE, WebSocket transports for IDE integration (Zed, VS Code, Helix)
56
56
-[x]**[A2A protocol](https://bug-ops.github.io/zeph/advanced/a2a.html)** — agent-to-agent delegation over JSON-RPC 2.0 with IBCT capability tokens
@@ -59,7 +59,9 @@ zeph # start the agent
59
59
-[x]**[Multi-channel I/O](https://bug-ops.github.io/zeph/advanced/channels.html)** — CLI, Telegram, TUI, Discord, Slack — all with streaming, voice, and vision input
60
60
-[x]**[OS sandbox](https://bug-ops.github.io/zeph/reference/security.html#sandbox)** — macOS Seatbelt + Linux Landlock isolation for tool execution; VIGIL verify-before-commit security gate; egress network logging
61
61
-[x]**[Plugin system](https://bug-ops.github.io/zeph/advanced/plugins.html)** — install/remove skill packages via `zeph plugin add <url>`; runtime config overlay merge with tighten-only safety rules; hub install pipeline with trust escalation filter
62
-
-[x]**[Session recap](https://bug-ops.github.io/zeph/advanced/sessions.html)** — `/recap` command and configurable auto-summary shown on session resume
62
+
-[x]**[Session recap](https://bug-ops.github.io/zeph/advanced/sessions.html)** — `/recap` command and configurable auto-summary shown on session resume; `/loop` for repeating a prompt on a fixed schedule within a session
63
+
-[x]**[MARCH self-check](https://bug-ops.github.io/zeph/advanced/quality.html)** — post-response factual consistency via Proposer+Checker LLM pipeline; extracts assertions, verifies against retrieved memory evidence, appends a flag marker on contradiction; configurable trigger, latency budget, and per-assertion timeout
64
+
-[x]**[Scripted / CI mode](https://bug-ops.github.io/zeph/guides/scripted.html)** — `--bare` skips memory init, skill loading, and watcher registration; `--json` emits newline-delimited JSON events for programmatic consumption; `-y` auto-confirms tool approvals
63
65
-[x]**[LSP integration](https://bug-ops.github.io/zeph/guides/lsp.html)** — compiler-level code intelligence via rust-analyzer, pyright, gopls and others: type info, diagnostics, call hierarchy, safe rename, references — injected automatically into context after file writes and reads
-[x]**[Document RAG](https://bug-ops.github.io/zeph/advanced/document-loaders.html)** — ingest `.txt`, `.md`, `.pdf` into Qdrant with automatic retrieval per turn
Copy file name to clipboardExpand all lines: book/src/advanced/code-indexing.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -264,6 +264,31 @@ score_threshold = 0.25
264
264
budget_ratio = 0.40
265
265
```
266
266
267
+
## Automatic Code RAG Injection
268
+
269
+
When `[index]` is enabled with a `Qdrant` backend available and `mcp_enabled = false`, code context is automatically injected at context-assembly time. The retriever queries the code chunk collection using the current user message as the retrieval key, fetches the top-scoring chunks up to `budget_ratio` of the available context window, and appends them to the prompt as a `<code_context>` block.
270
+
271
+
**Activation conditions:**
272
+
273
+
-`[index] enabled = true`
274
+
-`[index.retrieval] budget_ratio > 0`
275
+
- Qdrant is available and accessible
276
+
- MCP tool exposure is disabled (`mcp_enabled = false`; when both are enabled, MCP tools take priority to avoid duplication)
277
+
278
+
**Example context injection:**
279
+
280
+
When you write "implement a cache invalidation function", the agent's context assembly:
281
+
282
+
1. Embeds "implement a cache invalidation function" using the configured embedding model
283
+
2. Queries Qdrant's `zeph_code_chunks` collection for semantically relevant code
284
+
3. Fetches up to `max_chunks = 12` results with `score_threshold >= 0.25`
285
+
4. Packs chunks into a `<code_context>` block (up to 40% of available tokens)
286
+
5. Injects the block into the prompt
287
+
288
+
The retrieval is fail-open: if embedding, Qdrant queries, or scoring errors occur, the injection is silently skipped and the turn continues. No special tooling is required from the agent.
289
+
290
+
Use `budget_ratio = 0` to disable automatic injection while keeping the code index available for manual MCP tool queries via `symbol_definition`, `find_text_references`, etc.
291
+
267
292
## Supported Languages
268
293
269
294
All tree-sitter grammars are compiled into every build. Language sub-features on `zeph-index` (`lang-rust`, `lang-python`, `lang-js`, `lang-go`, `lang-config`) are all enabled by default and cannot be individually disabled in the standard build.
0 commit comments