Semantic Signal Extraction for the Age of AI Agents.
Most AI coding agents (Claude, Cursor, etc.) understand Python libraries through outdated training data, static docstrings, or high-level type hints. When they encounter undocumented behavior, internal exception flows, or complex framework patterns (Pydantic, FastAPI), they hallucinate.
agentsrc-py bridges this gap. It fetches, unpacks, and performs AST-level analysis on the exact version of the dependencies you are using, exposing the "ground truth" of the source code directly to your agent.
| Feature | Generic RAG / Search | Documentation Sites | agentsrc-py |
|---|---|---|---|
| Source of Truth | Web Crawls (Old) | Docs (High-level) | Exact Source (Current) |
| Version Aware | Rarely | Partial | 100% (Matches your Env) |
| Deep Semantics | No | No | Yes (AST Analysis) |
| Agent Ready | Manual ingest | Browser needed | Native Manifests/Markdown |
The fastest way to give your agent dependency "superpowers".
# 1. Install via uv (recommended) or pip
uv tool install agentsrc-py
# 2. In your project root, initialize and sync
agentsrc init
agentsrc sync
# 3. Watch your agent stop hallucinating.- 🎯 Deep AST Analysis: Extracts classes, functions, and internal decorators into structured JSON/Markdown.
- 🔌 Smart Framework Plugins: Native understanding of Pydantic Models, FastAPI Routes, and SQLAlchemy Relationships.
- 📦 Version-Locked Fetching: Automatically resolves and downloads the exact package version from PyPI based on your
uv.lockorvenv. - 🔍 Global Symbol Search: Instantly find any symbol across your entire dependency tree.
- 🚀 Built with uv: Blazing fast performance and reproducible environments.
The following pipeline illustrates how agentsrc-py transforms raw PyPI packages into actionable semantic intelligence:
graph TD
A[CLI / API] -->|Resolves Env| B[ProjectResolver]
B -->|Fetches sdist/wheel| C[PackageFetcher]
C -->|Content-Addressed| D[Local Cache]
D -->|AST Parsing| E[AnalysisEngine]
E -->|Framework Semantics| F[Plugin System]
F -->|Symbol Mapping| G[Manifests & Markdown]
G -->|Context Ingestion| H[AI Coding Agent]
style H fill:#f96,stroke:#333,stroke-width:2px
style A fill:#bbf,stroke:#333,stroke-width:2px
agentsrc-py generates an instructions.md (and a universal AGENTS.md) at your project root. Simply point your agent to these files:
- Cursor: Add
.agentsrc/to your context. - Claude Code: The agent will automatically find
AGENTS.md. - Roo-Code: Use the
read_filetool on.agentsrc/sources.json.
We are currently in v0.1.0 (Alpha). We love contributions, especially new framework plugins!
- Support for Poetry and Pipenv lockfiles.
- MCP (Model Context Protocol) Server for real-time querying.
- Deep transitive dependency analysis.
Please see CONTRIBUTING.md and ROADMAP.md for more details.
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ for the AI Developer Community.
