Skip to main content

Context budget manager and conversation compressor for AI agents

Project description

context-compressor

Context budget manager and conversation compressor for AI agents.

Usage

from context_compressor import ContextCompressor

async def mock_summarize(prompt):
    return "## Active Task\n...\n\n## Goal\n..."

compressor = ContextCompressor(
    context_length=8000,
    summarize_callback=mock_summarize
)

Project details


Download files

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

Source Distribution

kindred_context_compressor-1.0.0.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

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

kindred_context_compressor-1.0.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file kindred_context_compressor-1.0.0.tar.gz.

File metadata

File hashes

Hashes for kindred_context_compressor-1.0.0.tar.gz
Algorithm Hash digest
SHA256 62269b9055954f6c784d285b131199813aef2ff33cf9dfac41fb760ff73490b0
MD5 c16187e7f46e54a63453549f9d95549f
BLAKE2b-256 24260d6a3e679785ae42d60c0c4aa6ae7c3b5817ba7b51a416bc41d438e3e2f6

See more details on using hashes here.

File details

Details for the file kindred_context_compressor-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for kindred_context_compressor-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 490d0a281f253ed4cce65d6f35f09c45b110a06a08da486fadcd6977c1242c39
MD5 a452a4f2fdeb2c257703fbd34485126c
BLAKE2b-256 14eb72f2f1c9ff11a6cf9b13243850f314856514f8b57acf75870a1deb9a1ccc

See more details on using hashes here.

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