agentic-os
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAgentic OS
Agentic OS
This skill establishes a framework-agnostic Agentic Operating System layer in a project workspace. It enables Claude, Gemini, and Antigravity to share persistent operational memory, coordinate via task queues, and continuously improve through structured feedback loops.
本技能可在项目工作区中建立一个框架无关的Agentic操作系统层,支持Claude、Gemini和Antigravity共享持久化运行内存,通过任务队列协同工作,并通过结构化反馈循环持续优化性能。
The Core Concept
核心概念
An Agentic OS solves the "blank slate" problem. Without it, every agent session starts fresh, requiring manual context loading and repeating past mistakes. By centralizing state and learnings into an directory, any agent runtime can pick up exactly where the last one left off and apply compounded knowledge.
.agent/Agentic OS解决了“空白 slate”问题。没有该系统时,每个Agent会话都从零开始,需要手动加载上下文,还会重复过去的错误。通过将状态和学习内容集中存储在目录下,任何Agent运行时都能精准接续上一次的工作进度,并运用累积的知识。
.agent/Initialization
初始化
To set up the Agentic OS scaffolding in a new project, run:
bash
bash ~/.agents/skills/agentic-os/scripts/init-os.shThis creates the following structure at the root of the project:
.agent/
├── state/
│ ├── last-run.json # Global log of the last agent actions
│ ├── tasks.json # Shared queue of pending/completed tasks
│ ├── errors.json # Log of unresolved task failures
│ └── status.md # Output of the command-center skill
├── learnings/ # Per-skill feedback loops
│ └── template.json
└── evals/ # Per-skill evaluation criteria
└── template.json要在新项目中搭建Agentic OS脚手架,运行以下命令:
bash
bash ~/.agents/skills/agentic-os/scripts/init-os.sh这会在项目根目录创建以下结构:
.agent/
├── state/
│ ├── last-run.json # 全局记录最近一次Agent操作
│ ├── tasks.json # 待处理/已完成任务的共享队列
│ ├── errors.json # 未解决任务失败日志
│ └── status.md # command-center技能的输出内容
├── learnings/ # 各技能的反馈循环
│ └── template.json
└── evals/ # 各技能的评估标准
└── template.jsonAgent Directives
Agent操作指引
Whenever you operate in a project that has an directory, you MUST adhere to the following workflow:
.agent/当你在带有目录的项目中工作时,必须遵循以下工作流程:
.agent/1. Pre-Task: Load State & Learnings
1. 任务前:加载状态与学习内容
Before executing a specialized task or skill:
- Read State: Check to understand what was recently completed. Check
.agent/state/last-run.jsonif you need to pull a task from the queue..agent/state/tasks.json - Read Learnings: If you are about to perform a specific skill (e.g., ), check if
write-draftexists. If it does, read it and explicitly apply its.agent/learnings/write-draft.jsonentries to your approach.rule_change - Read Evals: Check if exists to understand the definition of "done".
.agent/evals/<skill>.json
在执行特定任务或技能前:
- 读取状态:查看以了解最近完成的工作。若需从队列中获取任务,查看
.agent/state/last-run.json。.agent/state/tasks.json - 读取学习内容:如果你即将执行某个特定技能(如),检查是否存在
write-draft。若存在,读取该文件并将其中的.agent/learnings/write-draft.json条目明确应用到你的操作方法中。rule_change - 读取评估标准:检查是否存在,以明确“完成”的定义。
.agent/evals/<skill>.json
2. Execution & Evaluation (The Learnings Loop)
2. 执行与评估(学习循环)
After generating your output but before finalizing:
- If an exists for your task, grade your own output against its criteria. (Use
eval.json)python3 ~/.agents/skills/agentic-os/scripts/eval.py list --skill <skill> - If you fail any criteria, revise your output.
- Once you pass, log your verification using
python3 ~/.agents/skills/agentic-os/scripts/eval.py verify --skill <skill> --task-id <id> --notes "..." - Consider what worked well and what didn't during generation.
生成输出后但在最终确定前:
- 如果你的任务存在对应的,对照其标准给自己的输出评分。(使用命令
eval.json)python3 ~/.agents/skills/agentic-os/scripts/eval.py list --skill <skill> - 若未达到任何标准,修改你的输出。
- 通过评估后,使用命令记录你的验证结果。
python3 ~/.agents/skills/agentic-os/scripts/eval.py verify --skill <skill> --task-id <id> --notes "..." - 思考生成过程中哪些方法有效,哪些无效。
3. Post-Task: Write State & Learnings
3. 任务后:写入状态与学习内容
Before you conclude your session or step:
- Update Learnings: If you learned something new about how to do this task better in this specific project, use to record it.
python3 ~/.agents/skills/agentic-os/scripts/learn.py add --skill <skill> --worked "..." --didnt "..." --rule "..." - Update State: Overwrite with a summary of what you just did, what decisions you made, and what needs to happen next.
.agent/state/last-run.json - Update Queue: If you completed a task from , mark its status as
tasks.json.completed
在结束会话或步骤前:
- 更新学习内容:如果你学到了在该特定项目中更好完成此任务的新方法,使用命令进行记录。
python3 ~/.agents/skills/agentic-os/scripts/learn.py add --skill <skill> --worked "..." --didnt "..." --rule "..." - 更新状态:用你刚完成的工作内容、做出的决策以及下一步计划覆盖。
.agent/state/last-run.json - 更新队列:如果你完成了中的某个任务,将其状态标记为
tasks.json。completed
Data Schemas
数据架构
last-run.json
last-run.jsonlast-run.json
last-run.jsonUsed for operational continuity.
json
{
"timestamp": "2026-04-25T12:00:00Z",
"task_id": "task-123",
"status": "completed",
"description": "Built the new Hero component.",
"assigned_skill": "build-component",
"project_id": "generic-service",
"agent_id": "antigravity",
"user_id": "matthias",
"outcome": {
"result": "Success"
},
"trace_id": "req-12345",
"decision_log": "Used standard Tailwind utility classes instead of custom CSS for faster rendering"
}用于保证运行连续性。
json
{
"timestamp": "2026-04-25T12:00:00Z",
"task_id": "task-123",
"status": "completed",
"description": "Built the new Hero component.",
"assigned_skill": "build-component",
"project_id": "generic-service",
"agent_id": "antigravity",
"user_id": "matthias",
"outcome": {
"result": "Success"
},
"trace_id": "req-12345",
"decision_log": "Used standard Tailwind utility classes instead of custom CSS for faster rendering"
}errors.json
errors.jsonerrors.json
errors.jsonUsed by the skill to track unresolved failures.
command-centerjson
[
{
"timestamp": "2026-04-25T12:05:00Z",
"task_id": "task-124",
"assigned_skill": "osint",
"reason": "Target API returned 429 Too Many Requests after 3 retries",
"trace_id": "req-12346",
"decision_log": "Attempted to backoff but exceeded max wait time.",
"resolved": false
}
]供技能追踪未解决的失败任务。
command-centerjson
[
{
"timestamp": "2026-04-25T12:05:00Z",
"task_id": "task-124",
"assigned_skill": "osint",
"reason": "Target API returned 429 Too Many Requests after 3 retries",
"trace_id": "req-12346",
"decision_log": "Attempted to backoff but exceeded max wait time.",
"resolved": false
}
]learnings.json
(per skill)
learnings.jsonlearnings.json
(按技能分类)
learnings.jsonUsed to permanently correct agent behavior without modifying the base skill prompt.
json
{
"skill": "build-component",
"history": [
{
"date": "2026-04-21",
"what_worked": "Extracting the SVG into a separate file kept the component clean.",
"what_didnt": "Trying to use Next.js Image for inline SVGs caused layout shifts.",
"rule_change": "Always put complex SVGs in a separate .tsx file and import as a React component. Do not use next/image for vectors."
}
]
}用于永久修正Agent行为,无需修改基础技能提示词。
json
{
"skill": "build-component",
"history": [
{
"date": "2026-04-21",
"what_worked": "Extracting the SVG into a separate file kept the component clean.",
"what_didnt": "Trying to use Next.js Image for inline SVGs caused layout shifts.",
"rule_change": "Always put complex SVGs in a separate .tsx file and import as a React component. Do not use next/image for vectors."
}
]
}eval.json
(per skill)
eval.jsoneval.json
(按技能分类)
eval.jsonUsed to define rigid quality gates.
json
{
"skill": "build-component",
"criteria": [
"Component must be responsive down to 320px",
"Must not use inline styles",
"Must be exported as a default export"
]
}用于定义严格的质量门槛。
json
{
"skill": "build-component",
"criteria": [
"Component must be responsive down to 320px",
"Must not use inline styles",
"Must be exported as a default export"
]
}