Metadata-Version: 2.4
Name: ksadk
Version: 0.8.1
Summary: KsADK Agent Runtime Platform - unified runtime, debugging, deployment and observability for AI agents
Author-email: KsADK Team <xiayu@kingsoft.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/kingsoftcloud/ksadk-python
Project-URL: Repository, https://github.com/kingsoftcloud/ksadk-python
Project-URL: Documentation, https://kingsoftcloud.github.io/ksadk-python/
Keywords: agent,langchain,langgraph,deepagents,adk,faas,kingsoft cloud,ai,llm
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0.0
Requires-Dist: pyyaml>=6.0.0
Requires-Dist: packaging>=23.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: pydantic<3.0.0,>=2.0.0
Requires-Dist: jsonschema<5.0.0,>=4.0.0
Requires-Dist: questionary>=2.0.0
Requires-Dist: prompt_toolkit>=3.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: fastapi<1.0.0,>=0.100.0
Requires-Dist: uvicorn>=0.23.0
Requires-Dist: python-multipart<1.0.0,>=0.0.9
Requires-Dist: python-socks<3.0.0,>=2.7.1
Requires-Dist: httpx<0.29.0,>=0.28.1
Requires-Dist: httpcore<1.1.0,>=1.0.9
Requires-Dist: a2a-sdk[fastapi]==1.1.0
Requires-Dist: a2ui-core==0.1.1
Requires-Dist: httpx-sse>=0.4.0
Requires-Dist: sse-starlette>=2.1.0
Requires-Dist: mcp<2.0.0,>=1.26.0
Requires-Dist: requests>=2.28.0
Requires-Dist: requests-aws4auth>=1.2.0
Requires-Dist: kingsoftcloud-sdk-python>=1.5.8.94
Requires-Dist: cryptography>=44.0.0
Requires-Dist: websockets<16.0,>=12.0
Requires-Dist: qrcode>=7.4.0
Requires-Dist: asyncpg<1.0.0,>=0.30.0
Requires-Dist: greenlet>=1.0.0
Requires-Dist: ks3sdk>=1.15.0
Requires-Dist: pypdf>=6.0.0
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: rapidocr-onnxruntime>=1.2.0
Requires-Dist: pillow<13.0.0,>=11.0.0
Requires-Dist: langchain<2.0.0,>=1.3.14
Requires-Dist: langchain-core<2.0.0,>=1.5.0
Requires-Dist: langgraph<1.3.0,>=1.2.0
Requires-Dist: opentelemetry-api<=1.41.1,>=1.39.0
Requires-Dist: opentelemetry-sdk<=1.41.1,>=1.39.0
Requires-Dist: opentelemetry-exporter-otlp<=1.41.1,>=1.39.0
Provides-Extra: adk
Requires-Dist: google-adk<3.0.0,>=1.34.0; extra == "adk"
Requires-Dist: litellm>=1.0.0; (platform_system != "Windows" or python_version < "3.13") and extra == "adk"
Requires-Dist: json_repair>=0.25.0; extra == "adk"
Provides-Extra: langchain
Requires-Dist: langchain<2.0.0,>=1.3.14; extra == "langchain"
Requires-Dist: langchain-openai<2.0.0,>=1.4.0; extra == "langchain"
Requires-Dist: langchain-core<2.0.0,>=1.5.0; extra == "langchain"
Provides-Extra: langgraph
Requires-Dist: langgraph<1.3.0,>=1.2.0; extra == "langgraph"
Requires-Dist: langgraph-checkpoint-sqlite>=2.0.0; extra == "langgraph"
Requires-Dist: langchain<2.0.0,>=1.3.14; extra == "langgraph"
Requires-Dist: langchain-openai<2.0.0,>=1.4.0; extra == "langgraph"
Requires-Dist: protobuf>=6.32.1; extra == "langgraph"
Provides-Extra: deepagents
Requires-Dist: deepagents<1.0.0,>=0.6.2; python_version >= "3.11" and extra == "deepagents"
Requires-Dist: langgraph<1.3.0,>=1.2.0; extra == "deepagents"
Requires-Dist: langchain<2.0.0,>=1.3.14; extra == "deepagents"
Requires-Dist: langchain-openai<2.0.0,>=1.4.0; extra == "deepagents"
Provides-Extra: a2a
Requires-Dist: a2a-sdk[fastapi]==1.1.0; extra == "a2a"
Requires-Dist: SQLAlchemy[asyncio]<3.0.0,>=2.0.0; extra == "a2a"
Requires-Dist: aiosqlite<1.0.0,>=0.20.0; extra == "a2a"
Provides-Extra: a2a-postgres
Requires-Dist: a2a-sdk[postgresql]==1.1.0; extra == "a2a-postgres"
Provides-Extra: tracing
Requires-Dist: openinference-instrumentation-langchain>=0.1.0; extra == "tracing"
Provides-Extra: judge
Requires-Dist: deepeval>=3.2.6; extra == "judge"
Provides-Extra: kb
Provides-Extra: skills
Requires-Dist: e2b<2.25.0,>=2.15.3; extra == "skills"
Provides-Extra: codex
Requires-Dist: openai-codex==0.144.4; extra == "codex"
Provides-Extra: agui
Requires-Dist: ag-ui-protocol==0.1.19; extra == "agui"
Requires-Dist: ag-ui-langgraph[fastapi]==0.0.42; extra == "agui"
Requires-Dist: copilotkit==0.1.94; extra == "agui"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: fastmcp>=2.0.0; extra == "dev"
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: types-PyYAML>=6.0.0; extra == "dev"
Requires-Dist: types-protobuf>=6.32.0; extra == "dev"
Requires-Dist: types-python-dateutil>=2.9.0; extra == "dev"
Requires-Dist: types-qrcode>=8.2.0; extra == "dev"
Requires-Dist: types-requests>=2.32.0; extra == "dev"
Requires-Dist: playwright>=1.50.0; extra == "dev"
Provides-Extra: all
Requires-Dist: ksadk[a2a,adk,agui,codex,deepagents,dev,judge,kb,langchain,langgraph,skills,tracing]; extra == "all"
Dynamic: license-file

