# Preparing to use custom agents in your organization

> Configure the repository that stores custom agents for your organization.

- 网址：https://funcoding.ai/agents/github-copilot/how-tos/administer-copilot/manage-for-organization/prepare-for-custom-agents/
- 来源：GitHub Copilot 官方文档原文（英文），CC-BY-4.0 许可，同步于 2026-10-11
- 官方原文：https://docs.github.com/en/copilot/how-tos/administer-copilot/manage-for-organization/prepare-for-custom-agents

---
<div class="callout callout-note">

Copilot custom agents are in public preview and subject to change.

</div>

## Prerequisites

You should understand what Copilot custom agents are and how they work. See [AUTOTITLE](https://funcoding.ai/agents/github-copilot/concepts/agents/cloud-agent/about-custom-agents/).

<div class="callout callout-note">

If your organization is part of an enterprise, enterprise owners can configure a ruleset that restricts custom agents. Contact your enterprise owners to check whether you can create and manage organization-level custom agents.

</div>

## Preparing your organization for custom agents

Organization-level custom agents are stored in the `/agents` directory of your organization's `.github` or `.github-private` repository. Both work the same way and make the custom agents available to all members of the organization, regardless of whether they have access to the repository itself.

For more information on `.github` and `.github-private` repositories, see [AUTOTITLE](https://docs.github.com/organizations/collaborating-with-groups-in-organizations/customizing-your-organizations-profile).

If you don't already have a suitable repository, follow the steps below to create one. These steps describe creating a `.github-private` repository, but you can also create a `.github` repository by naming it `.github` instead.

1. Create your custom agent repository using [GitHub's template repository](https://github.com/docs/custom-agents-template?ref_product=copilot&ref_type=engagement&ref_style=text). The template includes a README and the file structure you need.
1. In the **Choose an owner** triangle-down dropdown menu, choose your organization.
1. Name the repository `.github-private` and write a brief description.
1. In the visibility dropdown menu, click lock **Private**.
     * Organization members will still be able to use custom agents stored in this repository, regardless of whether they have direct access to the repository itself. Keeping the repository private also avoids conflicts with other features that require `.github-private` to be private, such as the organization member-only profile README.
    * If you want organization members to view and collaborate on the agent profiles directly, consider using a `.github` repository with organization **Internal** visibility. If you are an open source organization and want to share the custom agents publicly, select globe **Public** visibility.

1. Click **Create repository**.
1. Update the template README. Include any creation guidelines for custom agents or compliance considerations specific to your organization.

## Next steps

To trial custom agents, see [AUTOTITLE](https://funcoding.ai/agents/github-copilot/how-tos/copilot-on-github/customize-copilot/customize-cloud-agent/test-custom-agents/).
