Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

apemind-sdk

Latest version: v2.13.7

Overview

Last scanned
30 Nov 2026
Published
30 Nov 2026
PyPI package Publisher: earayu
13 Versions
859 Downloads

Scan summary

apemind-sdk was last scanned on 30 Nov 2026 at version 2.13.7. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 13 versions; the latest 5 were published within 3 days (28–30 Nov 2026).
  • Findings: No rules fired in version 2.13.7.
  • Downloads: 859 downloads.

Versions

13 versions published
Versions and the rules that fired in each
VersionPublishedStatus
2.13.7 LATEST 30 Nov 2026 No rules fired
2.13.6 29 Nov 2026 No rules fired
2.13.5 29 Nov 2026 No rules fired
2.13.4 29 Nov 2026 Not shown
2.13.3 28 Nov 2026 Not shown

No rules fired in 2.13.7

Findings

Findings for v2.13.7. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 2.13.7; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

ApeMind Python SDK (apemind-sdk)

ApeMind 官方 Python SDK,基于仓库公开 OpenAPI 规范(docs/openapi/openapi.json)自动生成 Pydantic v2 数据模型与同步 / 异步 httpx 客户端,覆盖知识库、文档、检索与 Agent 对话核心业务链路。

安装

方式一:通过 PyPI 安装(推荐)
pip install apemind-sdk
方式二:安装 GitHub Release 构建包(支持内网/离线私有化环境)

每次发版 CI 会自动构建对应版本的 .whl、.tar.gz 与 apemind-sdk-SHA256SUMS.txt 并附在 GitHub Release 下:

# 下载对应版本的 wheel 后安装(可拷入离线环境执行)
pip install ./apemind_sdk-<version>-py3-none-any.whl
方式三:从源码目录安装
pip install ./sdk/python

快速开始

客户端默认读取环境变量 APEMIND_BASE_URL(默认 https://apemind.ai)、APEMIND_API_KEY 与可选的 APEMIND_WORKSPACE_ID,也支持在构造时显式传入:

from apemind import ApeMindClient, extract_turn_text

with ApeMindClient(
    base_url="https://apemind.ai",
    api_key="sk-...",
    workspace_id="org_...",
) as client:
    # 1. 创建知识库(声明式配置)
    kb = client.knowledge_bases.create(title="产品制度库")
    kb_id = kb.metadata.id

    # 2. 两步上传文档并等待索引完成
    uploaded = client.documents.upload(kb_id, "handbook.pdf", path="制度/handbook.pdf")
    client.documents.confirm(kb_id, [uploaded.document_id])
    doc = client.documents.wait_until_indexed(kb_id, uploaded.document_id)

    # 3. 知识库混合检索(向量 + 全文 + 图谱)
    search_res = client.search.collection(kb_id, "年假天数如何计算?", vector_topk=5, fulltext_topk=5)
    for item in search_res.items or []:
        print(item.rank, item.score, item.content[:80])

    # 4. Agent 异步 Turn 对话与句级引用
    chat = client.chats.create(agent_id="agent_...")
    turn = client.chats.ask(chat.id, "请总结年假制度并给出依据条款。")
    print(extract_turn_text(turn))
    evidence = client.chats.get_turn_evidence(chat.id, turn.turn_id)

需要异步调用时使用 AsyncApeMindClient(接口与同步版一致):

from apemind import AsyncApeMindClient

async with AsyncApeMindClient(base_url="https://apemind.ai", api_key="sk-...") as client:
    res = await client.search.collection("kb_...", "合同解除条件")

覆盖能力与客户端分层

  • 高层资源接口(推荐日常使用):
    • client.knowledge_bases:声明式创建/查询/局部更新、列表、索引状态汇总、重建失败索引、删除
    • client.documents:单步上传、两步暂存上传 + 确认、URL 抓取、列表/详情、内容读写、原文件下载、删除、索引轮询等待 wait_until_indexed()
    • client.search:单知识库多路混合检索 collection()、跨库检索 workspace()、检索历史、grep() / read()
    • client.agents:声明式创建/列表/查询/局部更新/删除 Agent
    • client.chats:会话管理、异步 Turn 创建/轮询/等待/取消/句级证据、OpenAI 兼容同步 chat_completions() 与流式 stream_chat_completions()
    • client.me() / client.list_workspaces():当前认证身份与可用组织工作空间
  • 底层自动生成绑定:通过 client.api 直接访问所有 65 个从 OpenAPI 自动生成的强类型方法,通过 apemind.models 访问所有自动生成的 Pydantic v2 模型。

示例代码

  • examples/01_knowledge_base_and_documents.py:声明式建库、两步上传确认与索引等待
  • examples/02_hybrid_search.py:知识库三路混合检索与工作区跨库检索
  • examples/03_agent_chat_turn.py:原生异步 Turn 对话与句级引用证据提取
  • examples/04_openai_compat_chat.py:OpenAI 兼容流式对话

从 OpenAPI 重新生成与测试

# 重新生成 src/apemind/_generated/{models.py,api.py,__init__.py}
python3 sdk/python/scripts/generate_sdk.py

# 校验无漂移(CI 门禁同款)
python3 sdk/python/scripts/generate_sdk.py --check

# 运行单元测试与代码检查
PYTHONPATH=sdk/python/src pytest sdk/python/tests -q
ruff check sdk/python/src sdk/python/scripts sdk/python/tests sdk/python/examples

发布机制

SDK 版本号与产品版本号一致(服务端 v2.12.36 对应 apemind-sdk==2.12.36)。仓库每次发布产品 v* Release 时,.github/workflows/release-python-sdk.yml 会自动:

  1. 将 Tag 转换为 PEP 440 版本号(如 v2.12.33 → 2.12.33);
  2. 校验 OpenAPI 零漂移并运行 SDK 单元测试;
  3. 构建 .whl、.tar.gz 与 apemind-sdk-SHA256SUMS.txt,并在干净虚拟环境中验证 wheel 安装与导入;
  4. 上传构建产物到对应 GitHub Release;
  5. 当仓库变量 APEMIND_PYPI_PUBLISH=true 且 Tag 为稳定产品版本号 vX.Y.Z(-rc / -preview 等预发布 Tag 不发布),或手动触发 workflow_dispatch 勾选 publish_pypi 时,通过 pypi GitHub Environment(支持 PyPI Trusted Publishing OIDC 或 PYPI_API_TOKEN)发布到 PyPI。私有化部署请按服务端版本锁定 SDK,例如 pip install "apemind-sdk~=2.12.0"。早期独立版本线 sdk/v0.1.x 已停止发布。

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases apemind-sdk

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229