跳到正文
cccskills
免费在 GitHub 公开中文介绍

agent-signal

此技能用于为智能体设计事件驱动的后台工作流,划分来源、信号、动作和策略的职责,并处理异步交接、去重、执行范围、完成记录与运行观测。

原文查看原文说明

Use for Agent Signal sources, actions, policies, middleware, workflow handoff and deduplication.

lobehub/lobehub星标 83,506(GitHub 83,506 + cccskills 0)

实测评分 未实测

查看安装方法

适用场景

  • 添加事件触发的后台任务
  • 将工作移出对话请求
  • 防止动作重复执行
  • 追踪处理完成情况

中文介绍

功能

此技能帮助你设计和实现智能体的事件驱动后台处理,使任务不必绑定在前台对话请求中。它说明如何划分 source、signal、action 和 policy:来源表示已发生的事实,信号表达其含义或路由,动作执行实际副作用,策略则将这些处理环节组合起来。你还可以据此选择立即执行或将任务放入队列,并处理重复请求去重、执行范围管理、完成记录,以及追踪和指标。

适用场景

在新建事件驱动的智能体流程,或为现有后台工作流添加事件、动作和策略时,可以使用此技能。若需要在异步处理结束后记录面向用户的结果,或追踪并调试执行情况,它也能提供实现指引。

使用示例

  • “请为这个事件添加后台处理流程,并遵循现有策略。”
  • “同一事件重复到达时,请避免动作重复执行。”
  • “请为这个异步流程添加完成通知和追踪信息。”

注意事项

实现时请参考 references/architecture.md 和 references/handlers.md,需要追踪、指标或调试时再查看 references/observability.md。原文以现有 Agent Signal 运行时、类型、处理器和测试环境为前提。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

文档检查

AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。

安全性发送数据、删除文件、执行命令等是否有说明
B部分不足资料涉及队列和副作用,但未说明操作前的确认步骤。
安装难易度所需工具和 API 密钥是否少且有说明
B部分不足资料以现有运行时和测试环境为前提,但没有安装步骤。

不计入评分。 由 AI(OpenAI Codex)于 2026年10月26日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(5)

  • SKILL.md6.5 KB
  • agents/openai.yaml280 B
  • references/architecture.md8.0 KB
  • references/handlers.md6.7 KB
  • references/observability.md4.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Agent Signal

Use this skill to implement event-driven background work for agents without coupling the work to the foreground chat request.

Agent Signal has one consistent runtime shape:

source event -> signal interpretation -> action execution -> built-in result signals

Durable self-iteration work has one extra completion branch:

memory/skill action -> execAgent enqueue -> agent.execution.completed -> selfIteration receipt projection

Start Here

  1. Read references/architecture.md to map the package boundary, runtime queue, scope model, and async workflow handoff.
  2. Read references/handlers.md before writing any new policy, source handler, signal handler, or action handler.
  3. Read references/observability.md when you need tracing, metrics, debugging, or workflow snapshot visibility.

Use The Right Entry Point

  • Use emitAgentSignalSourceEvent(...) when a server-owned producer should execute the pipeline immediately.
  • Use executeAgentSignalSourceEvent(...) when a worker or controlled backend path already owns execution timing and may inject a runtime guard backend.
  • Use enqueueAgentSignalSourceEvent(...) when the caller should return quickly and let Upstash Workflow process the event out-of-band.
  • Use emitAgentSignalSourceEventWithStore(...) for isolated tests or evals that should avoid ambient Redis state.

Read:

  • apps/server/src/services/agentSignal/index.ts
  • apps/server/src/workflows/agentSignal/index.ts
  • apps/server/src/workflows/agentSignal/run.ts

Core Model

  • source: A normalized fact that happened. Sources come from producers such as runtime lifecycle events, user messages, or bot ingress.
  • signal: A semantic interpretation derived from one source or from another signal. Signals express meaning, routing, or policy state.
  • action: A concrete side effect planned from one signal. Actions do the work.
  • policy: An installable middleware bundle that registers source, signal, and action handlers.
  • procedure: Not a distinct runtime node. Treat "procedure" as the end-to-end flow for one use case: ingress source, matching handlers, planned actions, execution result, and observability.

Keep the boundaries strict:

  • Add a new source when the outside world produced a new event.
  • Add a new signal when the system needs a reusable semantic interpretation.
  • Add a new action when the runtime needs a concrete side effect.
  • Add or update a policy when you are wiring those pieces together.

