Files
deepseek-harness/examples/jsonrpc-agent/README.zh.md
2026-07-26 05:06:39 +08:00

28 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# jsonrpc-agent
[English](README.md) | 中文
面向 Python SDK 内置 JSON-RPC 运行时的无人值守编码 agent智能体组合。它有意不加载终端 UI、console logger、批准界面或用户交互工具因为 stdout 属于 SDK 协议,轮次由 SDK 驱动。
面向模型的工具为:
- `bash`,仅前台
- `read``write``edit`
- `subagent`,使用一个前台进程内 spawn 提供方
- `todo_write`
周边运行时还加载 JSONL 会话持久化和自动上下文压缩compaction`maxTokensAsSuccess` 将受 token 上限限制的模型轮次保留为已接受的评估结果,同时保留其 `max-tokens` 原因。
## 运行时环境
| 变量 | 用途 |
|---|---|
| `DEEPSEEK_API_KEY` | 传给 OpenAI 兼容宿主端点的凭据 |
| `DEEPSEEK_BASE_URL` | `dsh-llm-deepseek` 使用的宿主端点 |
| `DSH_CWD` | bash 和文件系统工具使用的 agent workspace |
| `DSH_MAX_TOKENS_AS_SUCCESS` | `true`(默认)接受受 token 上限限制的结果;`false` 将其报告为错误 |
| `DSH_SESSION_ROOT` | JSONL 轨迹目录 |
| `DSH_SYSTEM_PROMPT` | 由部署提供的编码人格 |
通过 Python SDK 的 `cordis` 选项或 `DSH_CORDIS_CONFIG` 传入配置路径。内置可执行文件已携带此文件命名的每个插件;目标机器无需 Node.js。