Python SDK for sema-core: thin client over the sema-grpc bridge
Project description
Sema Python SDK
Sema Code Core 的官方 Python SDK:一个事件驱动的 AI 编程助手核心引擎,支持多代理协作、Skill 扩展、Plan 模式任务规划等能力。SDK 内嵌 core 运行时(sidecar),pip install 后开箱即用,asyncio-first。
安装
pip install sema-core
要求:Python 3.10+,本机 Node.js ≥ 18(core 运行时依赖)。
快速开始
import asyncio
from sema_sdk import SemaCore
async def main():
core = await SemaCore.start({"workingDir": "/path/to/your/project"})
session = await core.create_session()
session.on("message:text:chunk", lambda d: print(d["delta"], end="", flush=True))
await session.process_user_input("你好")
await core.close()
asyncio.run(main())
模型配置与更多用法见 文档,完整示例见 example/python-demo(交互式 CLI 与一次性执行)。
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sema_core-2.0.9.tar.gz
(1.1 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sema_core-2.0.9.tar.gz.
File metadata
- Download URL: sema_core-2.0.9.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9da75df68dc6bb253bf1aeeedd7d3116505de0c39d10ff8bf9c2c701e3c9ac4b
|
|
| MD5 |
e2364faeea03c7fa1db5553fe7a24eba
|
|
| BLAKE2b-256 |
a0882ae904b4fd26fd09e31a8a7119f379c1a2b7407fae6495cafe993348ed6e
|
File details
Details for the file sema_core-2.0.9-py3-none-any.whl.
File metadata
- Download URL: sema_core-2.0.9-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61b51e7f85415160f9ba97c4739a2b79589c80d17a48f3751517372681312a69
|
|
| MD5 |
62afe25ac22ff94c440ce09069fea3fe
|
|
| BLAKE2b-256 |
4f8a693bf3d040bd194b8e1d5ac208a96abd99453943f2e5306d340a807dd357
|