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

Uploaded Python 3Windows x86-64

agentgc-0.0.1-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.1-py3-none-macosx_11_0_arm64.whl (5.0 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

agentgc-0.0.1-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.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: agentgc-0.0.1-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.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 defc38c1fe0f6f096e4c02bd2916486c2799d06ef79d5313cfdd605ea2a7ff38
MD5 84498c76f7a602d912bda53302cc9567
BLAKE2b-256 41c5e3f2e48de48ee7d730c01bab774bd6f24789e816b4a4705a78e8f41d04e0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for agentgc-0.0.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 26158ffb4afd82c82cf4e25131ed0e5ba7b15bc3f7c3fcae0d545049f3c8d909
MD5 c1528775a3d54e4ee5a8bf459024c336
BLAKE2b-256 9e539c447c97d4462d8ca54ab78bd454130c49dc9dbda8a9587748693eae9e0d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for agentgc-0.0.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9c3a9b181da0e7c2413d7f334fb90b3867989027fc0d8e410716dedfbf84cadb
MD5 07e3f1f133a8eae8eb1e07fc46eb2198
BLAKE2b-256 fe2133fbea133b32e61c10d35334b21db12761b20f9c7064febc31efc5cb3b36

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for agentgc-0.0.1-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ab9e78ed097ca47fbbb4c67eb0483d08163370d3671c26aecd65c08c66821bbc
MD5 77bf862368bd62389cb373ca19655510
BLAKE2b-256 fe2ef8f32829b137783c02c2e699f79b85b4e4235fc1009bbf1e7836cc4a7d2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentgc-0.0.1-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