agentic-pydoc
Static Python codebase intelligence for AI agents.
Installation
Requires Python 3.13+.
Install as an isolated tool (recommended):
uv tool install agentic-pydoc
Or with pipx:
python -m pip install --user pipx
python -m pipx ensurepath
pipx install agentic-pydoc
Then verify the install from any directory:
agentic-pydoc --help
agentic-pydoc --version
Development
Contributors clone the repository and sync the environment instead:
git clone <repository-url>
cd agentic-pydoc
uv sync
uv run agentic-pydoc --help
Quick Start
Initialize and analyze a Python project:
cd /path/to/python-project
agentic-pydoc init # Create .agentic-pydoc.toml
agentic-pydoc install-skill # Install the agent skill (optional)
agentic-pydoc scan # Initial analysis
This creates .agentic-pydoc/ with the analysis index, modules, symbols, and relationships.
MCP Server (New!)
Expose codebase intelligence to AI agents via Model Context Protocol:
cd /path/to/python-project
agentic-pydoc-mcp
The MCP server provides 9 tools for progressive codebase navigation:
list_modules- List Python modules with paginationget_module- Get module details with symbols and importsfind_symbol- Search for symbols by name/patternget_symbol- Get full symbol details (signature, docstring, location)get_behavior- Get function behavior (raises, awaits, yields, returns)get_callers- Get all callers of a function/methodget_callees- Get all callees of a symbolget_inheritance- Get class inheritance hierarchyget_tests- Get test cases for a symbol
See MCP Server Documentation for complete API reference, examples, and integration guide.
Architecture
Agent (LLM)
↓
MCP Protocol (JSON-RPC)
↓
MCP Server
↓
Service Layer
↓
Knowledge Navigator (shared with CLI)
↓
Knowledge Store
↓
.agentic-pydoc/
Both CLI and MCP use the same underlying service layer, ensuring consistent results.
CLI Commands
Analysis Commands
agentic-pydoc scan # Full scan from scratch
agentic-pydoc update # Incremental update from last commit
agentic-pydoc check # Verify index is up to date
agentic-pydoc init # Write .agentic-pydoc.toml
agentic-pydoc install-skill # Install the agent skill
Navigation Commands
# Discovery
agentic-pydoc modules # List all modules
agentic-pydoc module <name> # Get module details
agentic-pydoc find <query> # Search for symbols
agentic-pydoc symbols --module <name> # List symbols in module
# Symbol inspection
agentic-pydoc symbol <symbol-id> # Get symbol details
agentic-pydoc source <symbol-id> # Get source code
agentic-pydoc behavior <symbol-id> # Get behavioral attributes
# Relationship navigation
agentic-pydoc callers <symbol-id> # Who calls this?
agentic-pydoc callees <symbol-id> # What does this call?
agentic-pydoc dependencies <symbol-id> # All dependencies
agentic-pydoc dependents <symbol-id> # All dependents
agentic-pydoc inheritance <class-id> # Class hierarchy
agentic-pydoc tests <symbol-id> # Associated tests
# History
agentic-pydoc history # Git history
agentic-pydoc diff <rev-a> <rev-b> # Semantic diff
All navigation commands support --format json for programmatic use.
Project Intelligence vs Documentation
Three responsibilities stay separate:
- Source code is the source of truth.
.agentic-pydoc/holds machine-readable project intelligence for agents:index.json,state.json,modules/,symbols/,relationships/.docs/holds human-facing documentation only.
agentic-pydoc scan writes the analysis under .agentic-pydoc/ and the
machine-oriented renderings under .agentic-pydoc/docs/ by default
(output.directory keeps custom locations when configured). It never writes
to docs/ by default, and existing docs/ content is left untouched.
Using the Agent Skill
agentic-pydoc init only writes .agentic-pydoc.toml. Install the
agentic-pydoc skill separately:
agentic-pydoc install-skill
This installs .agents/skills/agentic-pydoc/SKILL.md (plus the
agentic-pydoc-docs and agentic-pydoc-setup skills). Pass --overwrite to
replace an existing installation. The skill tells an agent to:
- Prefer MCP when a server is available
- Use CLI navigation commands as fallback
- Read
.agentic-pydoc/index.jsonfor project overview - Treat analysis as context (not documentation)
- Never copy analysis into
docs/or documentation sites - Read source files when analysis is insufficient
With Docus / create-docs
Run agentic-pydoc init and agentic-pydoc install-skill in the analyzed
project, then point create-docs at the project. The skill instructs the agent
to use .agentic-pydoc/ (via MCP or CLI) as context for understanding modules
and symbols and to write human-oriented documentation in docs/ or the Docus
site — not to copy the analysis.
Documentation
- MCP Server - Complete MCP server reference
- MCP Examples - Usage examples and patterns
- MCP Workflow - Agent workflow guide
- MCP Limitations - Known constraints
- API Reference - CLI, models, analyzers
- Incremental Indexing - Architecture details
- Publishing - PyPI token authentication and publishing guide
Testing
# All tests
uv run pytest
# MCP tests only
uv run pytest tests/mcp/ -v
# Specific test suites
uv run pytest tests/mcp/test_errors.py -v
uv run pytest tests/mcp/test_service.py -v
uv run pytest tests/mcp/test_server.py -v
uv run pytest tests/mcp/test_cli_mcp_consistency.py -v
License
MIT
Metadata
Release files for agentic-pydoc 0.1.31
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 | |
|---|---|---|---|---|
| agentic_pydoc-0.1.31.tar.gz | 162.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentic_pydoc-0.1.31-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 234.7 kB
Release files / agentic_pydoc-0.1.31.tar.gz
| Download URL | agentic_pydoc-0.1.31.tar.gz |
|---|---|
| Size | 162.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08de30fca70b11c85624d6407774b3c0be6a7e099b40e99fda0fab174bd8cd7b
|
|
BLAKE2b-256 checksum How to use checksums |
00ae4d2a5a304b7f70a30b4a6985a26187dc71b56f985b575103fcda40e8ff50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / agentic_pydoc-0.1.31-py3-none-any.whl
| Download URL | agentic_pydoc-0.1.31-py3-none-any.whl |
|---|---|
| Size | 72.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eaceca33420ed5ef884606e7f9b9f2123f3abfab053d54980e4ae8b4e4fa1f2e
|
|
BLAKE2b-256 checksum How to use checksums |
3b2a65fb271d8f0cf65bb23f106abdef72f4a6d9b93235754eaec3f7b377ace9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for agentic-pydoc 0.1.31
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.