<h1 align="center">Kingsoft Cloud Agent Development Kit</h1>

<p align="center"><strong>金山云智能体开发套件</strong></p>

<p align="center">
  构建、部署、调试、观测企业级 AI 智能体的一站式云原生框架。
  兼容 Google ADK、LangGraph、LangChain 与 DeepAgents，并支持一键拉起 OpenClaw 和 Hermes 运行时。
</p>

<p align="center"><a href="README.md">简体中文（默认）</a> · <a href="README.en.md">English</a></p>

<p align="center">
  <a href="https://kingsoftcloud.github.io/ksadk-python/"><img alt="Docs" src="https://img.shields.io/badge/Docs-ksadk--python-2f6fdf?style=flat" /></a>
  <a href="https://pypi.org/project/ksadk/"><img alt="PyPI" src="https://img.shields.io/pypi/v/ksadk?style=flat&color=2f6fdf" /></a>
  <a href="https://zread.ai/kingsoftcloud/ksadk-python"><img alt="Ask Zread" src="https://img.shields.io/badge/Ask_Zread-_.svg?style=flat&color=00b0aa&labelColor=000000&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuOTYxNTYgMS42MDAxSDIuMjQxNTZDMS44ODgxIDEuNjAwMSAxLjYwMTU2IDEuODg2NjQgMS42MDE1NiAyLjI0MDFWNC45NjAxQzEuNjAxNTYgNS4zMTM1NiAxLjg4ODEgNS42MDAxIDIuMjQxNTYgNS42MDAxSDQuOTYxNTZDNS4zMTUwMiA1LjYwMDEgNS42MDE1NiA1LjMxMzU2IDUuNjAxNTYgNC45NjAxVjIuMjQwMUM1LjYwMTU2IDEuODg2NjQgNS4zMTUwMiAxLjYwMDEgNC45NjE1NiAxLjYwMDFaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00Ljk2MTU2IDEwLjM5OTlIMi4yNDE1NkMxLjg4ODEgMTAuMzk5OSAxLjYwMTU2IDEwLjY4NjQgMS42MDE1NiAxMS4wMzk5VjEzLjc1OTlDMS42MDE1NiAxNC4xMTM0IDEuODg4MSAxNC4zOTk5IDIuMjQxNTYgMTQuMzk5OUg0Ljk2MTU2QzUuMzE1MDIgMTQuMzk5OSA1LjYwMTU2IDE0LjExMzQgNS42MDE1NiAxMy43NTk5VjExLjAzOTlDNS42MDE1NiAxMC42ODY0IDUuMzE1MDIgMTAuMzk5OSA0Ljk2MTU2IDEwLjM5OTlaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik0xMy43NTg0IDEuNjAwMUgxMS4wMzg0QzEwLjY4NSAxLjYwMDEgMTAuMzk4NCAxLjg4NjY0IDEwLjM5ODQgMi4yNDAxVjQuOTYwMUMxMC4zOTg0IDUuMzEzNTYgMTAuNjg1IDUuNjAwMSAxMS4wMzg0IDUuNjAwMUgxMy43NTg0QzE0LjExMTkgNS42MDAxIDE0LjM5ODQgNS4zMTM1NiAxNC4zOTg0IDQuOTYwMVYyLjI0MDFDMTQuMzk4NCAxLjg4NjY0IDE0LjExMTkgMS42MDAxIDEzLjc1ODQgMS42MDAxWiIgZmlsbD0iI2ZmZiIvPgo8cGF0aCBkPSJNNCAxMkwxMiA0TDQgMTJaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00IDEyTDEyIDQiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L3N2Zz4K&logoColor=ffffff" /></a>
  <a href="LICENSE"><img alt="License" src="https://img.shields.io/badge/License-Apache--2.0-blue?style=flat" /></a>
