Releases: Verdenroz/agon-python
Releases · Verdenroz/agon-python
v0.2.0
AGON v0.2.0
What's Changed
- Feat/rust bindings @Verdenroz (#6)
- Full Changelog: v0.1.0...v0.2.0
Supported platforms:
- Linux: x86_64, aarch64 (manylinux)
- macOS: x86_64 (Intel), aarch64 (Apple Silicon)
- Windows: x64
- Python: 3.11, 3.12, 3.13
Rust Core Implementation
The entire encoding/decoding engine has been rewritten in Rust (~4,000 lines) and exposed via PyO3:
AGONRows: Row-based tabular encodingAGONColumns: Columnar transpose encodingAGONStruct: Template-based encoding- Parallel format evaluation with rayon
- Fast byte-length token estimation (opt-in tiktoken)
Format Rename: AGONText → AGONRows
from agon import AGON, AGONRows
# New (recommended)
result = AGON.encode(data, format="rows")Token Counting Options
# Fast estimation (default, uses len/4 heuristic)
result = AGON.encode(data, format="auto")
# Accurate tiktoken counting (slower but precise)
result = AGON.encode(data, format="auto", encoding="o200k_base")Documentation
- Full docs: https://verdenroz.github.io/agon-python/
- API Reference: https://verdenroz.github.io/agon-python/api/
- Benchmarks: https://verdenroz.github.io/agon-python/benchmarks/
For Contributors
Development now requires the Rust toolchain:
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Build and test
uv sync --dev
make build
uv run pytestFull Changelog
Added
- Rust core implementation with PyO3 bindings (
crates/agon-core/) - Parallel format evaluation using rayon
- Fast byte-length token estimation as default
- Cross-platform wheel builds (Linux, macOS, Windows)
- Comprehensive performance benchmarks in documentation
Changed
- Renamed
AGONText→AGONRowsthroughout codebase and docs - Moved Python code from
src/topython/ - Updated CI/CD for Rust + Python hybrid builds
- Pre-commit hooks now include Rust linting
v0.1.0
v0.1.0
Initial Release - Adaptive Guarded Object Notation for LLM prompt optimization
What's Changed
New Features
- Add AGONText/AGONColumns format codec for encoding/decoding structured data (07e4054)
- Add AGONStruct format for template-based encoding (bdbda41)
- Hide headings by default on encoding (d11bf63)
Documentation
- Create MkDocs documentation site (98decf9)
Core Features:
- Three adaptive encoding formats: Text, Columns, and Struct
- Guaranteed never worse than JSON
- Token-efficient encoding for LLM prompts
- Lossless round-trip encoding/decoding
Full Changelog: https://github.com/Verdenroz/agon-python/commits/v0.1.0