gspark-agent
面向 AI Agent 的 G-spark / HUB 接入工具:CLI + MCP,共用同一套 /v1 客户端。
安装(仅首次)
pipx install "gspark-agent[mcp]"
gspark setup # 【必做】向用户索取 sk_,写入 ~/.gspark/credentials.env
# 可选:gspark agent-guide # 读一次说明书即可;站点最新版用 --pull
开发(本仓库):
pip install "./packages/gspark-agent[mcp]"
给 Agent:默认直接跑业务命令;缺 gspark 时 优先在终端自装一次,已装禁止重装;Skill「复制给 Agent」以 skills show 为主;勿每个任务重复 pipx install / 搜源码 / 重跑 agent-guide。
配置
推荐:
gspark setup
# 或非交互:
gspark setup --api-key sk_xxxx --base-url https://www.g-spark.cn
也可手动环境变量:
export GSPARK_API_KEY=sk_xxxx
export GSPARK_BASE_URL=https://www.g-spark.cn # 兼容 api.g-spark.cn;或其他节点如 https://api.hqszh.com
兼容别名:HUB_API_KEY、HUB_BASE_URL。CLI 还会自动读取 ~/.gspark/credentials.env 与当前目录 .env。
CLI
# 日常
gspark apps list --json
gspark apps show video_01 --json
gspark skills show <skill_code> --json
gspark tasks estimate --app video_01 --input prompt="hello" --json
gspark tasks run --app video_01 --input prompt="hello" --wait --json
gspark tasks get <task_id> --json
gspark chat models --json
gspark chat ask -m gpt-5-mini "你好" --json
# Python / MCP 可传 tools、tool_choice、多模态 messages(见 docs/LLM-GATEWAY.md)
gspark account balance --json
gspark account ledger --page 1 --size 20 --json
# 仅首次 / 排障
gspark setup
gspark agent-guide
gspark agent-guide --pull
--json:紧凑单行 JSON(便于 Agent / 管道)- 默认:缩进 JSON;
account ledger默认为表格
--input 支持 JSON 数组/对象,例如:--input tags='["a","b"]'、--input meta='{"k":1}'。
MCP(Cursor)
见 agent_pack/mcp-config.example.json;控制台「Agent专属」页可下载完整接入包。
gspark-mcp
Metadata
Release files for gspark-agent 0.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gspark_agent-0.6.2.tar.gz | 24.6 kB | Without provenance | Details for gspark_agent-0.6.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gspark_agent-0.6.2-py3-none-any.whl | Python 3 | none | any | Details for gspark_agent-0.6.2-py3-none-any.whl |
Total release size: 51.1 kB
Release files / gspark_agent-0.6.2.tar.gz
| Download URL | gspark_agent-0.6.2.tar.gz |
|---|---|
| Size | 24.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
349552b6023d88a711bccd2965591e4c47c982e446b5a6205bfbbfd5f5634118
|
|
BLAKE2b-256 checksum How to use checksums |
8b0942014332b82437acc4c4729fa5cbc3d9c3f1ed95b93b632c7d87d95d9ea0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.0a6
|
Release files / gspark_agent-0.6.2-py3-none-any.whl
| Download URL | gspark_agent-0.6.2-py3-none-any.whl |
|---|---|
| Size | 26.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04a12c06d219f2875c6d956dac1bb3b901d7c75dc8ea9d57f23c955ba217aa84
|
|
BLAKE2b-256 checksum How to use checksums |
5ef806898e86d4886ea94dec07de44ea0a52c55e3ebdf87fca78ed51b2ea9b93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.0a6
|
Security for gspark-agent 0.6.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.