fix: 修复 5 项确定 bug + Provider UX 重做 + 文档统一

Bug fixes:
- fix(dao): AsyncSession.delete 补齐漏掉的 await(provider/user/individual 共 4 处)
- fix(worker): result.data.output → result.output.output(pydantic-ai 1.x API 适配)
- fix(api): 删除 create_worker_from_template 死端点(ORM 字段不匹配必崩)
- fix(api): /provider/test 按 provider_type 分支适配 Anthropic/Gemini/OpenAI 三种协议
- fix(chat): SSE 流式聊天在 distributed 模式 fallback 到非流式,避免 asyncio.Queue 序列化崩溃

Features (previously unstaged):
- feat(provider): Provider 管理页重做(品牌图标、5 种类型、Test Connection、编辑模式)
- feat(provider): 新增 Gemini provider_type 支持
- feat(workflow): Finalize 节点输出 blackboard 摘要 + 失败原因;步骤完成/失败实时推送 SSE
- feat(i18n): regulatory_node 提示词从路由模式改为直接对话模式(中英双语)
- feat(consciousness): dynamic_prompt 支持 locale 国际化
- feat(logs): SystemLogsView 自动刷新 + 暂停按钮

Docs:
- docs: README/README-EN 统一为"开源通用多 Agent 协作平台"口径
- docs: ROADMAP 按 v0.1.x / v0.2.x / v0.3.x 重组
- docs: project.md 重写为结构化项目介绍

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-14 08:49:38 +00:00
parent c0fcbe2849
commit 9b73ae4db4
27 changed files with 858 additions and 214 deletions
+40 -13
View File
@@ -2,7 +2,7 @@
# KiloStar
A distributed multi-agent collaboration system built with Python
An open-source general-purpose multi-agent collaboration platform
[![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/)
[![Ray](https://img.shields.io/badge/Distributed-Ray-0288d1.svg)](https://docs.ray.io/)
@@ -15,31 +15,58 @@ A distributed multi-agent collaboration system built with Python
---
**KiloStar** is a next-generation distributed multi-agent collaboration system powered by **Ray**. It adopts a "central oversight + edge execution" heterogeneous cluster model, leveraging large MoE models for high-level reasoning while coordinating fine-tuned lightweight models for efficient task execution. Built on **Pydantic-AI** with strong typing and a FastAPI async gateway, KiloStar delivers end-to-end automation from requirement decomposition to resource scheduling and execution.
## Overview
**KiloStar** is an open-source general-purpose multi-agent collaboration platform that provides a complete capability stack covering model integration, agent orchestration, workflow execution, and plugin extension. The system uses **Ray** for distributed execution, **Pydantic-AI** for type-safe agent development, and exposes a unified API surface through **FastAPI**.
The platform supports both cloud API models and locally fine-tuned models, ships with built-in core nodes for multi-agent collaboration (Regulatory, Consciousness, Control, Growth), and provides a **heavy plugin** mechanism that lets users reshape the platform into purpose-built agent applications.
> **Current version**: `v0.1.1-alpha`
## Highlights
- **Local fine-tuned models as first-class citizens**: Built-in vLLM adapter; locally fine-tuned models are interchangeable with cloud API models at the call site, allowing different agent nodes to bind different local models.
- **Heavy plugin mechanism**: Plugins can ship their own frontend pages, tool sets, and API endpoints — turning KiloStar into specialized agent applications such as coding assistants, learning helpers, or data analysis tools.
- **Multi-agent collaboration core**: Four system node types (Regulatory / Consciousness / Control / Growth) plus dynamically spawned Worker individuals, with task decomposition, scheduling, and supervision built in.
- **standalone / distributed dual mode**: Zero-dependency single-machine startup; horizontal scaling on demand. Business code is identical across both modes.
- **Private deployment friendly**: Every component runs inside the user's own environment without mandatory third-party dependencies.
---
## ✨ Key Features
## ✨ Core Capabilities
### 🧠 Heterogeneous Agent Architecture
- **Multi-agent cluster**: Built-in Regulatory, Consciousness, Control, and Growth core nodes
- **Dynamic Worker spawning**: On-demand creation of Ordinary or Skill-type Worker Individuals
### 🧠 Multi-Agent Collaboration
- **System node specialization**: Regulatory, Consciousness, Control, and Growth nodes each cover a distinct responsibility
- **Worker dynamic spawning**: On-demand creation of Ordinary / Skill / Special Worker individuals
- **Strongly-typed communication**: Pydantic-AI constrains LLM output to structured data, eliminating the unstructured-text black box in multi-agent flows
### 🚀 Distributed Performance
- **Ray-powered**: Cross-process, cross-machine Actor communication for high-concurrency workloads
- **Local-first**: Deep vLLM integration for private model deployment
### 🚀 Distributed Execution
- **Ray Actor model**: Cross-process and cross-machine collaboration for high-concurrency workloads
- **Heterogeneous resource labels**: `kilostar_node_cpu` / `core` / `gpu` route Workers to the right physical nodes
- **Standalone mode**: Zero external dependencies for single-machine startup; shares the same business code as distributed mode
### 🔄 Workflow Engine
- **pydantic-graph based**: Directed-graph workflow orchestration with conditional branching
- **Cross-process persistence**: PostgreSQL state snapshots enabling workflow resume after interruption
- **pydantic-graph driven**: Directed-graph workflow orchestration with conditional branching and loops
- **Cross-process persistence**: PostgreSQL state snapshots enable workflow resume after interruption
- **Human-in-the-Loop (HITL)**: Built-in HumanApproval node with idempotent resume semantics
### 🧩 Plugin System
- **Tool plugins**: Standard tool calls; MCP protocol support for third-party services
- **Skill (compatible with Anthropic Agent Skills spec)**: Installed and parsed via [viceroy](https://github.com/zhaoxi826/viceroy), loaded on demand at runtime
- **Heavy plugins (planned)**: Vertical application packages with dedicated UI that reshape KiloStar into specialized platforms
### 🛡️ Security
- **JWT authentication**: All API endpoints (including SSE streams) require Bearer Token auth
- **Ownership enforcement**: Workflow/chat resources are user-bound; cross-user access returns 403
- **fetch-based SSE**: Token transmitted via Authorization header, never exposed in URLs
- **Ownership enforcement**: Workflow / chat resources are user-bound; cross-user access returns 403
- **fetch-based SSE**: Token is transmitted via the `Authorization` header, never exposed in URLs
### 📦 Companion Subprojects
| Project | Codename | Purpose | Status |
|:--|:--|:--|:--|
| [kilostar-viceroy](https://github.com/zhaoxi826/viceroy) | Viceroy | Skill installation and cluster-wide distribution | ✅ Released |
| [kilostar-stardomain](./subprojects/stardomain) | Stardomain | Sandbox execution for Skill / plugin scripts | In progress |
| [kilostar-thought](https://github.com/zhaoxi826/thought) | Thought | Augmented memory system for agents | In progress |
---