The CLI

In your assistant

Once the CLI is installed and the sidecar runs, your agent works as before — with your team's context arriving on its own, and a set of tools it knows when to use.

When a session starts

In a folder connected to a project, the agent is told that Knwlge is there and how to work with it: rely on the cited cards instead of re-opening the files they cite, ask context.search before reading unfamiliar code, look entries up before reading them, and open a file before changing it. Outside a connected folder it is told nothing.

With each prompt

The prompt hook asks the sidecar for a brief of up to six cards. Each card gives its source — a file and lines, a pull request, a reviewed memory — and, for source cards, the text itself, so the agent rarely needs to open the file. A brief that takes longer than 1.5 seconds is skipped for that prompt.

  • Repeat prompts in a session return only new cards, plus a Still applies: line for the ones already given.
  • Instruct-channel clients (Cursor, the Codex app) get the same brief by calling context.brief, as their managed rules block tells them to.
  • An empty brief is an honest answer: nothing cleared the evidence floor for this task.

The knowledge catalog

Every index extracts a catalog from each repository: its data models, HTTP routes and the controllers that serve them, UI components, files, and the team's practices. Before reading a table, route, component or file it has not seen, the agent looks it up with knowledge.lookup — what it is, where it lives, what it does — in a few hundred tokens instead of the files.

When it learns what something does, or a team convention, it saves that with knowledge.record for the next assistant. An admin reviews it on the server (Memory review). The team's topic documents — filed in six areas: System map, Entities, API routes, Components, Files and Practices — are read and kept current with docs.find, docs.read and docs.edit.

Guardrails

Your organization's admins write the rules every assistant must follow on the server's Guardrails page — about secrets, data, destructive actions, what to ask before doing. The agent reads them with guardrails.list, and the instructions the CLI installs tell it to follow them. Ask your agent to "list the guardrails" to see them verbatim.

Every tool

ToolWhen the agent uses it
context.briefBefore a task: cited context for what it is about to do.
context.searchTo find code, routes and docs by meaning, as cited excerpts.
context.explainTo see why a card was served or withheld, from a brief's receipt.
knowledge.lookupBefore reading a table, route, component or file it has not seen.
knowledge.recordAfter learning what an entry does, or a team convention.
docs.findTo find the team's documents by topic, area, or what they cover.
docs.readTo read one: how it works, rules, gotchas, routes, recent changes.
docs.editTo add, replace or remove text in a document's section, with a reason.
memory.writeTo save a rule, decision, gotcha or fact — for the team or privately.
memory.feedbackTo mark a card useful, incorrect or outdated.
guardrails.listTo read the organization's rules for assistants.

An Enterprise Server older than your CLI may not offer the catalog tools; the agent is told so and uses context.search there.

Seeing what was served

  • In Claude Code, each prompt the hook briefs shows a line such as ◆ knwlge · 3 cards · api · web, or a dim ◇ knwlge · no context (…) when nothing qualified or the server did not answer in time. It is shown to you only; nothing extra reaches the model.
  • In Claude Code's status line, knwlge statusline shows the last brief, for example ◆ knwlge 3 cards · 2 repos · 40s ago. Set it up with knwlge install --clients claude_code --statusline — only when you have no status line yet.
  • In any client, the context.brief result starts with a one-line summary, such as knwlge · 3 cards · api (2), web (1).
  • In the control panel, every brief and tool call is in the live feed (The control panel).