{"meta":{"title":"准备在组织中使用自定义代理","intro":"配置供您的组织用于存储custom agents的存储库。","product":"GitHub Copilot","breadcrumbs":[{"href":"/zh/copilot","title":"GitHub Copilot"},{"href":"/zh/copilot/how-tos","title":"操作方法"},{"href":"/zh/copilot/how-tos/administer-copilot","title":"管理 Copilot"},{"href":"/zh/copilot/how-tos/administer-copilot/manage-for-organization","title":"组织管理"},{"href":"/zh/copilot/how-tos/administer-copilot/manage-for-organization/prepare-for-custom-agents","title":"准备自定义代理"}],"documentType":"article"},"body":"# 准备在组织中使用自定义代理\n\n配置供您的组织用于存储custom agents的存储库。\n\n> \\[!NOTE]\n> Copilot custom agents 位于 公开预览 中，并可能会更改。\n\n## 先决条件\n\n你应该了解 Copilot custom agents 什么是以及它们的工作原理。 请参阅“[关于自定义代理](/zh/copilot/concepts/agents/cloud-agent/about-custom-agents)”。\n\n> \\[!NOTE]\n> 如果你的组织是企业的一部分，企业所有者可以配置限制 custom agents的规则集。 请联系企业所有者或管理员，以确认是否可以创建和管理组织级别 custom agents。\n\n## 让你的组织为 custom agents 做好准备\n\n组织级 custom agents 存储在您的组织的 `/agents` 或 `.github` 仓库中的 `.github-private` 目录下。 两者的工作方式都相同，并使 custom agents 组织的所有成员都可用，而不管他们是否有权访问存储库本身。\n\n有关 `.github` 和 `.github-private` 存储库的更多信息，请参阅 [自定义组织的配置文件](/zh/organizations/collaborating-with-groups-in-organizations/customizing-your-organizations-profile)。\n\n如果还没有合适的存储库，请按照以下步骤创建一个存储库。 这些步骤介绍了如何创建 `.github-private` 存储库，但你也可以通过改为将其命名为 `.github` 来创建 `.github` 存储库。\n\n1. 使用[custom agent的模板库GitHub创建您的存储库](https://github.com/docs/custom-agents-template?ref_product=copilot\\&ref_type=engagement\\&ref_style=text)。 该模板包括 README 文件以及所需的文件结构。\n\n2. 在 **“选择所有者**<svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-triangle-down\" aria-label=\"triangle-down\" role=\"img\"><path d=\"m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z\"></path></svg> ”下拉菜单中，选择你的组织。\n\n3. 将存储库命名为 `.github-private` 并编写简短说明。\n\n4. 在可见性下拉菜单中，单击“ <svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-lock\" aria-label=\"lock\" role=\"img\"><path d=\"M4 4a4 4 0 0 1 8 0v2h.25c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 12.25 15h-8.5A1.75 1.75 0 0 1 2 13.25v-5.5C2 6.784 2.784 6 3.75 6H4Zm8.25 3.5h-8.5a.25.25 0 0 0-.25.25v5.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25ZM10.5 6V4a2.5 2.5 0 1 0-5 0v2Z\"></path></svg>**专用**”。\n   * 无论组织成员是否对存储库本身具有直接访问权限，他们仍然可以使用此存储库中存储的 custom agents。 将存储库设为私有还可以避免与其他要求 `.github-private` 为私有的功能发生冲突，例如仅限组织成员查看的个人资料 README。\n   * 如果希望组织成员直接查看和协作处理 agent profiles，请考虑使用具有`.github`<svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-organization\" aria-label=\"organization\" role=\"img\"><path d=\"M1.75 16A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0h8.5C11.216 0 12 .784 12 1.75v12.5c0 .085-.006.168-.018.25h2.268a.25.25 0 0 0 .25-.25V8.285a.25.25 0 0 0-.111-.208l-1.055-.703a.749.749 0 1 1 .832-1.248l1.055.703c.487.325.779.871.779 1.456v5.965A1.75 1.75 0 0 1 14.25 16h-3.5a.766.766 0 0 1-.197-.026c-.099.017-.2.026-.303.026h-3a.75.75 0 0 1-.75-.75V14h-1v1.25a.75.75 0 0 1-.75.75Zm-.25-1.75c0 .138.112.25.25.25H4v-1.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 .75.75v1.25h2.25a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25ZM3.75 6h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5ZM3 3.75A.75.75 0 0 1 3.75 3h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 3 3.75Zm4 3A.75.75 0 0 1 7.75 6h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 7 6.75ZM7.75 3h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5ZM3 9.75A.75.75 0 0 1 3.75 9h.5a.75.75 0 0 1 0 1.5h-.5A.75.75 0 0 1 3 9.75ZM7.75 9h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1 0-1.5Z\"></path></svg>可见性的 \\*\\*\\*\\* 存储库。 如果你是开放源代码组织并且想要公开共享 custom agents，请选择 <svg version=\"1.1\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" class=\"octicon octicon-globe\" aria-label=\"globe\" role=\"img\"><path d=\"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM5.78 8.75a9.64 9.64 0 0 0 1.363 4.177c.255.426.542.832.857 1.215.245-.296.551-.705.857-1.215A9.64 9.64 0 0 0 10.22 8.75Zm4.44-1.5a9.64 9.64 0 0 0-1.363-4.177c-.307-.51-.612-.919-.857-1.215a9.927 9.927 0 0 0-.857 1.215A9.64 9.64 0 0 0 5.78 7.25Zm-5.944 1.5H1.543a6.507 6.507 0 0 0 4.666 5.5c-.123-.181-.24-.365-.352-.552-.715-1.192-1.437-2.874-1.581-4.948Zm-2.733-1.5h2.733c.144-2.074.866-3.756 1.58-4.948.12-.197.237-.381.353-.552a6.507 6.507 0 0 0-4.666 5.5Zm10.181 1.5c-.144 2.074-.866 3.756-1.58 4.948-.12.197-.237.381-.353.552a6.507 6.507 0 0 0 4.666-5.5Zm2.733-1.5a6.507 6.507 0 0 0-4.666-5.5c.123.181.24.365.353.552.714 1.192 1.436 2.874 1.58 4.948Z\"></path></svg>**Public** 可见性。\n\n5. 单击“创建存储库”。\n\n6. 更新模板README。 包含组织特定的 custom agents 创建指南或合规注意事项。\n\n## 后续步骤\n\n若要试用 custom agents，请参阅 [在您的组织或企业中测试和发布custom agents](/zh/copilot/how-tos/copilot-on-github/customize-copilot/customize-cloud-agent/test-custom-agents)。"}