* feat: refactor DeepSeekReasonerAgent as a drop-in replacement for pydantic_ai Agent This refactor improves the `DeepSeekReasonerAgent` adapter to be a robust, drop-in replacement for native PydanticAI Agents. It brings several enhancements: 1. Re-implemented `run()` to manually inject historical messages (`message_history`) and dependencies, preserving state across workflows. 2. Replaced the simplistic crash loop with an explicit, manual multi-turn retry mechanism. If the Markdown JSON parser fails, it correctly injects the `ValidationError` back into the conversation history and prompts the model to correct its structure up to `retries` times. 3. Designed an elegant proxy `AgentRunResultProxy` to seamlessly wrap `AgentRunResult` outputs. This cleanly passes through downstream calls (e.g., `result.data`, `result.usage()`, `result.all_messages()`) avoiding `AttributeError`s and Monkey-patching. 4. Integrated fallback tool descriptions parsing, dynamically instructing the model on available tools. 5. Adapted `AgentFactory` to correctly propagate `tools` and `retries`. Co-authored-by: zhaoxi826 <198742034+zhaoxi826@users.noreply.github.com> * feat: add deepseek provider option to frontend - Added 'deepseek' option to `ProvidersSettings.tsx` `<select>` - Updated frontend Typescript interfaces in `index.ts` to allow 'deepseek' as `provider_type` - Validated frontend build successful 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> |
||
|---|---|---|
| changelogs | ||
| config | ||
| docs | ||
| frontend | ||
| pretor | ||
| tests | ||
| .dockerignore | ||
| .env | ||
| .gitignore | ||
| .python-version | ||
| CODE_OF_CONDUCT.md | ||
| Dockerfile | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| docker-compose.yml | ||
| main.py | ||
| pyproject.toml | ||
| uv.lock | ||
README.md
Pretor 是一款基于 Ray 构建的下一代分布式多 Agent 协作系统。项目采用“中心监管 + 边缘执行”的异构集群模式,通过大参数 MoE 模型进行高层逻辑推理,并协同微调后的轻量化模型高效完成具体任务。借助 Pydantic-AI 提供的强类型约束与 FastAPI 异步网关,Pretor 实现了任务从需求拆解、资源调度到自动化执行的全链路闭环,为个人提供可靠的人工智能助手服务。
✨ 核心特性
🧠 异构协作体系
- 多智能体集群:内置主管 (Supervisory)、意识 (Consciousness)、控制 (Control) 三大核心节点,实现比单 Agent 系统更严谨的决策链。
- Worker 动态派生:根据任务需求动态拉起 Ordinary 或 Skill 类型的 Worker Individual,实现资源的按需分配。
🚀 分布式性能保障
- Ray 驱动:底层基于 Ray 构建,支持跨进程、跨机器的 Actor 通讯,轻松应对高并发任务流。
- 本地化优先:深度适配 vLLM,支持本地私有化模型部署,在保障隐私的同时大幅降低 API 调用成本。
🛠️ 工业级工程设计
- 强类型契约:基于 Pydantic-AI 实现 Tool 与 Agent 的接口定义,确保 AI 输出的确定性与安全性。
- 自动化流:内置工作流引擎 (Workflow Engine),实现从需求发现到自动化执行的闭环。
📦 Pretor 生态子项目 (Sub-projects)
| 项目名称 | 代号 | 功能定位 | 当前状态 |
|---|---|---|---|
| pretor-viceroy | 总督 | 资源管理:负责系统 Skill 的动态安装、元数据解析与全集群分发。 | ✅ 已发布 |
| pretor-stardomain | 星域 | 安全沙箱:为 Agent 自动生成的代码提供轻量化的隔离运行环境,防止逃逸。 | 📅 规划中 |
| pretor-explorer | 探索者 | 网页感知:自动化爬虫引擎,赋予智能体实时互联网信息搜索与内容抓取能力。 | 📅 规划中 |
| pretor-pioneer | 先驱者 | 知识增强:RAG 检索增强引擎,管理私有知识库的向量化、索引与精准检索。 | 📅 规划中 |
快速开始
本项目正在开发中...