Pretor/pretor
朝夕 5694a30ca8
feat: refactor DeepSeekReasonerAgent as a drop-in replacement for pydantic_ai Agent (#46)
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: 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-28 09:58:54 +08:00
..
adapter feat: refactor DeepSeekReasonerAgent as a drop-in replacement for pydantic_ai Agent (#46) 2026-04-28 09:58:54 +08:00
api Refactor Agent Tool Assignments to Database-Driven Static Loading (#45) 2026-04-28 03:53:33 +08:00
core fix: 修复了bug 2026-04-28 05:55:11 +08:00
plugin fix: 修复了get_tool调用缓存协程对象的bug 2026-04-27 22:18:50 +08:00
utils Refactor Agent Tool Assignments to Database-Driven Static Loading (#45) 2026-04-28 03:53:33 +08:00
worker_individual Refactor Agent Tool Assignments to Database-Driven Static Loading (#45) 2026-04-28 03:53:33 +08:00
workflow_template feat:使用pytanticAI再次重构,增加了对于api的接口管理 2026-03-31 18:15:18 +08:00
__init__.py wip:更新版权 2026-04-10 10:50:25 +08:00