---
title: "amp ai-context"
description: "Reference for the amp ai-context commands: get, set."
product: general
lang: en
last_updated: 2026-11-30
token_estimate: 485
---
# amp ai-context

`amp ai-context` groups these commands. It uses the `analytics:read` and `analytics:write` scopes; each command lists the one it needs.

## `amp ai-context get`

Returns the customer-managed AI context configured in Settings → AI Controls for the organization, or for a project with --project. Empty string when nothing is configured.

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

Omit --project for organization context; pass --project for a project.

```bash
amp ai-context get
amp ai-context get --project <project_id>
```

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--project` | string | No | Amplitude project identifier, backed by the canonical app ID. Omit --project for organization context; pass --project for a project. Alias: `--project-id`. |

Requires the `analytics:read` scope.

## `amp ai-context set`

Replaces the customer-managed AI context in Settings → AI Controls for the organization, or for a project with --project. Pass --context "" to clear the stored value.

Omit --project for organization context; pass --project for a project.

```bash
amp ai-context set --context "Your organization context"
amp ai-context set --project <project_id> --context "Your project context"
```

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--project` | string | No | Amplitude project identifier, backed by the canonical app ID. Omit --project for organization context; pass --project for a project. Alias: `--project-id`. |
| `--idempotency-key` | string | No | Generated automatically when omitted. Header acceptance alone does not guarantee retry deduplication. |
| `--context` | string | Yes | Full customer-managed context to store. Replaces the existing value; send an empty string to clear. |

Requires the `analytics:write` scope.