Implementation Workflow

  1. Decide whether the use case is synchronous or quiet background work.
  2. Define or reuse a source type in packages/agent-signal/src/source/sourceTypes.ts.
  3. Define or reuse signal and action types in apps/server/src/services/agentSignal/policies/types.ts.
  4. Implement handlers with defineSourceHandler, defineSignalHandler, or defineActionHandler.
  5. Add source normalization or hydration under apps/server/src/services/agentSignal/sources/** when the producer payload needs shaping.
  6. Bundle handlers with defineAgentSignalHandlers(...).
  7. Register the policy in apps/server/src/services/agentSignal/policies/index.ts and pass it into the runtime factory if needed.
  8. Add or update ingress code that emits or enqueues the source event.
  9. For async self-iteration writes, stamp an Agent Signal operation marker and project user-visible receipts from the completion path.
  10. Add observability and tests before considering the flow complete.

Default Reading Set

  • Shared semantic core: packages/agent-signal/src/index.ts packages/agent-signal/src/base/builders.ts packages/agent-signal/src/base/types.ts packages/agent-signal/src/source/sourceTypes.ts packages/agent-signal/src/source/sourceEvent.ts
  • Server-owned runtime and middleware: apps/server/src/services/agentSignal/runtime/AgentSignalRuntime.ts apps/server/src/services/agentSignal/runtime/AgentSignalScheduler.ts apps/server/src/services/agentSignal/runtime/middleware.ts apps/server/src/services/agentSignal/runtime/context.ts
  • Existing policy example: apps/server/src/services/agentSignal/policies/analyzeIntent/index.ts apps/server/src/services/agentSignal/policies/analyzeIntent/feedbackSatisfaction.ts apps/server/src/services/agentSignal/policies/analyzeIntent/feedbackDomain.ts apps/server/src/services/agentSignal/policies/analyzeIntent/feedbackAction.ts apps/server/src/services/agentSignal/policies/analyzeIntent/actions/userMemory.ts apps/server/src/services/agentSignal/policies/analyzeIntent/actions/skillManagement.ts apps/server/src/services/agentSignal/policies/analyzeIntent/completionSkillSynthesis.ts apps/server/src/services/agentSignal/policies/completionPolicy.ts apps/server/src/services/agentSignal/services/selfIteration/completion/buildSelfIterationReceipts.ts apps/server/src/services/agentSignal/services/selfIteration/completion/selfIterationCompletionHandler.ts
  • Observability: apps/server/src/services/agentSignal/observability/projector.ts apps/server/src/services/agentSignal/observability/traceEvents.ts packages/observability-otel/src/modules/agent-signal/index.ts

Implementation Rules

  • Reuse existing source, signal, and action types before adding new ones.
  • Keep source handlers focused on interpretation and fan-out, not heavy side effects.
  • Keep action handlers responsible for side effects, idempotency, and executor-style result reporting. For memory/skill self-iteration actions, the side effect is enqueueing execAgent; the durable write and receipt projection happen after completion.
  • Use stable ids and idempotency keys when the same source can arrive more than once.
  • Preserve scope discipline. The runtime uses scopeKey to serialize related background work.
  • Prefer the dedicated shared package types and builders from @lobechat/agent-signal for normalized nodes and result contracts.
  • Do not project memory or skill receipts from the enqueue action. Use agent.execution.completed + selfIteration finalState via createSelfIterationCompletionHandler(...).
  • Add focused tests near the touched runtime, policy, or store module. Existing tests under apps/server/src/services/agentSignal/**/__test__ and **/__tests__ are the reference pattern.

References

  • Architecture and boundaries: references/architecture.md
  • Writing handlers and policies: references/handlers.md
  • Observability, metrics, and debugging: references/observability.md

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

acceptance

免费有简介

通过实际操作产品验证交付内容,记录用户可查看的证据,并发布验收报告。可检查已有验证计划或创建检查项,选择合适的操作界面,并使用 `lh` CLI 发布结果。

  • 实际检查更改后的产品行为
  • 收集截图或其他验证证据
  • 编写验证计划和报告
lobehub/lobehub8.4万2026年10月26日 更新

add-model-provider

免费有简介

本技能指导在 LobeHub 中接入 AI 模型提供商,涵盖运行时、模型信息、设置、品牌展示、文档和验收,并帮助判断新增模型是否需要新的提供商集成。

  • 为 LobeHub 接入新的 AI 模型提供商
  • 更新提供商设置说明或介绍
  • 判断添加模型是否需要新的提供商集成
lobehub/lobehub8.4万2026年10月26日 更新

add-setting-env

免费有简介

本技能指导如何用服务器端环境变量设置用户偏好默认值,涵盖变量校验、服务器配置、写入用户状态,以及更新 `.env.example` 和自托管文档。

  • 通过环境变量设置用户偏好默认值
  • 将设置接入服务器配置和用户状态
  • 更新环境变量示例及文档
lobehub/lobehub8.4万2026年10月26日 更新

agent-runtime-hooks

免费有简介

说明如何在智能体执行步骤、工具调用、人工审批、上下文压缩和子智能体调用时注册钩子。钩子可观察事件、模拟本地工具结果,也可通过 Webhook 按配置策略允许或拒绝工具调用。

  • 记录智能体步骤和错误
  • 测试时模拟工具结果
  • 通过 Webhook 允许或拒绝工具调用
lobehub/lobehub8.4万2026年10月26日 更新

agent-testing-bot

免费有简介

本技能在 macOS 桌面聊天应用中测试机器人频道:打开应用、进入频道或联系人、发送消息、等待回复并截图。支持 Discord、Slack、Telegram、微信、飞书和 QQ;iMessage 使用 BlueBubbles 桥接。

  • 检查真实 Discord 频道中的机器人回复
  • 测试 Slack 或 Telegram 的对话流程
  • 记录 macOS 应用中的操作结果
lobehub/lobehub8.4万2026年10月26日 更新

agent-tracing

免费有简介

按操作编号检查智能体运行记录,查看失败的工具调用、参数与结果、运行上下文及传给大语言模型的内容;还可查看上下文映射,并用其他模型重放记录以便比较。

  • 排查失败的工具调用
  • 确认传给大语言模型的上下文
  • 按操作追踪工具及结果
lobehub/lobehub8.4万2026年10月26日 更新

查看 lobehub 的全部技能

报告此技能的问题