agently-runtime

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Agently Runtime

Agently 运行时

Use this Skill after the request or workflow owner is known. Use
agently-triggerflow
when branching, concurrency, pause/resume, retry, or multi-stage progression must remain visible in the execution graph. Use
agently-stage
only for process-local lifetime and sync/async bridging.
在请求或工作流所有者已明确后使用此 Skill。当分支、并发、暂停/恢复、重试或多阶段推进必须显式呈现在执行图中时,使用
agently-triggerflow
。仅在需要进程内生命周期及同步/异步桥接时使用
agently-stage
。

Read by Need

按需阅读

  • Execution selection, nested producers, run/rework/control, final validate, artifact/review, or declared Agent capabilities: agent-execution.md.
  • Callable Actions, Search/Browse, MCP/ACP, policy, artifacts, or AgentTask evidence: actions-runtime.md.
  • Action versus ExecutionResource, managed clients/sandboxes/processes/ browsers/databases, Shell/BashExecutor, PowerShell, offline/online/host profiles, approval, and streaming process I/O: actions-execution-resource.md.
  • auto_func
    , KeyWaiter,
    FastAPIHelper
    , SSE, or WebSocket exposure: helpers-and-services.md.
  • RuntimeEvent, logs, traces, evaluation, playground, or DevTools: devtools.md.
  • Evidence-backed reviewer comments, Coding Agent responses and rerun comparison: devtools-review.md. Requires DevTools 0.2; check the API capability before using its writeback steps.
  • TaskContext, ContextReader, SkillLibrary, and real-world Skill packages: context-and-skills.md.
  • 执行选择、嵌套 producer、运行/返工/控制、最终 validate、artifact/review,或声明的 Agent 能力: agent-execution.md。
  • 可调用的 Actions、Search/Browse、MCP/ACP、策略、artifacts 或 AgentTask 证据: actions-runtime.md。
  • Action 与 ExecutionResource 的区别、托管客户端/沙箱/进程/浏览器/数据库、Shell/BashExecutor、PowerShell、离线/在线/主机配置文件、审批和流式进程 I/O: actions-execution-resource.md。
  • auto_func
    、KeyWaiter、FastAPIHelper、SSE 或 WebSocket 暴露: helpers-and-services.md。
  • RuntimeEvent、日志、追踪、评估、playground 或 DevTools: devtools.md。
  • 有证据支撑的审查者评论、Coding Agent 响应及重跑对比: devtools-review.md。需要 DevTools 0.2;使用回写步骤前请检查 API 能力。
  • TaskContext、ContextReader、SkillLibrary 和实际使用的 Skill 包: context-and-skills.md。

Owner Boundaries

所有者边界

OwnerResponsibility
ActionRuntime
Model-callable operation schema, planning/dispatch, policy, and Action results.
ExecutionResource
Lifecycle of live clients, sandboxes, processes, browsers, databases, and MCP sessions.
TaskWorkspace
One task's contained files, generated artifacts, readback, identity, and promotion.
RecordStore
Durable records, links, retrieval, RuntimeEvents, checkpoints, snapshots, leases, and durable refs.
TaskContext
/
ContextReader
Task information bindings and consumer-bound progressive disclosure.
SkillLibrary
Installed immutable Skill revisions and resource reads; never execution permission.
AgentExecution
One run's replaceable producer, task-scoped bindings, context, control, terminal policies, result and streams.
Do not collapse these into a generic Workspace or runtime manager. File space is not record storage; records are not model-hot context; a Skill package is not an executor or permission grant.
所有者职责
ActionRuntime
模型可调用的操作 schema、规划/调度、策略和 Action 结果。
ExecutionResource
实时客户端、沙箱、进程、浏览器、数据库和 MCP 会话的生命周期。
TaskWorkspace
单个任务所含文件的容器、生成的 artifacts、回读、身份标识和提升。
RecordStore
持久记录、链接、检索、RuntimeEvent、检查点、快照、租约和持久引用。
TaskContext
/
ContextReader
任务信息绑定和面向消费者的渐进式披露。
SkillLibrary
已安装的不可变 Skill 修订版和资源读取;绝不提供执行权限。
AgentExecution
单次运行的可替换 producer、任务范围内的绑定、上下文、控制、终态策略、结果和流。
不要将这些职责合并为通用的 Workspace 或运行时管理器。文件空间不是记录存储;记录不是模型的热上下文;Skill 包不是执行器或权限授权。

Runtime Rules

