agent-code-context
agent-code-context is a Python library and CLI tool that extracts structured, token-efficient context bundles from Python codebases. By analyzing the Abstract Syntax Tree (AST), it generates symbol indexes, dependency graphs, and dead code reports. This allows AI coding agents to understand the architecture and relationships of a codebase without consuming unnecessary tokens on full file contents.
Problem Statement
AI coding agents (like those built with LangChain, AutoGen, or custom LLM wrappers) often struggle with large codebases because passing entire files or directories quickly exceeds context window limits. Developers currently lack a lightweight, standalone tool to extract just the "skeleton" of a codebase—what exists, where it lives, and how it connects. agent-code-context solves this by providing a token-efficient summary of the code structure, enabling agents to make informed decisions about which specific files to read next.
Features
- Symbol Indexing: Extracts classes, functions, and their signatures (arguments and type hints) across the project.
- Dependency Graphing: Maps internal import relationships to show which modules depend on which.
- Dead Code Detection: Heuristically identifies public functions and classes that are never imported or called within the project.
- Token-Efficient Output: Formats output as compact JSON or structured Markdown optimized for LLM context windows.
- CLI Interface: Allows easy integration into shell-based agent workflows.
Installation
Metadata
Release files for agent-code-context 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_code_context-0.1.0.tar.gz | 5.8 kB | Without provenance | Details for agent_code_context-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_code_context-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agent_code_context-0.1.0-py3-none-any.whl |
Total release size: 14.2 kB
Release files / agent_code_context-0.1.0.tar.gz
| Download URL | agent_code_context-0.1.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f986cc987e695e23bf6485b4ec26e5cd61210c172275fd6eaf86be14d0152fbd
|
|
BLAKE2b-256 checksum How to use checksums |
0f9668685ef3753bf3f5cb2fb9365eae22b426a1ffb3086edba244e90e58f96a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.14 Darwin/24.6.0
|
Release files / agent_code_context-0.1.0-py3-none-any.whl
| Download URL | agent_code_context-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1bcd147c137a63c72fc1d978f3df6890dd12b6384a6b229e1d459c92188a43e5
|
|
BLAKE2b-256 checksum How to use checksums |
8ae7dee4902a0c4e072a7ac7b3e1e2c5b2aecae2b7e3d4fc6c64bd43dc329e79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.14 Darwin/24.6.0
|
Security for agent-code-context 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.