Skip to main content

Stateless memory-compression layer for autonomous AI agents

Project description

agentgc-bindings

FFI surface for AgentGC — Python (via uniffi) today, TypeScript via uniffi-bindgen-react-native or napi-rs to follow.

What's exposed

A concrete-type binding: SqliteStorage + AzureOpenAIClient. Other storage/LLM combinations need their own constructor variants (or future binding crates) because uniffi works best with concrete types and AgentGC's native AFIT trait isn't directly object-safe.

The Python surface mirrors crates::agentgc_core::AgentGC's methods:

import asyncio
from agentgc import AgentGC

async def main():
    # Async alternate constructor — Python's __init__ can't be async,
    # so uniffi maps the async constructor to AgentGC.open(...).
    gc = await AgentGC.open(
        sqlite_url="sqlite:agent.db",
        azure_endpoint="https://your-resource.cognitiveservices.azure.com",
        azure_api_key="...",
        azure_deployment="gpt-5.5",
        azure_api_version="2025-04-01-preview",
        model="gpt-5.5",
    )

    memory = await gc.extract("user:alice", "I prefer dark mode")
    if memory is not None:
        print(memory.content)

    matches = await gc.retrieve("user:alice", "dark", 10)
    state = await gc.consolidate("main", "noisy log here...")
    print(state.learned_rules)
    if state.active_task is not None:
        print(state.active_task.intent, state.active_task.status)

asyncio.run(main())

Build the Python wheel

We use maturin (recommended for Rust+Python projects). From this directory:

# uv environment with maturin
uv venv
uv pip install maturin

# Build a wheel for the current platform
uv run maturin build --release

# Or develop-install for iteration
uv run maturin develop --release

The wheel lands in target/wheels/. Install with:

uv pip install target/wheels/agentgc-*.whl

Generate UDL bindings manually

If you need raw uniffi bindings without maturin's wheel pipeline:

# Build the dylib first
cargo build --release

# Generate Python bindings from the UDL
cargo run --bin uniffi-bindgen -- \
    generate src/agentgc.udl \
    --language python \
    --out-dir bindings/python

This produces agentgc.py plus a .dylib / .so / .dll that must be on LD_LIBRARY_PATH (or DYLD_LIBRARY_PATH on macOS).

Status

  • ✅ Crate scaffolding, UDL definition, Rust wrappers compile.
  • ⏳ Python wheel build verification (requires maturin + Python env).
  • ⏳ TypeScript bindings (defer until Python is in users' hands).
  • ⏳ Integration tests against a real Azure OpenAI key (manual smoke test).

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

agentgc-0.0.4-py3-none-win_amd64.whl (4.5 MB view details)

Uploaded Python 3Windows x86-64

agentgc-0.0.4-py3-none-musllinux_1_2_x86_64.whl (5.1 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

agentgc-0.0.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

agentgc-0.0.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

File details

Details for the file agentgc-0.0.4-py3-none-win_amd64.whl.

File metadata

  • Download URL: agentgc-0.0.4-py3-none-win_amd64.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentgc-0.0.4-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 3afae1154f3aeeb8a6919c85f63de25258dc1a71f095d24a5944e7d4e47877fe
MD5 1dab6309fb06f54b9cf05a38dbfa02fb
BLAKE2b-256 96976ab2ec407b720ff652cef1ace656db548236eeca8afda119a1095d0acc94

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentgc-0.0.4-py3-none-win_amd64.whl:

Publisher: publish-python-wheels.yml on carrickcheah/agentgc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentgc-0.0.4-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for agentgc-0.0.4-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b01441a156c4c652a83e3ac85e0985e51d6d7e224b6601c41064dbc17fda0079
MD5 d6e26a1803104717f574a374157c0871
BLAKE2b-256 74137c667d612a75185da7b05e72ea842f23b2f2a8c07afc019a5cff11689395

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentgc-0.0.4-py3-none-musllinux_1_2_x86_64.whl:

Publisher: publish-python-wheels.yml on carrickcheah/agentgc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentgc-0.0.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for agentgc-0.0.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 83b9f62b6414e33bf02ba41e24cbc71106be87e9748b3ce153f21fecb2eba66a
MD5 6b009d5da4d9e6ffb5df6ed4b30d261a
BLAKE2b-256 7a3b120ea78f5e2cbfe12f8709dae3f125aa35e08d4d43b9dfb9dbf39306ad4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentgc-0.0.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-python-wheels.yml on carrickcheah/agentgc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentgc-0.0.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for agentgc-0.0.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 38b85e417fc4c8b2a7bb0becd3e5016a4be1b47af094f7d0688e0452e3431640
MD5 4777a7ec5389ecd2c0871b2474e0876b
BLAKE2b-256 ba5ccb79a45d046d88057d342e1ad8c8ee92cbe60b29343e95247ffb582bf1d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentgc-0.0.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish-python-wheels.yml on carrickcheah/agentgc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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