Skip to main content

belcore

Python client for the Belcore API: long-term memory and an emotion state for your chat app, in one call.

Get an API key at belcore.xyz/developers/signup (5,000 free calls, no card) and set BELCORE_API_KEY.

Install

pip install belcore

Usage

from belcore import Belcore

client = Belcore()  # reads BELCORE_API_KEY

r = client.chat(
    messages=history,          # full history from your database
    system="You are a helpful assistant.",
    emotion=last_emotion,      # what the previous call returned; omit on the first turn
)

r["reply"]
save_emotion(r["emotion"])     # send it back next turn
r["memory"]                    # "long-term" | "recent"

history is a list of {"role": "user" | "assistant", "content": str}.

Async:

from belcore import AsyncBelcore

async with AsyncBelcore() as client:
    r = await client.chat(messages=history)

How it works

You keep the conversation history in your database and send it with each call. Belcore picks the turns that matter from the whole history, answers, and returns the updated emotion state for you to save. Belcore does not store conversation text.

your DB ──history──▶ Belcore ──reply + emotion──▶ your DB

Options for chat()

Argument Meaning
system System prompt.
model Underlying model id, e.g. "openai/gpt-4o-mini". Omit for Belcore's default.
emotion State returned by the previous call. Omit on the first turn.
traits Character traits (obsession, edginess, stability, 0–100).
intimacy_level Relationship level (0–10).
end_user_id, subject_id Optional. Let Belcore keep the numeric emotion state for you instead of sending emotion. Export with export_memory(), delete with delete_user().

Errors from the API raise BelcoreAPIError with .status and .message.

License

Apache-2.0

Metadata

Release files for belcore 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for belcore 0.1.0
File Size Uploaded Provenance Actions
belcore-0.1.0.tar.gz 5.0 kB With provenance Details for belcore-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for belcore 0.1.0
File Interpreter ABI Platform Actions
belcore-0.1.0-py3-none-any.whl Python 3 none any Details for belcore-0.1.0-py3-none-any.whl

Total release size: 9.6 kB

Release files / belcore-0.1.0.tar.gz

Download URL belcore-0.1.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bae7a063280a9bd50df8190f8f2f6e123482dcc7350e9c658c67852119e731f1
BLAKE2b-256 checksum
How to use checksums
76ade7581bb0afd5b32410e4df3ae7ca3efc82962e819ad5d881a37ed4d9d038
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / belcore-0.1.0-py3-none-any.whl

Download URL belcore-0.1.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0442dbaaa4da40fff2291a2eec7c3faad47067eba7ee124b91b659bb7ffc7954
BLAKE2b-256 checksum
How to use checksums
8285b460cb468b717b27f02f9111138a9b8c1f40a7fd8080978dbee1b14a8438
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for belcore 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for belcore-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page