# Agent secrets: Write (repository)

Tier 2 permission, `permission:agent_secrets:write`. Page: https://ghtier.com/tier/permissions/agent-secrets-write

Creates, overwrites and deletes secrets given to the Copilot agent's environment for this repository. The agent's changes still go through a pull request.

**Reached by classic scopes:** [repo](https://ghtier.com/tier/tokens/repo.md) (Tier 0)

**Keys and policies that act as or change it:** [MCP server configuration for Copilot](https://ghtier.com/tier/keys-policies/agent-mcp-config.md) (Tier 1), [Agents secrets and variables](https://ghtier.com/tier/keys-policies/agent-secrets.md) (Tier 2)

**Sources:**
- [GitHub docs](https://docs.github.com/en/rest/authentication/permissions-required-for-github-apps#repository-permissions-for-agent-secrets)

From ghtier (https://ghtier.com). Every entry and link: https://ghtier.com/data/graph.json. Tiers: https://ghtier.com/tier.
