mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-07-09 17:08:29 +00:00
Add protocol prompt area before history
Introduce a new prompt "protocol" separate from extras: add LoopData.protocol_temporary and protocol_persistent, include protocol contents before message history during prompt construction, and clear temporary protocol data each turn. Add helper _build_context_message to render protocol/extras, update response input conversion to include protocol, and move project instructions & active/loaded skills injection into protocol. Update docs, prompts, plugin metadata, the SkillsTool message, and add tests to verify protocol placement and behavior.
This commit is contained in:
parent
bf2741990a
commit
afdc3aeb44
24 changed files with 236 additions and 53 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Purpose
|
||||
|
||||
- Own active and hidden skill configuration injected into prompt extras on each turn.
|
||||
- Own active and hidden skill configuration injected into prompt protocol on each turn.
|
||||
|
||||
## Ownership
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Skills is a built-in Agent Zero plugin that manages active skills across scope d
|
|||
|
||||
- pins default skills for the current plugin scope
|
||||
- hides noisy skills from the model-facing available catalog, skill search, and load access
|
||||
- injects the effective active skills into prompt extras on every turn
|
||||
- injects the effective active skills into prompt protocol on every turn
|
||||
- extends the same config screen with a current-chat mode so users can activate or hide skills live per conversation
|
||||
- supports global and project scoped configurations without agent-profile variants
|
||||
- links directly to the built-in Skills list
|
||||
|
|
@ -21,7 +21,7 @@ The shared active-skill state and prompt-resolution logic live in `helpers/skill
|
|||
|
||||
## Notes
|
||||
|
||||
- keep the active list short because every active skill is injected into prompt extras every turn
|
||||
- keep the active list short because every active skill is injected into prompt protocol every turn
|
||||
- the default cap is 20 active skills, and it can be raised or lowered in Skills plugin config
|
||||
- hidden skills are not capped because they are stored as control data, not injected into the prompt
|
||||
- selected skills are stored in normalized `/a0/...` form so configs stay portable across development and Docker-style layouts
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@ class IncludeActiveSkills(Extension):
|
|||
if not self.agent:
|
||||
return
|
||||
|
||||
extras = loop_data.extras_persistent
|
||||
extras.pop("active_skills", None)
|
||||
protocol = loop_data.protocol_persistent
|
||||
protocol.pop("active_skills", None)
|
||||
|
||||
content = skills.build_active_skills_prompt(self.agent)
|
||||
if not content:
|
||||
return
|
||||
|
||||
extras["active_skills"] = self.agent.read_prompt(
|
||||
protocol["active_skills"] = self.agent.read_prompt(
|
||||
"agent.system.active_skills.md",
|
||||
skills=content,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
name: _skills
|
||||
title: Skills
|
||||
description: Pin skills into prompt extras on every turn.
|
||||
description: Pin skills into prompt protocol on every turn.
|
||||
version: 1.0.0
|
||||
always_enabled: true
|
||||
settings_sections:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue