Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ edition_ee ──► core / features (CE 派生树中不

| 子包 | 职责 |
|---|---|
| `agent_runtime/` | 一次普通智能体回合:`runner.astream_chat_workflow` 选主智能体 / 直连路径;`prepare_*`(建 agent、组装输入)、`stream_*`(模型与工具事件 → 既有事件协议)、`*_state`(单轮有类型状态)、`integrations/`(记忆、压缩、本体证据/修复、演化) |
| `agent_runtime/` | 一次普通智能体回合:`runner.astream_chat_workflow` 选主智能体 / 直连路径;`prepare_*`(建 agent、组装输入)、`stream_*`(模型与工具事件 → 既有事件协议)、`*_state`(单轮有类型状态)、`integrations/`(记忆、压缩、演化) |
| `runs/` | 持久化执行所有权:租约 / 心跳、取消、事件日志与续播(`events/`)、看门狗、工具副作用账本(`tool_effects/`)、恢复 |
| `chat/` | 会话与消息读写、模式(modes)、分叉、引用、追问、压缩;`runtime/`(聊天 worker:消费回合事件、在 runs 租约下持久化输出、排队 / 插话 / 暂停 / 恢复);`operations/`、`projection/` |
| `llm/` | AgentScope 适配与智能体装配:`factory/`(build / assembly / tools / prompts)、`runtime/`(流式循环、钩子适配、工具执行、人机交互)、`citations/`(锚点发号)、`mcp/`、`subagents/`、`tools/`、`tool_permissions/`、提示词版本池 |
Expand All @@ -48,7 +48,6 @@ edition_ee ──► core / features (CE 派生树中不
| `files/` | 产物(artifacts)、内容解析(content)、空间文件(spaces)、存储协议(storage:local / s3 / oss) |
| `projects/` | 项目、项目环境、指令、本地工作区、个人项目作用域 |
| `memory/` | 分层记忆(L1 画像 / L2 向量 / L3 图谱)、抽取流水线、outbox、脱敏、TTL |
| `ontology/` | 本体治理:schema、校验、运行时闸门、输出评审、修订 |
| `evolution/` | 协同进化共享契约与证据(控制面在 EE) |
| `jobs/` | 后台作业运行时(作业 SDK、监督、通知、文件) |
| `sandbox/` | 沙箱协议 / 工厂 / providers(script_runner、opensandbox、cube[EE])、runner 进程服务、进程 / 会话 / 工作区 / 权限 / OS 隔离 |
Expand Down Expand Up @@ -118,7 +117,7 @@ POST /v1/agents/responses api/routes/v1/agent_responses.py
→ core/llm/factory/build.py AgentScope agent:模型选择、工具集、MCP(core/llm/mcp)、技能、提示词
→ stream_main / stream_direct 模型与工具事件 → 事件协议(core/llm/runtime/streaming.py、stream_events.py)
→ core/llm/citations/ 引用锚点发号(e1/e2…)
→ 结束后:本体评审、记忆 / 演化结算、追问(core/chat/runtime/followups.py)
→ 结束后:记忆 / 演化结算、追问(core/chat/runtime/followups.py)
→ SSE 输出 api/transports/run_sse.py(跟随事件日志;续播 GET /v1/chats/stream/{run_id}/subscription)
```

Expand Down Expand Up @@ -150,7 +149,7 @@ POST /v1/agents/responses api/routes/v1/agent_responses.py
|---|---|
| 应用组装 | `api/app.py`、`api/lifecycle.py`、`api/startup/` |
| 路由注册表 | `api/routes/v1/__init__.py`(CE)、`edition_ee/routes/registry.py`(EE)、`core/harness/registry`(模块路由) |
| 依赖注入 | `api/deps.py`(require_admin / require_config / require_admin_or_config / require_system_settings / require_ontology_governance / require_super_admin / console_actor) |
| 依赖注入 | `api/deps.py`(require_admin / require_config / require_admin_or_config / require_system_settings / require_super_admin / console_actor) |
| 认证 | `core/auth/backend.py`(get_current_user / UserContext)、`core/auth/bearer.py` |
| DB | `core/db/engine.py`(get_db)、`core/db/threads.py`、`core/db/models/`、`core/db/repository/` |
| 信封 / 异常 | `core/infra/responses.py`、`core/infra/exceptions.py`、`api/middleware/error_handler.py` |
Expand Down
3 changes: 1 addition & 2 deletions .claude/skills/hugagent-frontend-dev/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ src/frontend/src/
│ ├── useStreaming.ts # SSE 流式处理、文件上传、发送逻辑、断线续播
│ ├── usePlanMode.ts # Plan 模式
│ ├── usePageConfig.ts # 页面配置
│ ├── useDelayedFlag.ts # 延迟标志位
│ └── useStallDetector.ts # 流式停滞检测
│ └── useDelayedFlag.ts # 延迟标志位
│
├── stores/ # 18 个 Zustand Store
│ ├── authStore.ts # 认证状态
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ data: [DONE] # 流终止
|---|---|
| `content`(别名 `ai_message` / `text` / `delta`) | 取 `delta || content || text` 追加;内嵌 `<think>` 的模型由 parseBuffer 拆出思考 |
| `thinking`(别名 `thought`) | 带 `delta` 时按增量追加到最近的 thinking 段,并标记 structuredReasoning |
| `content_replace` | **整体替换**当前正文(本体治理重写答案) |
| `content_replace` | **整体替换**当前正文 |

## 工具

Expand Down Expand Up @@ -93,11 +93,6 @@ data: [DONE] # 流终止
- Plan 模式(`plan_step_*` / `plan_complete` 等)与自主循环(`loop_*`)事件经 `ChatStreamOptions.onEvent` 钩子交给
`usePlanMode` / `useLoopMode` 先处理,钩子返回 true 则不再进通用 reducer。

## 本体治理

`ontology_activation` / `ontology_gate` / `ontology_review` / `ontology_repair` / `ontology_revision` /
`ontology_revision_thinking`;`scope === 'ontology_revision'` 的工具事件单独分流(重写结果经 `content_replace` 落地)。

## 已退役(不要再处理或产出)

- `batch_confirm`(批量执行已退役)
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ body:
- Knowledge base & RAG / 知识库
- Memory / 记忆
- Sandbox execution / 沙箱执行
- Ontology & governance / 本体与治理
- Deployment / 部署
- Frontend / UI
- Documentation / 文档
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ docker/dbhub/dbhub.toml
docker/dbhub/es.env

license-keys/
deploy_kit/
deploy_kit/*
!deploy_kit/kubernetes/
deploy_kit/kubernetes/*
!deploy_kit/kubernetes/space_mounts.py
!deploy_kit/kubernetes/patch_upstream.py
node_modules/

# 建站模板必须完整入库(覆盖上面的 lib/ 与 AGENTS.md 规则),但依赖树除外
Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ quietly learn the wrong things.
- **Dreaming for Personal Agent**: a daily job consolidates logs into `MEMORY.md` /
`USER.md`, with `DREAMS.md` recording sources, deduplication and conflicts; only what
you explicitly asked it to remember is promoted automatically.
- **Traceable ontology evolution**: approvals, rejections, evidence and outcomes are
recorded and organized into versioned ontology proposals that apply after human review.

## 🧰 More harness capabilities

Expand All @@ -205,7 +203,6 @@ quietly learn the wrong things.
| 🔧 **MCP, Skills and plugins** | Built-in web search, page fetching, knowledge retrieval, charts and automation tools; an MCP marketplace, private MCP servers, Agent Skills and plugins |
| 🧪 **Sandbox and artifacts** | Run code in OpenSandbox or a local subprocess sandbox, producing charts, reports, Office files, web pages and data canvases |
| 📚 **Private knowledge-base RAG** | Document chunking, hybrid vector and keyword retrieval, optional reranking |
| 🛡️ **Optional ontology control plane** | With a Domain Pack, deterministic rule checks run before tool execution and high-risk answers are reviewed by an independent reviewer or committee; switched off, the original flow is unchanged |
| 🔌 **Replaceable models** | Connect cloud or local OpenAI-compatible models through one model service; reviewer, planner, memory and other roles can each use their own model |

## Quick start
Expand Down Expand Up @@ -267,7 +264,7 @@ troubleshooting.
## Architecture

HugAgentOS separates user channels, agent workflows, reusable capability engines,
ontology contracts, data governance, and infrastructure into clear layers. Durable
data governance, and infrastructure into clear layers. Durable
runs, leases and recovery run through the execution path, while security and
platform governance span the complete stack.

Expand Down Expand Up @@ -327,7 +324,6 @@ feature boundary and upgrade path.
| Memory and self-evolution | [Memory](./document/en/modules/memory.md) | [记忆系统](./document/zh-CN/modules/memory.md) |
| Configure a deployment | [Deployment](./document/en/deployment/README.md) | [部署指南](./document/zh-CN/deployment/README.md) |
| Explore the system design | [Architecture](./document/en/architecture/overview.md) | [架构总览](./document/zh-CN/architecture/overview.md) |
| The ontology control plane | [Domain ontology quickstart](./document/en/getting-started/domain-ontology-quickstart.md) | [快速构建领域本体](./document/zh-CN/getting-started/domain-ontology-quickstart.md) |
| Build backend or frontend features | [Development](./document/en/README.md#development) | [开发指南](./document/zh-CN/README.md#开发指南) |

Start from [document/README.md](./document/README.md) to browse every guide.
Expand Down
5 changes: 1 addition & 4 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ HugAgentOS 不让智能体每次从零开始,也不让它「悄悄学坏」。
- **逐条审批、可回滚**:记忆与技能的进化建议以卡片形式出现,经你确认才生效,可随时关闭。
- **Personal Agent 的 Dreaming**:每天定时把日志整理为 `MEMORY.md` / `USER.md` 的更新,
`DREAMS.md` 记录来源、去重与冲突;只自动提升你明确说「记住」的内容。
- **可溯的本体进化**:审批、驳回、证据与执行结果留痕,整理为版本化的本体建议,人工审核后生效。

## 🧰 更多 Harness 能力

Expand All @@ -179,7 +178,6 @@ HugAgentOS 不让智能体每次从零开始,也不让它「悄悄学坏」。
| 🔧 **MCP · Skills · 插件** | 内置联网搜索、网页抓取、知识检索、图表、自动化等工具;MCP 市场、私有 MCP、Agent Skills 与插件 |
| 🧪 **沙箱与产物** | OpenSandbox 或子进程沙箱执行代码,产出图表、报告、Office 文件、网页与数据画布 |
| 📚 **私有知识库 RAG** | 文档分块,向量与关键词混合检索,可选重排 |
| 🛡️ **可选的本体控制平面** | 导入 Domain Pack 后,工具执行前做确定性规则检查,高风险答案由独立评审员或委员会复核;关闭时完全不改变原流程 |
| 🔌 **模型可替换** | 统一的模型服务配置接入云端或本地 OpenAI 兼容模型,评审、规划、记忆等角色可分别指定模型 |

## 快速开始
Expand Down Expand Up @@ -232,7 +230,7 @@ curl -fsSL https://raw.githubusercontent.com/ZJU-REAL/HugAgentOS/main/install.sh

## 系统架构

HugAgentOS 将用户渠道、智能体工作流、可复用能力引擎、本体契约、数据治理和
HugAgentOS 将用户渠道、智能体工作流、可复用能力引擎、数据治理和
基础设施分层组织;Durable Run、租约与恢复机制贯穿执行链路,安全管理与平台监管
贯穿完整技术栈。

Expand Down Expand Up @@ -288,7 +286,6 @@ HugAgentOS 将用户渠道、智能体工作流、可复用能力引擎、本体
| 记忆与自进化 | [记忆系统](./document/zh-CN/modules/memory.md) | [Memory](./document/en/modules/memory.md) |
| 生产部署与环境变量 | [部署指南](./document/zh-CN/deployment/README.md) | [Deployment](./document/en/deployment/README.md) |
| 系统设计与请求链路 | [架构总览](./document/zh-CN/architecture/overview.md) | [Architecture](./document/en/architecture/overview.md) |
| 领域本体控制平面 | [领域本体快速入门](./document/zh-CN/getting-started/domain-ontology-quickstart.md) | [Domain ontology quickstart](./document/en/getting-started/domain-ontology-quickstart.md) |
| 后端与前端开发 | [开发指南](./document/zh-CN/README.md#开发指南) | [Development](./document/en/README.md#development) |

所有文档入口见 [document/README.md](./document/README.md)。
Expand Down
Loading
Loading