SSW Agent
这是一个基于 LangGraph/Deep Agents 的个人 AI assistant 项目。
安装使用
要求 Python 3.11~3.13。通过 pip 安装:
pip install ssw-agent
首次启动前可以手动创建 .ssw/.env 并填写模型配置:或者直接配置以下下个系统环境变量
SSW_API_KEY=你的模型密钥
SSW_BASE_URL=https://api.deepseek.com
SSW_MODEL=deepseek-chat
安装后直接启动:
ssw-agent
如果 Python 的 Scripts 目录不在 PATH 中,也可以使用模块方式启动:
python -m ssw.start_web
默认使用当前用户主目录下的 .ssw 作为 workspace。Windows 默认路径为
C:\Users\<用户名>\.ssw,其中会保存:
.env:模型及服务配置,需要由使用者自行创建,不会包含在安装包中;skills/:主 Agent 和子 Agent 的技能文件;mcp.json:MCP 服务配置;.checkpoint/:本地会话检查点。
首次启动会从安装包初始化默认 mcp.json 和主 Agent skills。初始化只复制
缺失文件,不会覆盖用户已经修改的配置或技能。Text-to-SQL 数据源 skills
可能包含数据库连接凭据,因此不会作为默认资源发布。
也可以通过系统环境变量 SSW_WORKSPACE 指定其他目录:
$env:SSW_WORKSPACE = "D:\ssw-workspace"
ssw-agent
启动后访问 http://127.0.0.1:8000。程序会使用安装包内的 LangGraph 配置启动异步子 Agent 服务,不依赖源码仓库中的 langgraph.json。
本地开发
优先使用 uv 同步依赖:
uv sync
在仓库根目录启动 Web 服务:
python -m ssw.start_web
ssw.start_web 会先启动 langgraph dev 作为异步子 Agent 服务,默认监听 http://127.0.0.1:2024;随后启动 FastAPI,默认监听 http://127.0.0.1:8000。前端和业务接口统一访问 FastAPI,Chat 接口在当前 FastAPI 进程内直接调用 agent.astream。
Chat API
POST /chat/stream:流式对话。请求体可不传thread_id,后端会生成会话线程 id,并通过响应头X-Thread-Id返回。GET /chat?limit=10:查询最近会话列表,默认返回最近 10 次。GET /chat/{thread_id}/history:查看会话历史。DELETE /chat/{thread_id}:删除会话。
Metadata
Release files for ssw-agent 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ssw_agent-0.1.7.tar.gz | 2.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ssw_agent-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.2 MB
Release files / ssw_agent-0.1.7.tar.gz
| Download URL | ssw_agent-0.1.7.tar.gz |
|---|---|
| Size | 2.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3abfbba3d190d7cd4f30d7ca007790d77772a7b305303276b9cc8a9fdadaf304
|
|
BLAKE2b-256 checksum How to use checksums |
ed9be48934e4591de9e6d71f005ccc9d45070e296e0f5f746431d6cee35433f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / ssw_agent-0.1.7-py3-none-any.whl
| Download URL | ssw_agent-0.1.7-py3-none-any.whl |
|---|---|
| Size | 599.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e5e56ff9a21a75045d4e9b12dfdb159f0f60510c08126bcf1a753cd12ee3610b
|
|
BLAKE2b-256 checksum How to use checksums |
9be909f781442f2795e213e527d28218083c3f46f64c4f983a4a9d91e4568129
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|