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.2-py3-none-win_amd64.whl (4.8 MB view details)

Uploaded Python 3Windows x86-64

agentgc-0.0.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

agentgc-0.0.2-py3-none-macosx_11_0_arm64.whl (5.0 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

agentgc-0.0.2-py3-none-macosx_10_12_x86_64.whl (5.2 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: agentgc-0.0.2-py3-none-win_amd64.whl
  • Upload date:
  • Size: 4.8 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.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 3997efbd15282eefdb13a0d2c93b0c48bcf7f8bb8a79033c6e64740281067af6
MD5 a1a7c006314474098ae046baa328b8fd
BLAKE2b-256 672fa80cdce57712ca80239c333766db1d7e914323924eb617924c1a0c30e7b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentgc-0.0.2-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.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for agentgc-0.0.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 10b8483ec0de19dc6b5b0ef3318f77b6c9bd87821946cce2f9fc315569f0b336
MD5 ea9f1398d19185c19f4ecaa460797e98
BLAKE2b-256 db5a4fab900e10eb83e29c6e4fc899e99c4cecd9f7bb07dbc3b73928066f9de8

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentgc-0.0.2-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.2-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for agentgc-0.0.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 81c88e52b78fbf0ba885692cecd73eb8dee9c0234f547a36a2510fd5e10cc485
MD5 51b5bf471dd13370965698495e9642c0
BLAKE2b-256 e87a531d2fdea26653928c4b65101b10777e9dc6287742ddd2b3e634bf031359

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentgc-0.0.2-py3-none-macosx_11_0_arm64.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.2-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for agentgc-0.0.2-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f486bf44b6adec4e744b0afa09d20962df0b345f57e70cb5bab6a4f6d369aa1d
MD5 9b95c81f4c226e3885a264b7b2bb2d12
BLAKE2b-256 cfeb7db70a467dad4d08edd9413ad11f21e8cd1676e464615c15ee1934d81b58

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentgc-0.0.2-py3-none-macosx_10_12_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.

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