> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ada.cx/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ada.cx/_mcp/server.

# Sources

**Sources** represent an external knowledge source, such as a knowledge base or document. Sources help you keep track of, organize, and name the sources of knowledge your AI Agent has access to. In Ada, all articles **must** have a Source.

## Availability rules

A source can carry an availability-rule template in `availability_rules`. It uses the same rule schema as an article. See [Availability rules](/reference/introduction/availability-rules) for the schema, operators and examples.

Each new article created under the source whose request omits `availability_rules` gets the template. An article that sends its own `availability_rules` keeps them. Existing articles keep their rules when the template changes.

### Field semantics on create and update

| Value         | Effect                                                                                                                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Rule object   | Set (or replace) the template on the source.                                                                                   |
| `null`        | On update, remove the template. On create, the same as an omitted field.                                                       |
| Field omitted | On create, no template. A source an App creates gets the rules set on its connection. On update, leave the template unchanged. |

### Field semantics on read

`availability_rules` is a rule object when the source has a template, or `null` when it has none.

You can also set the template from the Ada dashboard. On the **Sources** tab, click **Settings** beside the source.