Go to file
朝夕 5f4754718f
Jules refactor backend and frontend 3736339600030847383 (#33)
* fix: correct actorlist handle in supervisory node and ui form reset (#30)

- Fixed `AttributeError` for `workflow_template_manager` in `SupervisoryNode` by properly unpacking the `.global_state_machine` handle from `ray_actor_hook`.
- Removed overly broad blanket `Exception` swallowing for WebSocket cancellation that caused closed loops in Uvicorn handlers to leak and dump HTTP errors.
- UI: Reset `model_id` to blank whenever a user alters the `Provider Title` to prevent stale incompatible models from breaking submission.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com>

* Fix provider manager and skill settings 17493544742337088454 (#31)

* fix: correct actorlist handle in supervisory node and ui form reset

- Fixed `AttributeError` for `workflow_template_manager` in `SupervisoryNode` by properly unpacking the `.global_state_machine` handle from `ray_actor_hook`.
- Removed overly broad blanket `Exception` swallowing for WebSocket cancellation that caused closed loops in Uvicorn handlers to leak and dump HTTP errors.
- UI: Reset `model_id` to blank whenever a user alters the `Provider Title` to prevent stale incompatible models from breaking submission.

Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com>

* fix: dynamically resolve backend urls based on browser window location

- Updated `apiClient.ts` to use a relative base URL (`''`) if `VITE_API_BASE_URL` is omitted, allowing axios to infer the current domain in reverse-proxied environments.
- Updated WebSocket URL generation in `RightPanel.tsx` and `useClusterState.ts` to dynamically calculate protocol (`ws:` vs `wss:`) and host from `window.location`.

Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com>

* Refactor GlobalStateMachine/PostgresDatabase reflection, error retry mechanisms, and frontend worker individual UI.

- Replaced dynamic getattr reflection in GlobalStateMachine and PostgresDatabase with explicit wrapper methods to improve stability and avoid Missing Method AttributeErrors.
- Add `get_tool_list` explicit wrapper method resolving runtime crashes.
- Implemented `RetryableError` and `NonRetryableError` base exceptions, wrapping network errors and utilizing custom `@retry_on_retryable_error` decorator on Provider requests instead of Ray actor's unsupported `retry_exceptions`.
- Added exponential backoff algorithms for WebSocket reconnections in the frontend.
- Added strict TypeScript-based schema validation for WorkflowTemplate creation payloads.
- Redesigned the Worker Individual configuration UI into a unified list containing both System Nodes and Custom Workers, supporting Add, Edit, and Delete workflows, and resolving the provider-switching bug.
- Updated unit tests to align with architectural changes.
- Cleaned up temp scripts.

Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com>
2026-04-26 11:34:46 +08:00
config wip: 优化了control_node consciousness_node和supervisory_node 2026-04-20 16:20:38 +08:00
docs Merge branch 'dev' of https://github.com/zhaoxi826/Pretor into dev 2026-04-24 23:50:27 +08:00
frontend Jules refactor backend and frontend 3736339600030847383 (#33) 2026-04-26 11:34:46 +08:00
pretor Jules refactor backend and frontend 3736339600030847383 (#33) 2026-04-26 11:34:46 +08:00
tests Jules refactor backend and frontend 3736339600030847383 (#33) 2026-04-26 11:34:46 +08:00
.dockerignore Add react frontend 15346720174401384863 (#7) 2026-04-19 18:59:56 +08:00
.env Merge branch 'dev' of https://github.com/zhaoxi826/Pretor into dev 2026-04-24 23:50:27 +08:00
.gitignore wip:更新版权 2026-04-10 10:50:25 +08:00
.python-version feat:项目初始化,实现了workflow_manager 2026-03-22 18:01:05 +08:00
Dockerfile Add react frontend 15346720174401384863 (#7) 2026-04-19 18:59:56 +08:00
LICENSE wip: 优化 2026-04-11 18:14:07 +08:00
Makefile wip: 增加了skill_manager 2026-04-17 12:36:36 +08:00
README.md wip: 增加了一些文档 2026-04-19 20:07:39 +08:00
docker-compose.yml wip: 同步 2026-04-25 00:01:59 +08:00
main.py Merge branch 'dev' of https://github.com/zhaoxi826/Pretor into dev 2026-04-24 23:50:27 +08:00
pyproject.toml wip: 优化调度逻辑,增加了工具管理 2026-04-20 20:00:15 +08:00
uv.lock wip: 优化调度逻辑,增加了工具管理 2026-04-20 20:00:15 +08:00

README.md

Pretor (执政官)

一款基于 Python 的分布式多 Agent 协作系统

Python 3.13+ License


Pretor 是一款基于 Ray 构建的下一代分布式多 Agent 协作系统。项目采用“中心监管 + 边缘执行”的异构集群模式,通过大参数 MoE 模型进行高层逻辑推理,并协同微调后的轻量化模型高效完成具体任务。借助 Pydantic-AI 提供的强类型约束与 FastAPI 异步网关Pretor 实现了任务从需求拆解、资源调度到自动化执行的全链路闭环,为个人提供可靠的人工智能助手服务。


特别之处?

  • 本项目通过 Rayvllm 实现个人个性化助手的创建,你可以通过收集符合你自己偏好的数据,构建独属于自己的风格的人工智能助手。
  • 本项目通过多 Agent 协作,实现比起单 Agent 系统更强的性能,从而完成更复杂的任务。
  • 本项目通过调用本地模型从而减少对于昂贵的API使用和一定程度上的安全保护。如果你是创作者可以通过用自己的作品去训练属于自己的模型提高工作效率。
  • (暂未实现)本项目适配多种消息平台,实现在外可通过多种方式给 Pretor 下达指令完成工作。
  • (暂未实现)本项目内置 growth_node(生长节点) ,实现傻瓜式微调模型操作,让你的 Pretor 自己学会一些独特的技能。

快速开始

本项目正在开发中...


项目子项目

pretor-viceroy:

项目名称 : 总督
github网址 :https://github.com/zhaoxi826/viceroy
功能 :pretor的资源管理工具
目前实现 :

  • 对于skill的安装与解析

pretor-domain

项目名称 : 域
github网址 :(暂无)
功能 : 轻量化沙箱 目前实现 : (规划中)

pretor-explorer

项目名称 : 探索者 github网址 :(暂无)
功能 : 自动爬虫 目前实现 : (规划中)

pretor-pioneer

项目名称 : 先驱者 github网址 :(暂无)
功能 : RAG检索增强生成 目前实现 : (规划中)