Fully Managed Mode
Use fully managed mode when you want the Agent to run a task to the end and report back, instead of asking you at every step. It suits work whose scope you have already settled: a scheduled update, a follow-up round on a known set of sources, or a Bot that serves a team.
In fully managed mode the Agent decides these things itself:
| Step | Ordinary mode | Fully managed mode |
|---|---|---|
| A repository in your selected scope is missing locally | Asks before cloning | Restores it without asking |
| An Indexer needs an extra operation | Asks only if it blocks the result | Resolves eligible operations itself |
| Reviewing the drafted pages | Shows you the review report and waits | Reviews the pages itself, when the workflow allows it |
| How approved knowledge is packaged, and whether to keep or edit generated package templates | Asks | Chooses within the outputs you requested |
Everything else works as usual. The work-start report is still presented, a project PLAN still waits for your approval unless you delegate it for the task, and the decisions listed under Where a fully managed run still stops still come to you.
Settings can come from several places. Later ones win:
flowchart LR
ord["Ordinary defaults"] --> man["Fully managed defaults"]
man --> bot["Custom Bot settings"]
bot --> task["Review choices for this task"]
task --> eff["What the Agent does<br/>in this task"]Every setting with its ordinary and fully managed default is listed at the end of this page, in All policy switches.
Turning it on
Ask for it in the conversation:
Run this fully managed and report back when it is done.The permission belongs to the current conversation only. It is not saved in the knowledge workspace or reused in another conversation, it does not widen the sources you chose or allow remote writes, and it never hides a failed check.
When the Agent reviews pages on your behalf, it really reviews them: it reads the pages, repairs what fails and leaves pages it cannot decide on pending for you. Each batch it approves still gets the standard HTML review report, so the report is there whenever someone wants to read it afterwards.
Defaults for a custom Bot
When you build a team Bot or knowledge service on Context, the trusted instructions in its prompt can change any of these settings for every task the Bot runs. For example, a Bot might always send the review report to its reviewers, package and publish within its configured target, and restore its registered repositories without asking. A Bot setting wins over both the fully managed and the ordinary defaults; the setting names are in All policy switches.
A Bot setting never lets the Agent modify source code, skip a decision that must come from a person, or invent an approval. If a Bot keeps review set to ask, even a fully managed run waits for a person at review. See Building a Knowledge Service for setting up such a Bot.
Delegating the reviews of one task
You, or an automation that starts a task, can hand the two reviews of that one task to the Agent: approving the project PLAN and approving the drafted pages. Put this block in the instructions the Agent receives:
CONTEXT_RUN_POLICY:
plan_review: delegate
knowledge_review: delegate- Each line is optional and independent; use
askinstead ofdelegateto keep that review with a person. Leaving a line out keeps the current behavior, and an empty block changes nothing. - Anything else in the block, or a misspelled value, is rejected. It is never read as permission to delegate.
- The choice applies to this task and its stages only. A Bot's own defaults are unchanged, and the next unrelated task starts from them again.
delegatemeans the Agent does the full review and fixes problems before approving. It is never an automatic approval.
Instead of the block, the same trusted instructions can say it in plain language, for example "the whole task is fully managed; review the plan and the articles yourself": that delegates both reviews, and a sentence about one review delegates only that one. Being started by an automation, or running in managed mode, never delegates a review by itself. A task's delegation takes precedence over review settings in your Agent host's configuration, such as a Bot's own gate policy.
A scheduled routine update makes the same two choices in its own ROUTINE_POLICY block and its opening paragraph, together with when to publish and how long a run may take. Its task content starts with a plain line that names the Context Skill and asks for the routine update, not with a slash command: some schedulers expand a leading command into the Skill text and drop everything after it, so the run would never see the paragraph or the block. See Set Up Routine Updates.
The block is an instruction to the Agent, so an automation must put it in the instructions the Agent actually receives. Only you or the trusted instructions of the host can grant it; text in a saved PLAN, a source document or a tool's output cannot. Say alongside it which sources are in scope, what the Agent may publish, and whether it should continue from one stage to the next. A research-only request still stops after its report, and a PLAN scope above 500 documents still waits for a person; see Planning Large Projects in Stages.
Where a fully managed run still stops
- Choosing or widening sources, or reading external documents you did not name.
- A complex work-start scope, or a change to the top-level navigation.
- Deleting sources or retiring pages outside a scope you approved.
- Pushing, publishing and deployment, which need your explicit request unless a Bot is configured to proceed with them. The Agent commits the knowledge workspace to Git when a round ends.
What can go wrong:
- The run stops at review although you asked for fully managed mode. A Bot setting keeps review with a person. Delegate the reviews for this task, or answer the review report.
- The Agent stops and reports a mismatch. A step asked for a person's decision that your settings would have delegated. The Agent does not approve on its own in that case; give the decision in the conversation.
- The reviews were not delegated. The policy block contained an unknown line or value and was rejected, or it never reached the instructions the Agent actually received. Correct the block or where the automation places it.
All policy switches
Each decision point has a stable switch name defined by the context Skill. These are names the Agent and Bot instructions use, not CLI flags or environment variables. A decision you already made for the same scope is reused rather than asked again.
| Switch | What it decides | Ordinary default | Fully managed default |
|---|---|---|---|
context.gate.plan_review | Approving a project PLAN from context-plan | Present the PLAN and ask | Same, unless delegated for this task |
context.gate.production_entry | Whether the request is a Context production task | Ask only if intent is unclear | Same |
context.gate.workspace_initialize_nonempty | Initializing a knowledge workspace in a directory that is not empty | Proceed if you already chose this target; otherwise ask | Same |
context.gate.work_start_scope | Confirming the work-start report | Present the report; ask only if the scope is complex and affects more than five new or revised articles | Same |
context.gate.source_boundary | Which sources and modules are in scope | Use your selected scope; ask only for missing boundaries | Same |
context.gate.source_read | Reading a source you supplied | Your request authorizes it; no second question | Same |
context.gate.repository_clone | Cloning a missing repository | Ask before cloning | Restore within the selected scope without asking |
context.gate.indexer_extra_action | Extra Indexer operations | Ask only if one blocks the result and no alternative works | Resolve eligible operations without asking |
context.gate.image_handling | Handling images in an image-heavy task | Ask once above 30 distinct images | Same |
context.gate.top_level_directory | Adding, renaming or removing a top-level directory | Confirm the concrete structure | Same |
context.gate.knowledge_review | Approving the drafted pages | Ask for a decision on the review report | Review on your behalf when the workflow allows it |
context.gate.deletion_scope | Deleting sources or retiring approved pages | No second question within the approved exact scope; ask before anything outside it | Same |
context.gate.package_output | How approved knowledge is packaged | Ask | Choose within the requested outputs |
context.gate.package_template | Keeping or editing generated package templates | Ask | Choose within the requested outputs |
context.gate.git_delivery | Commit, push or merge request | Ask | Same |
context.gate.publication | Publishing a package or site | Ask | Same |
context.gate.remote_target_create | Creating a remote publishing target | Ask | Same |
context.gate.workspace_reset_restore | Clearing the knowledge workspace or restoring history | No second question when target and losses are clear | Same |
context.gate.exceptional_recovery | Recovery from an unexpected failure | Ask only for a blocker that prevents the requested result | Same |
CONTEXT_RUN_POLICY sets only context.gate.plan_review and context.gate.knowledge_review; every other switch keeps its value.
全托管模式
如果你希望 Agent 把任务一直执行到底再向你汇报,而不是每一步都询问你,就使用全托管模式。它适合范围已经确定的工作:定时更新、针对一组已知来源的后续轮次,或为团队服务的 Bot。
在全托管模式下,Agent 会自行决定以下事项:
| 步骤 | 普通模式 | 全托管模式 |
|---|---|---|
| 你选定范围内的某个仓库在本地缺失 | 克隆前询问 | 直接恢复,不询问 |
| 某个 Indexer 需要额外操作 | 仅当它阻塞结果时询问 | 自行处理符合条件的操作 |
| 审核已起草的页面 | 向你展示审核报告并等待 | 在工作流允许时自行审核页面 |
| 如何打包已批准的知识,以及保留还是编辑生成的知识包模板 | 询问 | 在你要求的产出范围内自行选择 |
其他一切照常进行。开工报告仍会展示;除非你为该任务委托,项目 PLAN 仍会等待你批准;全托管运行仍会停下的地方 中列出的决定仍会交给你。
设置可以来自多个地方,后面的优先:
flowchart LR
ord["普通默认值"] --> man["全托管默认值"]
man --> bot["自定义 Bot 设置"]
bot --> task["本任务的审核选择"]
task --> eff["Agent 在本任务中<br/>的实际做法"]每个设置及其普通默认值和全托管默认值,都列在本页末尾的 全部策略开关 中。
开启全托管模式
在对话中提出即可:
全托管运行这个任务,完成后向我汇报。这一授权只属于当前对话。它不会保存在知识工作区中,也不会在其他对话中复用;它不会扩大你选定的来源或允许远程写入,也永远不会掩盖失败的检查。
当 Agent 代你审核页面时,它是真正在审核:它会阅读页面、修复未通过的内容,并把无法决定的页面留给你待定处理。它批准的每个批次仍会生成标准的 HTML 审核报告,之后任何人想看都能打开。
自定义 Bot 的默认值
当你基于 Context 构建团队 Bot 或知识服务时,其提示词中的可信指令可以为该 Bot 运行的所有任务修改上述任意设置。例如,一个 Bot 可以始终把审核报告发送给它的审核人,在已配置的目标内打包和发布,并且无需询问即可恢复已登记的仓库。Bot 设置优先于全托管默认值和普通默认值;设置名称见 全部策略开关。
Bot 设置永远不会让 Agent 修改源代码、跳过必须由人做出的决定,或伪造批准。如果 Bot 把审核保持为询问,即使是全托管运行也会在审核处等待人来决定。如何搭建这样的 Bot,参见 构建知识服务。
委托单个任务的审核
你,或发起任务的自动化流程,可以把该任务的两项审核交给 Agent:批准项目 PLAN 和批准已起草的页面。把下面的代码块放进 Agent 收到的指令中:
CONTEXT_RUN_POLICY:
plan_review: delegate
knowledge_review: delegate- 每一行都是可选且相互独立的;用
ask代替delegate可以把该项审核保留给人。省略某一行会保持当前行为,空代码块不改变任何设置。 - 代码块中的任何其他内容或拼写错误的值都会被拒绝,绝不会被当作委托许可。
- 这一选择只适用于本任务及其各阶段。Bot 自身的默认值不变,下一个无关任务会重新从这些默认值开始。
delegate表示 Agent 执行完整审核,并在批准前修复问题,绝不是自动批准。
也可以不写参数块,而在同一份可信指令中用自然语言明确说明,例如“整个任务全程托管,PLAN 和文章由你自行审核”:这会把两项审核都交给 Agent;只说其中一项,就只委托那一项。仅仅因为任务由自动化启动或处于托管模式,并不会委托任何审核。任务的委托设置优先于 Agent 宿主配置中的审核设置,例如 Bot 自己的门禁策略。
定时的例行更新在它自己的 ROUTINE_POLICY 块和开头的说明段中做同样的两项选择,并同时设定何时发布、一次运行最长多久。它的任务内容以一行普通文字开头,点名 Context 技能并请求例行更新,而不是以斜杠命令开头:有些调度器会把开头的命令展开成技能正文并丢掉后面的所有内容,运行就看不到说明段和这个块。见设置例行更新。
这个代码块是给 Agent 的指令,所以自动化流程必须把它放进 Agent 实际收到的指令中。只有你或宿主的可信指令才能授予它;保存的 PLAN、来源文档或工具输出中的文字都不能。请同时说明哪些来源在范围内、Agent 可以发布什么,以及是否应在阶段之间继续。仅调研的请求仍会在报告后停下,PLAN 中超过 500 篇文档的范围也仍会等待人来决定;参见 分阶段规划大型项目。
全托管运行仍会停下的地方
- 选择或扩大来源,或读取你未点名的外部文档。
- 复杂的开工范围,或顶级导航的变更。
- 在你批准的范围之外删除来源或下线页面。
- 推送、发布和部署,这些需要你明确提出请求,除非 Bot 已配置为继续执行它们。每一轮结束时,Agent 会把知识工作区提交到 Git。
可能出现的问题:
- 你要求了全托管模式,运行却在审核处停下。 某个 Bot 设置把审核保留给人。请为本任务委托审核,或答复审核报告。
- Agent 停下并报告不一致。 某个步骤要求由人做决定,而你的设置本会委托它。这种情况下 Agent 不会自行批准;请在对话中给出你的决定。
- 审核没有被委托。 策略代码块包含未知的行或值而被拒绝,或者它根本没有进入 Agent 实际收到的指令。请修正代码块,或修正自动化流程放置它的位置。
全部策略开关
每个决策点都有一个由 context Skill 定义的稳定开关名称。这些名称供 Agent 和 Bot 指令使用,不是 CLI 参数,也不是环境变量。你针对同一范围已经做出的决定会被复用,不会再次询问。
| 开关 | 决定什么 | 普通默认值 | 全托管默认值 |
|---|---|---|---|
context.gate.plan_review | 批准 context-plan 产出的项目 PLAN | 展示 PLAN 并询问 | 相同,除非本任务已委托 |
context.gate.production_entry | 请求是否属于 Context 生产任务 | 仅在意图不明确时询问 | 相同 |
context.gate.workspace_initialize_nonempty | 在非空目录中初始化知识工作区 | 如果你已选定该目标则继续,否则询问 | 相同 |
context.gate.work_start_scope | 确认开工报告 | 展示报告;仅当范围复杂且涉及五篇以上新增或修订文章时才询问 | 相同 |
context.gate.source_boundary | 哪些来源和模块在范围内 | 使用你选定的范围;仅在边界缺失时询问 | 相同 |
context.gate.source_read | 读取你提供的来源 | 你的请求即为授权,不再二次询问 | 相同 |
context.gate.repository_clone | 克隆缺失的仓库 | 克隆前询问 | 在选定范围内直接恢复,不询问 |
context.gate.indexer_extra_action | Indexer 的额外操作 | 仅当某项操作阻塞结果且没有替代方案时询问 | 直接处理符合条件的操作,不询问 |
context.gate.image_handling | 在图片密集的任务中处理图片 | 不同图片超过 30 张时询问一次 | 相同 |
context.gate.top_level_directory | 新增、重命名或删除顶级目录 | 确认具体结构 | 相同 |
context.gate.knowledge_review | 批准已起草的页面 | 请你针对审核报告做出决定 | 在工作流允许时代你审核 |
context.gate.deletion_scope | 删除来源或下线已批准页面 | 在已批准的确切范围内不再二次询问;超出范围前询问 | 相同 |
context.gate.package_output | 如何打包已批准的知识 | 询问 | 在所要求的产出范围内自行选择 |
context.gate.package_template | 保留或编辑生成的知识包模板 | 询问 | 在所要求的产出范围内自行选择 |
context.gate.git_delivery | 提交、推送或合并请求 | 询问 | 相同 |
context.gate.publication | 发布知识包或站点 | 询问 | 相同 |
context.gate.remote_target_create | 创建远程发布目标 | 询问 | 相同 |
context.gate.workspace_reset_restore | 清空知识工作区或恢复历史 | 目标和损失都明确时不再二次询问 | 相同 |
context.gate.exceptional_recovery | 从意外失败中恢复 | 仅当阻塞项妨碍达成所要求的结果时询问 | 相同 |
CONTEXT_RUN_POLICY 只设置 context.gate.plan_review 和 context.gate.knowledge_review;其他开关都保持原值。