Skip to main content

langchain-belcore

LangChain chat model for Belcore: long-term memory and an emotion state for your chat app.

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

Install

pip install langchain-belcore

Usage

from langchain_belcore import ChatBelcore

llm = ChatBelcore(model="openai/gpt-4o-mini")

res = llm.invoke(
    history,                                  # full history from your database (LangChain messages)
    belcore={"emotion": last_emotion},        # omit on the first turn
)

res.content
save_emotion(res.response_metadata["belcore"]["emotion"])   # send it back next turn
res.response_metadata["belcore"]["memory"]                  # "long-term" | "recent"

ainvoke works too. System messages become Belcore's system prompt.

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.

Options

Pass under belcore={...} per call, or as defaults with ChatBelcore(belcore={...}):

Key Meaning
emotion State returned by the previous call.
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.

Limits (v0.1)

  • Text only. Non-text content parts are dropped.
  • Tool calling, streaming token by token, temperature and max_tokens are not supported.

License

Apache-2.0

Metadata

Release files for langchain-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 langchain-belcore 0.1.0
File Size Uploaded Provenance Actions
langchain_belcore-0.1.0.tar.gz 4.4 kB With provenance Details for langchain_belcore-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 8.7 kB

Release files / langchain_belcore-0.1.0.tar.gz

Download URL langchain_belcore-0.1.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
141dc41e7d75abd88b201a8c88e08205b6e0a2dfcca60774b6ad79f3ccc3ce01
BLAKE2b-256 checksum
How to use checksums
6858b74b92ba78da4ceaeecb299db62976f14ba680536794ea3c3b69e5650e76
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 / langchain_belcore-0.1.0-py3-none-any.whl

Download URL langchain_belcore-0.1.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
51c035a5cfda591ee0e998f59a9f2b93971230327020391cd7acdc543865d5f4
BLAKE2b-256 checksum
How to use checksums
d045bae6b44a907d55f96412be353b41948dc9f6a6a9cb02ea66743c1a352716
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 langchain-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 langchain_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