# Sources card

> The card under an answer that cites the knowledge base passages the agent's searches found, one numbered chip per source.

The sources card cites what the agent read in its knowledge bases. It sits under the assistant's answer as a row of numbered chips, one per source, and a click on a chip opens its passages with the source's title, domain and knowledge base. A web page's chip has a link icon and an Open link; a file's chip has a document icon and no link.

## Usage

There is nothing to set up. The card shows for the `search_knowledge` calls of an agent with knowledge bases on Super Assist. The search runs on the server, so the package lends no tool for it; it only renders the calls.

## What the card shows

Every `search_knowledge` call of a message goes into one card, after the message's last text. Passages of the same page, or of the same file, become one chip, in the order the searches returned them. While a search runs, the card is a skeleton row in the same place.

Each call answers the model with its passages, best match first:

```ts
type Answer = {
  passages: {
    knowledgeBase: string;
    title: string; // a web page's title, or a file's name
    url: string | null; // a web page's address; a file has none
    score: number; // from 0 to 1
    text: string;
  }[];
};
```

The agent's prompt asks it to answer from the passages and to cite no source the search did not return, so the chips match the answer.

## Props

None. The package renders it under the answer. Replace it with `cards.sources` on `AssistedProvider`, see [Swap a card](https://superassist.app/how-to/swap-a-card.md). Your card gets the last call's props, with `result.passages` holding every call's passages and `status` running while any call runs. The card carries `data-slot="sources"`.

`Sources` renders the same chips from a `passages` array and a `searching` flag, for a card of your own.

## See also

- [Links card](https://superassist.app/components/cards/links-card.md) for pages of the app to open.
