Skip to main content

cerid-sdk

Python client for the Cerid AI Knowledge Companion HTTP API.

pip install cerid-sdk

Sync and async clients with typed responses. Resource groups for the knowledge base, hallucination verification, semantic memory, and system endpoints. Built against the stable /sdk/v1/ surface; protocol drift is enforced server-side by the sdk-openapi-drift CI gate.

Quickstart

from cerid import CeridClient

client = CeridClient(base_url="http://localhost:8888")

# Search the knowledge base
results = client.kb.query("what did I read about graph databases last week?")
for chunk in results.chunks:
    print(chunk.text, chunk.score)

# Verify a generated answer against the KB
report = client.verify.check(
    response_text="Cerid uses Neo4j for graph storage.",
    conversation_id="demo",
)
print(report.faithfulness, report.unsupported_claims)

# Recall semantic memory
memories = client.memory.recall("preferred deployment topology", top_k=5)

Async client

import asyncio
from cerid import AsyncCeridClient

async def main():
    async with AsyncCeridClient(base_url="http://localhost:8888") as client:
        results = await client.kb.query("graph databases")
        print(results.total)

asyncio.run(main())

Resource groups

Group Endpoint Purpose
client.kb /sdk/v1/query, /ingest, /search, /collections, /taxonomy Search + ingest the personal knowledge base
client.verify /sdk/v1/hallucination Streaming claim extraction + NLI-gated verification
client.memory /sdk/v1/memory/extract Semantic memory recall + extraction
client.system /sdk/v1/health, /health/detailed, /settings, /plugins Operational endpoints

Authentication

Cerid is local-first by default — CeridClient(base_url=...) connects to a self-hosted instance with no credentials. For deployments behind an authenticating proxy, pass headers via the underlying transport:

client = CeridClient(
    base_url="https://cerid.your-org.internal",
    headers={"Authorization": "Bearer <token>"},
)

Compatibility

  • Python 3.9+ (3.11 / 3.12 actively tested)
  • httpx 0.25+ (transport)
  • pydantic 2.0+ (response models)

Stability contract

The /sdk/v1/ surface and this client's public types (CeridClient, AsyncCeridClient, CeridSDKError, response models) follow semantic versioning. Any breaking change to a /sdk/v1/ endpoint is enforced caught by the sdk-openapi-drift CI gate in the server repo.

SDK_PROTOCOL_VERSION in cerid.__version__ mirrors the server's expected wire-protocol version. Mismatched server / client versions will surface as a CeridSDKError rather than silent payload skew.

License

Apache-2.0. Source at the Cerid AI repository.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cerid_sdk-0.1.1.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cerid_sdk-0.1.1-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file cerid_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: cerid_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for cerid_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 272c74a384b760f7ee35ce5daad1b98ec3d17ae9ebee83bbaece28303dd3287a
MD5 fe161f415dbb82080de65b290a126eb8
BLAKE2b-256 e8f7b8da77d73ec480f3387a34cdc7b6828eeff8c733c01126f2d1fb4b543f85

See more details on using hashes here.

File details

Details for the file cerid_sdk-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cerid_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for cerid_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 38d801265f3ab6b9e9aeaca4f117e0e8336ba6824f9cad5f237df59c2c50c29d
MD5 c7020767117f6ee8e8b00f1d8156fe8c
BLAKE2b-256 edc1e1e8b943b01ec6dec0cdc73d52edddffd9d58fc879434ecd56f81ae9f911

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page