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

# Agent context

> Give every agent in a project the same terminology, table choices, and business rules

Agent context is shared background knowledge every AI agent in a project reads before answering. It lives in a single file, `silicon.project_context.yml`, that sits next to `silicon.config.yml` inside your dbt or [native Silicon YAML](https://docs.meetsilicon.com/semantic-layer/yaml.md) project -- in the **Project directory path** you set on the connection, which isn't always your repository root. Notes you add here change future agent behavior without changing the semantic layer.

The file is committed to your project repository and travels with the rest of your project metadata.

## When agents load it

Two things have to be true, beyond the file existing in your repository:

* **Review AI agent turns is on.** Silicon only reads `silicon.project_context.yml` into a project when the organization setting [**Review AI agent turns**](https://docs.meetsilicon.com/agents/issues.md#enabling-issues) (**Settings -> Ask AI -> General**) is enabled. Turn it on, then click **Refresh dbt** (**Refresh models** for native projects), or run `silicon deploy`, so Silicon compiles the project and picks up the file.
* **The project connects through GitHub or GitLab.** Agents only load project context on projects connected through GitHub or GitLab. A project with no repository connection -- including a preview created with `silicon preview`, `silicon start-preview`, or `silicon deploy` with no repository connection -- has no project context at all, regardless of the setting above: nothing is ingested and agents load nothing.

A preview built from a connected GitHub or GitLab branch reads `silicon.project_context.yml` from that branch at compile time, the same as any other project file. A CLI-created preview with no repository connection doesn't -- there's no branch to read it from.

## When to use it

Reach for agent context when the data model itself is fine but the agent is missing background knowledge -- terminology, which table to prefer, or business rules that aren't expressible as semantic definitions. If the fact would also help a new analyst joining the team, edit the semantic layer instead.

Agents pick up new context on their next turn, so the loop between "notice a gap" and "agents behave better" is short.

## How entries are added

There are two ways entries land in the file:

* **Through Issues writeback.** When a [project context](https://docs.meetsilicon.com/agents/issues.md) fix runs, Silicon proposes a single entry and opens a pull request against your project repository. The first time this happens the file is created (with a header explaining what it's for). Subsequent fixes add or update entries in the same file.
* **By hand.** You can edit `silicon.project_context.yml` directly. Writeback uses the GitHub API to merge one entry at a time, preserving comments, quoting, and key order in the rest of the file, so manual edits and writeback coexist cleanly.

Either way, the same validation rules apply: invalid files surface schema-backed errors at ingest time.

The full JSON Schema is published at [`silicon-project-context-1.0.json`](https://github.com/meetsilicon/silicon/blob/main/packages/common/src/schemas/json/silicon-project-context-1.0.json) -- point your editor at it for autocomplete and validation.

## File shape

```yaml silicon.project_context.yml theme={null}
version: 1
entries:
  - id: aov
    kind: definition
    content: "AOV means average order value -- total revenue divided by number of orders in the period."
    terms: ["AOV", "average order value"]
    objects: []
  - id: active-customers-table
    kind: context
    content: "Use `fct_customer_activity` for active-customer questions; `dim_customers` is a slowly-changing dimension and double-counts churned customers."
    terms: ["active customers"]
    objects: ["fct_customer_activity", "dim_customers"]
```

The top-level document is `{ version, entries }`. A bare array of entries is also accepted for backward compatibility, but new files are written in the canonical shape.

### Top-level properties

| Property | Type | Required | Description |
| - | - | - | - |
| `version` | number | yes | Schema version. Currently always `1`. Bumping this is the escape hatch for a future breaking change. |
| `entries` | array | yes | The list of context entries. May be empty. |

### Entry properties

Each item in `entries` is a single self-contained fact your agents should know.

| Property | Type | Required | Description |
| - | - | - | - |
| `kind` | `"definition"` \| `"context"` | yes | How the entry is retrieved. Use `definition` for term-triggered facts (acronyms, vocabulary, "X means Y"). Use `context` for object-scoped guidance (routing rules, join rules, durable facts about a model). |
| `content` | string | yes | One self-contained sentence. This is what the agent reads. Keep it short and unambiguous. |
| `id` | string | no | Stable identifier used to update the entry later. Optional -- Silicon derives one from `terms[0]` (or `content`) at ingest if you omit it, suffixing on collision. Provide an explicit id if you want to hand-edit later without worrying about churn. |
| `terms` | string\[] | no | Prompt-facing trigger words and phrases. Used to surface `definition` entries when a user's question mentions one of them. Defaults to `[]`. |
| `objects` | string\[] | no | Semantic objects (models, fields, joins) this entry concerns. Used to surface `context` entries when the agent is reasoning about one of these objects. Defaults to `[]`. |

Unknown keys on an entry are preserved on round-trip, so a field a newer Silicon version adds won't be silently dropped if you edit the file by hand.

## Related

* [Issues](https://docs.meetsilicon.com/agents/issues.md) -- the board that proposes project context fixes and opens pull requests against this file.
* [Effective analytics with agents](https://docs.meetsilicon.com/agents/effective-analytics-with-agents.md) -- knowledge documents and other ways to hand agents context upfront.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.