Skip to content

Commit cd08a41

Browse files
authored
docs: add qmd reference page to fix broken links in docs build (#24999)
1 parent 58e1cab commit cd08a41

1 file changed

Lines changed: 125 additions & 0 deletions

File tree

  • docs/src/content/docs/reference
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
---
2+
title: QMD Documentation Search
3+
description: Configure vector similarity search over documentation files using the qmd tool in agentic workflows.
4+
sidebar:
5+
order: 820
6+
---
7+
8+
QMD Documentation Search provides vector similarity search over documentation files. It runs [tobi/qmd](https://github.com/tobi/qmd) as an MCP server so agents can find relevant documentation by natural language query.
9+
10+
The search index is built in a dedicated indexing job (which has `contents: read`) and shared with the agent job via GitHub Actions cache, so the agent job does not need `contents: read` permission.
11+
12+
:::caution[Experimental]
13+
QMD Documentation Search is an experimental feature. The API may change in future releases.
14+
:::
15+
16+
## Basic Configuration
17+
18+
```aw wrap
19+
---
20+
tools:
21+
qmd:
22+
checkouts:
23+
- pattern: "docs/**/*.md"
24+
---
25+
```
26+
27+
## Configuration Options
28+
29+
### `checkouts`
30+
31+
A list of named documentation collections built from checked-out repositories. Each entry specifies which files to index from the current repository or a different repository.
32+
33+
```aw wrap
34+
---
35+
tools:
36+
qmd:
37+
checkouts:
38+
- pattern: "docs/**/*.md"
39+
- pattern: "README.md"
40+
---
41+
```
42+
43+
Each checkout entry can optionally specify its own checkout configuration to target a different repository.
44+
45+
### `searches`
46+
47+
A list of GitHub code search queries whose results are downloaded and added to the qmd index.
48+
49+
```aw wrap
50+
---
51+
tools:
52+
qmd:
53+
searches:
54+
- query: "repo:github/gh-aw language:markdown"
55+
---
56+
```
57+
58+
### `cache-key`
59+
60+
A GitHub Actions cache key used to persist the qmd index across workflow runs. When set without any indexing sources (`checkouts`/`searches`), qmd operates in read-only mode: the index is restored from cache and all indexing steps are skipped.
61+
62+
```aw wrap
63+
---
64+
tools:
65+
qmd:
66+
cache-key: "qmd-docs-${{ github.repository }}"
67+
---
68+
```
69+
70+
### `gpu`
71+
72+
Enable GPU acceleration for the embedding model (`node-llama-cpp`). Defaults to `false`: `NODE_LLAMA_CPP_GPU=false` is injected into the indexing step so GPU probing is skipped on CPU-only runners. Set to `true` only when the indexing runner has a GPU.
73+
74+
```aw wrap
75+
---
76+
tools:
77+
qmd:
78+
gpu: true
79+
runs-on: gpu-runner
80+
---
81+
```
82+
83+
### `runs-on`
84+
85+
Override the runner image for the qmd indexing job. Defaults to the same runner as the agent job. Use this when the indexing job requires a different runner (e.g. a GPU runner).
86+
87+
```aw wrap
88+
---
89+
tools:
90+
qmd:
91+
runs-on: ubuntu-latest
92+
---
93+
```
94+
95+
## Example: Index Documentation from Multiple Sources
96+
97+
```aw wrap
98+
---
99+
tools:
100+
qmd:
101+
checkouts:
102+
- pattern: "docs/**/*.md"
103+
- pattern: "*.md"
104+
cache-key: "qmd-docs-${{ github.repository }}-${{ github.run_id }}"
105+
---
106+
```
107+
108+
## Example: Read-Only Mode with Pre-Built Index
109+
110+
```aw wrap
111+
---
112+
tools:
113+
qmd:
114+
cache-key: "qmd-docs-my-project"
115+
---
116+
```
117+
118+
In read-only mode, the index is restored from cache and no indexing steps are run. This is useful when the index is built separately and shared across workflows.
119+
120+
## Related Documentation
121+
122+
- [Tools](/gh-aw/reference/tools/) - Overview of all available tools and configuration
123+
- [Frontmatter](/gh-aw/reference/frontmatter/) - Complete frontmatter configuration guide
124+
- [Cache Memory](/gh-aw/reference/cache-memory/) - Persistent memory across workflow runs
125+
- [GitHub Tools](/gh-aw/reference/github-tools/) - GitHub API operations

0 commit comments

Comments
 (0)