{"slug": "show-hn-autonomy-self-harness-self-directed-ai-agent-core-under-development", "title": "Show HN: Autonomy – Self-Harness/Self-Directed AI Agent Core Under Development", "summary": "Autonomy, a self-directed AI agent core, has been released as an open-source project on Hacker News. The system features an autonomous task loop that selects tools, executes actions, and learns from outcomes without human intervention, with built-in safety gates and a learning mechanism that automatically creates new skills. The project includes a terminal UI, supports multiple LLM providers, and is designed for extensibility with a catalog of tools and skills.", "body_md": "### 自導向代理人迴圈\n\n`AgentLoop.run(goal, max_steps=12)`\n\n啟動後完全自主執行，每步驟透過 `run_turn()`\n\n推進。支援互動模式（`interactive=True`\n\n）與批次模式，所有事件均以\n`run_id`\n\n記錄於 `AutonomyStore`\n\n。\n\n每個執行回合（Turn）依固定五步驟推進，直到目標達成、被封鎖或超過步數上限\n\nAgentLoop 是 Autonomy 的核心驅動器——一個「自導向任務迴圈」，不需要人工介入即可從目標出發，自主選擇工具、執行行動並從結果中學習。\n\n每個 Turn 的執行流程：①從技能庫選取相關 `ProcedureSkill`\n\n，②由 LLM 提案 + RecipeEngine 產出候選動作路徑，③以 5 維評分排序（Beam\nWidth=3），④透過 `ActionGateway`\n\n受管執行，⑤評估結果並觸發學習。\n\n終止條件明確：`ACHIEVED`\n\n（目標完成）、`BLOCKED`\n\n（無法繼續）、`NO_CANDIDATES`\n\n、`APPROVAL_DENIED`\n\n、`MAX_STEPS_REACHED`\n\n、或\n`FAILED`\n\n——系統永遠不會陷入無限循環。\n\n每個特點都直接對應 Autonomy 原始碼中的具體實作\n\n`AgentLoop.run(goal, max_steps=12)`\n\n啟動後完全自主執行，每步驟透過 `run_turn()`\n\n推進。支援互動模式（`interactive=True`\n\n）與批次模式，所有事件均以\n`run_id`\n\n記錄於 `AutonomyStore`\n\n。\n\n所有工具呼叫必須通過 `ActionGateway`\n\n的\n`ApprovalPolicy`\n\n授權。每個動作帶有 `RiskLevel`\n\n（LOW / MEDIUM /\nHIGH）、`expected_effect`\n\n與 `verification_plan`\n\n，確保執行可控、可審計。\n\n`CandidateSelector`\n\n以\nevidence_strength（+0.30）、purpose（+0.10）、risk（−0.35）、side_effects（−0.20）、penalty（−1.0）五個維度計算總分，選出前\n`beam_width=3`\n\n名候選路徑送往執行。\n\n`DeterministicOutcomeEvaluator`\n\n優先判斷執行失敗（直接\nBLOCKED），成功但結果不確定時再交由 `ModelAssistedOutcomeEvaluator`\n\n呼叫 LLM 語義判斷——最小化昂貴的模型呼叫次數。\n\n`ProcedureSkillLibrary`\n\n內建 13 個 bundled\nskills，涵蓋\napi-debugging、browser-navigation、code-editing、codebase-documentation、plan、procedure-skill-authoring、process-management、requesting-code-review、systematic-debugging、technical-spike、TDD、website-inspection、writing-plans，每步動態選取最相關技能載入。\n\n每次 Run 結束後，`LearningLoop.review_run()`\n\n自動觸發：若結果為 ACHIEVED 且有 ≥2 個成功步驟，自動起草新 `ProcedureSkillDraft`\n\n（信心度 0.85），生成\n`LearningProposal`\n\n等待審核。\n\n`RecipeEngine`\n\n監控每個成功動作的 SHA-256\n指紋——當同一動作成功次數 ≥ `candidate_threshold=2`\n\n，自動升格為候選\nRecipe，下次直接作為行動選項（source=`action_skill`\n\n）提出，無需 LLM 重新推理。\n\n每次 Run 結束後，`CuratorDaemon`\n\n在後台執行緒（`daemon=True`\n\n）非同步啟動 `SkillCurator.apply_auto_merges()`\n\n，自動偵測並合併重複（信心 0.95）或子集（信心\n0.90）技能，防止技能庫膨脹。\n\n`TOOLSET_CATALOG`\n\n涵蓋 4\n個預設啟用工具集：file、terminal、search、skills，加上 opt-in 的 project（git / JSON / YAML / 測試探索）與 browser（Playwright\nheadless Chromium，11 工具）。規劃中：memory、delegate、cronjob、computer_use。\n\n`AutonomyStore`\n\n以 Event Sourcing\n模式記錄整個執行生命週期：run_started → skills_selected → candidates_ranked → action_selected → approval_decision →\nobservation → outcome_evaluated → recipe_learned → learning_review → run_finished，完整可重播。\n\n`autonomy tui`\n\n啟動豐富終端介面，提供 session\n總覽面板、回合記錄、Action trail、compact/full 切換模式與 `/`\n\n指令面板。自然語言直接流入 `AgentLoop`\n\n，UI 永遠不直接執行工具。\n\n支援 `ollama`\n\n（本地）與 8 個 OpenAI-compatible\nproviders：openai-api、nvidia、openrouter、deepseek、xai、zai、kimi-coding、alibaba。提供 API 金鑰管理與 provider\n設定，`autonomy doctor`\n\n可檢查端點走通性。\n\n每個候選動作路徑依以下公式計算總分，選出前 3 名送往執行\n\n每個方塊對應 Autonomy 原始碼中的實際類別或模組\n\n每個技能以 SKILL.md 格式定義，包含名稱、描述、所需工具與平台篩選\n\n每次執行 Turn 時，`model.select_procedure_skills()`\n\n依可用工具名稱動態篩選並載入最相關技能；執行成功且達到門檻後，`LearningLoop`\n\n將自動起草新技能並生成 `LearningProposal`\n\n（CANDIDATE\n狀態）。\n\n以下事件序列直接對應 AutonomyStore.record_event() 的實際呼叫順序", "url": "https://wpnews.pro/news/show-hn-autonomy-self-harness-self-directed-ai-agent-core-under-development", "canonical_source": "https://autonomy-landing-page.vercel.app/", "published_at": "2026-06-20 06:31:40+00:00", "updated_at": "2026-06-20 07:06:57.279636+00:00", "lang": "en", "topics": ["ai-agents", "large-language-models", "ai-tools", "ai-research", "developer-tools"], "entities": ["Autonomy", "AgentLoop", "ActionGateway", "ProcedureSkillLibrary", "AutonomyStore", "RecipeEngine", "LearningLoop", "CuratorDaemon"], "alternates": {"html": "https://wpnews.pro/news/show-hn-autonomy-self-harness-self-directed-ai-agent-core-under-development", "markdown": "https://wpnews.pro/news/show-hn-autonomy-self-harness-self-directed-ai-agent-core-under-development.md", "text": "https://wpnews.pro/news/show-hn-autonomy-self-harness-self-directed-ai-agent-core-under-development.txt", "jsonld": "https://wpnews.pro/news/show-hn-autonomy-self-harness-self-directed-ai-agent-core-under-development.jsonld"}}