运行时规则

  • Prefer
    @agent.action_func
    and
    agent.use_actions(...)
    . The
    tool_*
    and
    use_tool(s)
    names are compatibility surfaces.
  • Treat Action ids and model-planned arguments as untrusted. Validate schema, authorization, and policy before dispatch; require recorded Action evidence for claimed side effects.
  • Keep permission profiles explicit and narrow. Do not expose shell, network, browser, install, file-write, or MCP capabilities merely because an AgentTask exists.
  • Use TaskWorkspace for contained file work and verified artifact readback; use RecordStore for durable records and recovery. Keep large bodies cold behind refs until an explicit consumer reads them.
  • A real-world Skill supplies guidance and addressable resources. Actions, MCP, ExecutionResources, script authorization, and side-effect proof remain explicit host-owned bindings.
  • Use a fresh
    agent.create_execution()
    for multi-statement setup or an unrelated new request. A completed revision is immutable; explicit producer rework advances the same execution while old result readers retain their revision. See the execution contract above.
  • In 4.1.4.8, select
    request
    ,
    plan
    ,
    long_content
    , or
    long_task
    through
    create_execution(...)
    . Final
    .validate(handler)
    is a hard output gate;
    .review(..., on_fail="warn" | "block")
    is a soft assessment with an explicit terminal policy. Review does not silently rework; rework belongs to the producer.
    .artifact(...)
    requires verified TaskWorkspace readback.
  • Use
    agent.create_task(...)
    only when the model should own bounded planning, execution evidence, verification, and replan.
    create_task_loop(...)
    is a compatibility spelling, not the recommended surface. Stable application orchestration belongs to TriggerFlow.
  • Persist resource descriptors, never live clients or secrets. Reconstruct resources through their provider/resolver during recovery.
  • Bind RuntimeEvent persistence explicitly. Availability of a RecordStore does not turn every observation into a durable event archive.
  • Observation and transport are adapters: they must not become owners of routing, authorization, workflow lifecycle, semantic acceptance, or retry.
  • 优先使用
    @agent.action_func
    和
    agent.use_actions(...)
    。
    tool_*
    和
    use_tool(s)
    是兼容性接口。
  • 将 Action id 和模型规划的参数视为不受信任的输入。调度前验证 schema、授权和策略;对于声明已发生的副作用,要求提供已记录的 Action 证据。
  • 权限配置应明确且最小化。不要仅因为存在 AgentTask 就暴露 shell、网络、浏览器、安装、文件写入或 MCP 能力。
  • 使用 TaskWorkspace 进行容器化文件操作和已验证的 artifact 回读;使用 RecordStore 存储持久记录并支持恢复。在明确的消费者读取之前,将大体积正文保留在 refs 后,不主动加载。
  • 实际使用的 Skill 提供指导和可寻址资源。Actions、MCP、ExecutionResources、脚本授权和副作用证明仍须作为由宿主显式拥有的绑定。
  • 对于多语句设置或无关的新请求,使用新的
    agent.create_execution()
    。已完成的修订不可变;显式的 producer 返工会在同一 execution 中推进,而旧的结果读取器会保留其修订版本。请参阅上文的 execution 约定。
  • 在 4.1.4.8 中,通过
    create_execution(...)
    选择
    request
    、
    plan
    、
    long_content
    或
    long_task
    。最终的
    .validate(handler)
    是硬性输出门禁;
    .review(..., on_fail="warn" | "block")
    是带有明确终态策略的软性评估。Review 不会静默返工;返工由 producer 负责。
    .artifact(...)
    要求经过验证的 TaskWorkspace 回读。
  • 仅当模型应负责有边界的规划、执行证据、验证和重新规划时,才使用
    agent.create_task(...)
    。
    create_task_loop(...)
    是兼容性别名,并非推荐接口。稳定的应用编排属于 TriggerFlow。
  • 持久化资源描述符,绝不持久化实时客户端或密钥。恢复期间通过 provider/resolver 重建资源。
  • 显式绑定 RuntimeEvent 持久化。RecordStore 的可用性并不会让每次观测都自动成为持久事件归档。
  • 观测和传输是适配器:它们不得成为路由、授权、工作流生命周期、语义验收或重试的责任主体。

Fail Closed

失败即关闭(Fail Closed)

Reject unknown Skill revisions, resource refs, Action ids, selection keys, context block keys, recovery providers, and external-resume identities. Offer models one short host-issued selection key, validate it against the offered set, then reconstruct canonical records in host code.
Do not use keyword or regex matching as the semantic owner for intent, Skill relevance, route choice, evidence usefulness, or output quality. Do not fake model-owned success with canned outputs or deterministic business mappings.
拒绝未知的 Skill 修订版、资源 refs、Action ids、选择键、上下文块键、恢复 provider 和外部恢复身份。向模型提供一个由宿主签发的简短选择键,验证其属于所提供的集合,然后在宿主代码中重建规范记录。
不要将关键词或正则表达式匹配作为意图、Skill 相关性、路由选择、证据有效性或输出质量方面的语义判定依据。不要使用预置输出或确定性的业务映射来伪造由模型负责的成功。