</p>

<p align="center"><a href="https://raw.githubusercontent.com/kingsoftcloud/ksadk-python/main/docs-site/public/assets/ksadk-runtime-platform-hero.png"><img alt="KsADK 真实 CLI 截图：agentengine -h" src="https://raw.githubusercontent.com/kingsoftcloud/ksadk-python/main/docs-site/public/assets/ksadk-runtime-platform-hero-wide.png" width="860" /></a></p>

## 30 秒快速体验

```bash
python -m venv .venv
source .venv/bin/activate
pip install -U "ksadk[all]"

agentengine init demo-agent -f langgraph
cd demo-agent
agentengine config set OPENAI_API_KEY=your-api-key OPENAI_MODEL_NAME=gpt-4o-mini
agentengine run -i
```

启动本地调试 Web UI：

```bash
agentengine web . --no-open
```

## 0.8.1 可观测性契约

- 远端 trace 统一使用标准 OTLP/HTTP：Langfuse 读取 `OTEL_EXPORTER_OTLP_*`，CloudMonitor 读取 `CLOUD_MONITOR_OTLP_*`；同一 span 在两端保持相同的 `trace_id` / `span_id`。
- 托管 Agent 通过 CLI 或控制台创建时默认开启可观测性并由平台注入双路配置；只有显式传入 `--no-observability` 或在控制台关闭才禁用。
- `LANGFUSE_USE_CALLBACK`、Langfuse SDK CallbackHandler/exporter 已移除。`CLOUD_MONITOR_APP_KEY` 只保留一个版本的过渡 fallback，新配置应通过 OTLP headers 提供 `Ksc-Appkey`。
- exporter 直接运行在 Agent 进程内，不会额外启动 OpenTelemetry Collector、sidecar、容器或 Pod。

