bigcyy commented on issue #4007:
URL: https://github.com/apache/hertzbeat/issues/4007#issuecomment-4238357052
## Background
In `hertzbeat-ai`, the current "SOP Skill" concept is closer to an
executable workflow/runbook than to an Agent Skill
in the prompt-engineering sense.
Agent Skills are usually prompt/context capabilities: they guide the model
on how to use existing tools and can be
progressively disclosed only when relevant. The current HertzBeat SOP
Skills, however, are YAML-defined backend
workflows with parameters, output configuration, and executable steps
(`tool` / `llm`). They can be selected by the
model, but should be executed by the backend workflow engine.
This creates some conceptual ambiguity:
- "Skill" is overloaded between prompt-level Agent Skills and backend
executable SOP workflows.
- SOP workflows are currently surfaced in the system prompt as a skill
list.
- Execution depends on the generic `executeSkill(skillName, paramsJson)`
tool.
- There is already a partial direction toward exposing SOPs as tools via
`SkillRegistry implements
ToolCallbackProvider` and `SopToolCallback`, but `SopToolCallback.call()`
does not execute the workflow yet and the
registry is not wired into the main chat tool provider.
## Current Behavior
Current flow:
1. YAML SOP definitions live under
`hertzbeat-ai/src/main/resources/skills/*.yml`.
2. `SkillRegistry` loads them into memory.
3. `ChatClientProviderServiceImpl` injects a summarized SOP skill list
into the system prompt via
`{dynamically_injected_skills_list}`.
4. The model calls `executeSkill(skillName, paramsJson)`.
5. `SkillToolsImpl` finds the SOP definition and calls
`SopEngine.executeSync(...)`.
6. `SopEngine` executes the YAML steps.
This works, but it makes SOP workflows look like prompt-level skills,
while they are actually executable backend
workflows.
## Proposal
Rename and restructure SOP Skills as **Workflow Tools**.
Conceptually separate:
- **Agent Skills**: prompt-level, progressively disclosed instructions or
capability packs.
- **HB Tools**: atomic HertzBeat tools such as `query_monitors`,
`query_realtime_metrics`, `create_alert_rule`.
- **Workflow Tools**: YAML-defined executable workflows/runbooks such as
daily inspection or MySQL slow query
diagnosis.
Suggested tool groups:
```text
agentTools
├── hbTools
│ ├── query_monitors
│ ├── add_monitor
│ ├── query_realtime_metrics
│ ├── create_alert_rule
│ └── ...
│
└── workflowTools
├── workflow_daily_inspection
├── workflow_mysql_slow_query_diagnosis
└── ...
Each YAML workflow should become a dynamic structured tool with:
- tool name, preferably prefixed, e.g. workflow_daily_inspection
- description from the YAML workflow description
- input schema generated from YAML parameters
- execution delegated to SopEngine.executeSync(...)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]