Skip to main content

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 config and install skill
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 pagination
  • get_module - Get module details with symbols and imports
  • find_symbol - Search for symbols by name/pattern
  • get_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/method
  • get_callees - Get all callees of a symbol
  • get_inheritance - Get class inheritance hierarchy
  • get_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       # Initialize config and install 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 installs the agentic-pydoc skill:

agentic-pydoc init

This writes .agentic-pydoc.toml when missing and installs .agents/skills/agentic-pydoc/SKILL.md. The skill tells an agent to:

  • Prefer MCP when a server is available
  • Use CLI navigation commands as fallback
  • Read .agentic-pydoc/index.json for 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 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

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

Download files

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

Source Distribution

agentic_pydoc-0.1.6.tar.gz (124.7 kB view details)

Uploaded Source

Built Distribution

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

agentic_pydoc-0.1.6-py3-none-any.whl (58.5 kB view details)

Uploaded Python 3

File details

Details for the file agentic_pydoc-0.1.6.tar.gz.

File metadata

  • Download URL: agentic_pydoc-0.1.6.tar.gz
  • Upload date:
  • Size: 124.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.0

File hashes

Hashes for agentic_pydoc-0.1.6.tar.gz
Algorithm Hash digest
SHA256 4f5a535e0b5e4f017e319c26621bd4c5b46576a82add700167afdb34aa524367
MD5 d9a0f2bf7d6d6ba564aa7e8c0fd524fd
BLAKE2b-256 7b6a94ce9a905215842b075650c433d5f0f6e11a718d22314e32efa819d70c92

See more details on using hashes here.

File details

Details for the file agentic_pydoc-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: agentic_pydoc-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 58.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.0

File hashes

Hashes for agentic_pydoc-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 af08d4179b421005c651dd9d6f0aa57de3d9bf405c7189ce80fa0fd442a0e3ea
MD5 0b7e9c8ae6b36c5e2e48385784ffeb75
BLAKE2b-256 574b1c48d53a2e368909eae642ece28a71dd47d7f5038a2805d77f32af1735c6

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.19

2 files

0.1.17

2 files

0.1.14

2 files

This release

0.1.6 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page