迁移与环境变量示例见[可观测指南](https://kingsoftcloud.github.io/ksadk-python/cn/docs/framework/guides/observability-tracing/)和[环境变量参考](https://kingsoftcloud.github.io/ksadk-python/cn/docs/references/environment-variables/)。

<p align="center"><a href="https://raw.githubusercontent.com/kingsoftcloud/ksadk-python/main/docs-site/public/assets/ksadk-web-ui-screenshot.png"><img alt="KsADK 真实 Web UI 调试截图" src="https://raw.githubusercontent.com/kingsoftcloud/ksadk-python/main/docs-site/public/assets/ksadk-web-ui-screenshot.png" width="860" /></a></p>

<p align="center"><a href="https://raw.githubusercontent.com/kingsoftcloud/ksadk-python/main/docs-site/public/assets/ksadk-local-debugging-demo.gif"><img alt="KsADK 真实本地 Web UI 演示" src="https://raw.githubusercontent.com/kingsoftcloud/ksadk-python/main/docs-site/public/assets/ksadk-local-debugging-demo.gif" width="860" /></a></p>

## 为什么需要 KsADK

大多数 Agent 框架解决“如何开发 Agent”。KsADK 解决“如何运行、调试、部署和观测 Agent”。

- 本地开发：`agentengine init`、`agentengine run`、`agentengine web`。
- 统一调试：浏览器 Web UI、streaming、附件、workspace 文件、工具调用和会话。
- 统一协议：本地 `/v1/responses` 与 `/v1/chat/completions`。
- 工具边界：Skill Runtime、Workspace、Sandbox、Memory、Knowledge。
- 工程链路：打包、部署、OpenClaw / Hermes 运行时、OpenTelemetry 可观测。

## 架构

<p align="center"><a href="https://raw.githubusercontent.com/kingsoftcloud/ksadk-python/main/docs-site/public/assets/ksadk-runtime-architecture.png"><img alt="KsADK 智能体运行时平台架构" src="https://raw.githubusercontent.com/kingsoftcloud/ksadk-python/main/docs-site/public/assets/ksadk-runtime-architecture.png" width="860" /></a></p>

## 文档与样例

- 文档：<https://kingsoftcloud.github.io/ksadk-python/>
- 快速开始：<https://kingsoftcloud.github.io/ksadk-python/cn/docs/framework/getting-started/quickstart/>
- 为什么需要 KsADK：<https://kingsoftcloud.github.io/ksadk-python/cn/docs/framework/getting-started/why-ksadk/>
- 架构：<https://kingsoftcloud.github.io/ksadk-python/cn/docs/framework/getting-started/architecture/>
- 生态定位对比：<https://kingsoftcloud.github.io/ksadk-python/cn/docs/framework/getting-started/comparison/>
- 可观测：<https://kingsoftcloud.github.io/ksadk-python/cn/docs/framework/guides/observability-tracing/>
- 云端部署：<https://kingsoftcloud.github.io/ksadk-python/cn/docs/framework/guides/cloud-deployment/>
- Hosted UI 与事件回放：<https://kingsoftcloud.github.io/ksadk-python/cn/docs/framework/guides/hosted-ui-events/>
- 样例仓库：<https://github.com/kingsoftcloud/ksadk-samples>

## 相关项目

- KsADK 仓库：<https://github.com/kingsoftcloud/ksadk-python>
- Web UI 仓库：<https://github.com/kingsoftcloud/ksadk-web>
- Wiki：<https://zread.ai/kingsoftcloud/ksadk-python>
- PyPI：<https://pypi.org/project/ksadk/>

## 参与贡献

欢迎通过 issue、PR、样例和文档改进参与贡献。提交前建议运行：

```bash
make public-preflight
```

开源协议：Apache-2.0。
