Skip to main content

gligabao (Python client)

Python client for the gligabao Go server.

from gligabao import Client

gb = Client("http://127.0.0.1:7878")
res = gb.remember("u1", "Alice works at Acme and lives in Paris.", kind="episode")  # kind defaults to "knowledge"
print(res["artifact_id"], res["edges"])

Each LLM stage of remember can run on a model of your choice with models (stages extract_graph, resolve_edges and, for images, extract_image); a stage you leave out uses the server's default model:

res = gb.remember("u1", "Alice works at Acme.", models={"extract_graph": "claude-sonnet-4-5"})  # resolve_edges: default

No LLM stage thinks by default ("none", so no thinking tokens are paid for); reasoning turns it on per stage ("low", "medium" or "high"). Each call is recorded by the server as an inference with its model and level, and each chunk summary references the run that wrote it:

res = gb.remember("u1", long_text, models={"summarize_chunk": "claude-haiku-5-5"}, reasoning={"summarize_chunk": "low"})
print(res["chunks"][0]["summary"])  # artifact_id, text, model, reasoning, inference_id

With web_search=True the server also searches the web for the latest world events about the key entities of the text and remembers what it finds (needs an Anthropic API key on the server; see docs/web-search.md of gligabao):

res = gb.remember("u1", "Apple and Microsoft are large companies.", web_search=True)
print([(w["entity"], w["query"], w["artifact_id"]) for w in res.get("web_searches", [])])

Timeseries can be stored with a text and anchored to what it yields (see docs/timeseries.md of gligabao). A series without anchors is anchored to the artifact; an entity or edge anchor is matched after the text is extracted, so it may name an entity the text will yield. attach_timeseries does the same for what is already stored:

from datetime import datetime, timezone

closes = [(datetime(2025, 1, 30, tzinfo=timezone.utc), 237.6), (datetime(2025, 1, 31, tzinfo=timezone.utc), 222.0)]
res = gb.remember("u1", "Apple fell after the earnings miss.", kind="episode", timeseries=[
    {"key": "AAPL.close", "unit": "USD", "points": closes,
     "anchors": [{"entity": {"name": "Apple", "type": "organization"}}]},
])
print([(s["key"], s["stats"]["trend"], s["anchors"]) for s in res["series"]])
gb.attach_timeseries("u1", [{"key": "AAPL.close", "points": closes, "anchors": [{"entity_id": 12}]}])

If the server was started with timeseries providers (a Go program embedding gligabao registers them), it can fetch series itself: an LLM reads the providers' descriptions and decides which provider is for which entity of the text.

res = gb.remember("u1", "Apple fell after the earnings miss.", kind="episode", fetch_timeseries={"providers": ["prices"], "before": "30d"})
print([(f["entity"], f["provider"], f["query"], [s["key"] for s in f.get("series", [])]) for f in res["series_fetches"]])

Add observe_timeseries=True to also derive a series_observation artifact from each stored series (a text generated from its stats, extracted into the graph like any text); they are listed under series_observations.

An image is remembered by the image pipeline: the server's LLM reads the text in it (title and text blocks) and classifies the whole image by a theme (plot, graph, chart, table, document, ...). Pass the raw bytes, or the path of a JPEG, PNG, GIF or WebP file (up to 5 MiB); text and kind do not apply:

res = gb.remember("u1", image="revenue.png", dataset="charts")
print(res["theme"], res["title"], [b["text"] for b in res["text_blocks"]])

Install for development: pip install -e ".[dev]", then pytest.

Metadata

Release files for gligabao 0.7.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 gligabao 0.7.0
File Size Uploaded Provenance
gligabao-0.7.0.tar.gz 6.3 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 12.7 kB

Release files / gligabao-0.7.0.tar.gz

Download URL gligabao-0.7.0.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
38dadb7cdfc37fb10b4ce856741fa6e56379c9555f8d9098c202e1f83d296887
BLAKE2b-256 checksum
How to use checksums
fbb4467fd685b2cd37d6caec927065a4523a0a341a23cff8e7947d0d5f685666
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Release files / gligabao-0.7.0-py3-none-any.whl

Download URL gligabao-0.7.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
798640583d20191dc0b21bf79cb6469fb7592e7d31577306458c59a65d12c4ed
BLAKE2b-256 checksum
How to use checksums
573edfd289bde325825b5b0b7ae336eaec385c1695357a20a4d2b2b14a601278
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.3

Security for gligabao 0.7.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.

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.

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files No 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