Skip to content

SMOODEV-2610: th knowledge — top-level command + semantic search#207

Merged
brentrager merged 2 commits into
mainfrom
SMOODEV-2610-th-knowledge-search
Jul 14, 2026
Merged

SMOODEV-2610: th knowledge — top-level command + semantic search#207
brentrager merged 2 commits into
mainfrom
SMOODEV-2610-th-knowledge-search

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

What

th knowledge search "<query>" runs the same semantic retrieval an agent does over the org's own knowledge base (embed → dense+sparse hybrid → RRF), returning the most relevant passages. It's the missing agentic-coding primitive next to th search (the web) and th crawl (a page) — now an agent (or you) can ask "what does our knowledge base say about X" from the CLI.

th knowledge search "how does billing work"
th knowledge search "refund policy" --doc <id>      # scope to one document
th knowledge search "pricing" --max 8 --json

Also promotes the full knowledge surface to top-level th knowledge (alias kb) — list / show / content / upload / website / process / update / delete — same commands as th api knowledge, consistent with how th booking / th files / th org were promoted.

Backend

Backed by the new authed POST /organizations/:org_id/knowledge/search endpoint (smooai #3002, SMOODEV-2610). The endpoint and the agent's in-process knowledge_search tool call one shared Rust crate, so th and the agent can never return different results. Authed only — knowledge is org-private.

Verify

th knowledge --help          # search + full CRUD, top-level
th knowledge search --help   # <QUERY>, --doc, --max, --json
th --help                    # 'knowledge' listed (alias kb)

Changeset: @smooai/smooth minor.

Jira: SMOODEV-2610

🤖 Generated with Claude Code

`th knowledge search "<query>"` runs the SAME retrieval an agent does over the org's
OWN knowledge base (embed → dense+sparse hybrid → RRF), returning the most relevant
passages — the missing agentic-coding primitive alongside `th search` (web) and
`th crawl` (a page). `--doc <id>` scopes to a single document, `--max` caps, `--json`
for raw output.

Also promotes the full knowledge surface (list/show/content/upload/website/process/
update/delete) to top-level `th knowledge` (alias `kb`), same as `th api knowledge`
— consistent with `th booking`/`th files`/`th org`.

Backed by the new authed POST /organizations/:org_id/knowledge/search endpoint
(smooai SMOODEV-2610).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vg7frHqHSAUXhQiRNdr3NW
@changeset-bot

changeset-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4a0b312

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@smooai/smooth Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@brentrager brentrager enabled auto-merge (squash) July 13, 2026 18:33
@brentrager brentrager merged commit 59d926b into main Jul 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant