LingxiGraph
开始使用

安装

根据嵌入式开发、Agent 开发或生产部署选择安装方式

前置要求

  • Python 3.11、3.12 或 3.13;
  • 推荐使用 venv、uv、Poetry 等隔离环境;
  • 仅完整服务端部署需要 Docker、PostgreSQL 和 Redis。
python -m venv .venv
# Linux/macOS
source .venv/bin/activate
# Windows PowerShell
.venv\Scripts\Activate.ps1

pip install lingxigraph

可选依赖

基础包无第三方运行时依赖。只安装当前场景需要的 extra:

Extra安装命令内容
serverpip install "lingxigraph[server]"FastAPI、Uvicorn、JWT、HTTP client
sdkpip install "lingxigraph[sdk]"同步/异步 Python HTTP SDK
postgrespip install "lingxigraph[postgres]"PostgreSQL repository、checkpoint、Store
redispip install "lingxigraph[redis]"缓存、PubSub、取消加速
otelpip install "lingxigraph[otel]"OpenTelemetry SDK 与 OTLP exporter
cozepip install "lingxigraph[coze]"Coze Bot、Workflow、ChatModel
openaipip install "lingxigraph[openai]"OpenAI-compatible ChatModel
allpip install "lingxigraph[all]"上述生产能力全集

验证安装

lingxigraph --version
python -c "from lingxigraph import StateGraph; print('LingxiGraph ready')"

lingxigraph dev 需要 server extra;lingxigraph server 在配置 PostgreSQL 时还需安装 postgres。使用 Dockerfile 构建的项目镜像已包含生产依赖。

下一步

On this page