---
title: "Get the source organization for custom agents in an enterprise"
method: GET
path: "/enterprises/{enterprise}/copilot/custom-agents/source"
tags: ["copilot"]
---

# Get the source organization for custom agents in an enterprise

`GET /enterprises/{enterprise}/copilot/custom-agents/source`

Gets the organization and repository configured as the source for custom agent definitions and Copilot CLI client settings in an enterprise.

Custom agents are enterprise-defined AI agents stored as markdown files in a special repository.
An enterprise admin configures one organization as the "source" for custom agents and
Copilot CLI client settings, and that org must have a repo named `.github-private` containing agent
definitions in `/agents/*.md`, or enterprise-managed AI standards in `copilot/managed-settings.json` (with fallback to `.github/copilot/settings.json`). [Learn more about configuring enterprise-managed AI standards for Copilot clients](https://docs.github.com/enterprise-cloud@latest/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/configure-enterprise-plugin-standards).

Enterprise owners with read access to AI Controls can use this endpoint.

OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint.

## Path parameters

- `enterprise` string, required

## Response `200`

Response

- object
  - `organization` object, nullable, required
    - `id` integer, required — Unique identifier of the organization
    - `login` string, required — Login of the organization
  - `repository` object, nullable, required
    - `id` integer, required — Unique identifier of the repository
    - `name` string, required — Name of the repository
    - `full_name` string, required — Full name of the repository including owner

## Other responses

- `403` — Forbidden
- `404` — Resource not found

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-2.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-2/versions/8ae6d0c8716e/schema)
