> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usegradient.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge and skills

> Attach knowledge bases and skills to a node so the model can search documents and load instructions on demand.

Tools let a node do things. Knowledge bases and skills change what a node knows. Both attach to a single node, and both keep the base prompt lean by loading only what a turn actually needs.

## Knowledge bases

A knowledge base is a collection of documents you want the agent to be able to look things up in. Create one under **Knowledge**, then add documents: paste notes, or upload PDF, Word, Markdown, or text files. Gradient splits each document into chunks and embeds them so they can be searched by meaning rather than exact words.

Attach a knowledge base to a node and the node gains a search tool named `search_kb_<name>` that takes a `query`. When the model needs a fact, it calls the tool; the engine embeds the query, runs a similarity search over the base, and returns the top matching passages into the turn.

Because retrieval happens on demand, the model pulls in only the passages it needs for the current turn instead of carrying every document in the prompt. That is what lets a knowledge base be far larger than a prompt could ever hold.

## Skills

A skill is a named, reusable block of instructions: a name, a short description, and the content itself. Create skills under **Skills** and share them across as many nodes as you like.

Attach a skill to a node and two things happen:

* the node's system prompt gains a short **catalog** entry, the skill's name and description
* the engine gives the node a single `use_skill` tool

The model always sees the catalog, so it knows the skill exists. When the situation matches a skill's description, the model calls `use_skill` with the exact name and the full content loads into that turn. Everything else stays out of the prompt until it is needed.

This is how you keep a node's base prompt small while still giving it deep, specific instructions for the cases that call for them: a refund policy, an escalation script, or a long disclosure the agent must read verbatim.

## Which to reach for

|               | Knowledge base                            | Skill                                               |
| ------------- | ----------------------------------------- | --------------------------------------------------- |
| Holds         | Documents, split into searchable chunks   | Authored instructions, as one block of text         |
| The node gets | A `search_kb_<name>` tool                 | A `use_skill` tool and a catalog line in its prompt |
| The model     | Searches for relevant passages by query   | Loads the whole skill when its description matches  |
| Best for      | Reference material too large for a prompt | A reusable procedure, policy, or script             |

Both knowledge bases and skills are attached per node, so a handoff target can carry different knowledge and skills than the node before it. And both travel with the agent when you publish; the published version searches the same bases and loads the same skills it was published with.

<CardGroup cols={2}>
  <Card title="Agents and topology" href="/build/agents">
    How nodes are wired into a graph and what each node carries.
  </Card>

  <Card title="Tools" href="/build/tools">
    The tool shapes a node can call, alongside its knowledge and skills.
  </Card>
</CardGroup>
