Skip to main content

SSW Agent

这是一个基于 LangGraph/Deep Agents 的个人 AI assistant 项目。

安装使用

要求 Python 3.11~3.13。通过 pip 安装:

pip install ssw-agent

安装后直接启动:

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/.env 并填写模型配置:

SSW_API_KEY=你的模型密钥
SSW_BASE_URL=https://api.deepseek.com
SSW_MODEL=deepseek-chat

也可以通过系统环境变量 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.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ssw-agent 0.1.6
File Size Uploaded
ssw_agent-0.1.6.tar.gz 2.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ssw-agent 0.1.6
File Interpreter ABI Platform
ssw_agent-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 3.2 MB

Release files / ssw_agent-0.1.6.tar.gz

Download URL ssw_agent-0.1.6.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
5d8cd16825a5c952d83ea6b882241528ecff3c7c035802292fba7c1eb2182b85
BLAKE2b-256 checksum
How to use checksums
de12f217223a33f4f66e25bbdd1565e226d1c98b80721405db57ed37d39fdbf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release files / ssw_agent-0.1.6-py3-none-any.whl

Download URL ssw_agent-0.1.6-py3-none-any.whl
Size 598.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
41c5d78ff57c4ccb5820560b9272082ae61cb5a2b7c3f6c0e55ed69236c398ad
BLAKE2b-256 checksum
How to use checksums
3c96e03d7b359aa7f0554d9d80b75013ced503c2225ea455b79590d5ce8692de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release history Release notifications | RSS feed

0.1.7

2 release files

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page