Python SDK Reference
The CiteKit Python SDK is a local-first toolkit for multimodal agentic workflows. It is designed for high-performance ingestion and deterministic resolution.
Quick Navigation
| Component | Responsibility | link |
|---|---|---|
| CiteKitClient | Main entry point, caching, and orchestration. | Client API |
| Mappers | Analyzing and tree-generation (Gemini/Local). | Mappers API |
| Resolvers | Physical clipping (FFmpeg/PyMuPDF). | Resolvers API |
| Models | Pydantic schemas for maps and nodes. | Data Models |
| Utilities | Aggregation helpers (create agent context). | Utilities |
Philosophy
The Python SDK prioritizes asynchronous performance (via asyncio) and strict schema validation (via Pydantic). It is the core engine used by the CiteKit CLI and MCP server.
Utilities
create_agent_context(maps: list[ResourceMap], format: str = "markdown") -> str
Aggregates multiple ResourceMap objects into a single context string for LLM use.
build_address(resource_id: str, location: Location) -> str
Builds a CiteKit URI address for a location.
parse_address(address: str) -> tuple[str, Location]
Parses a CiteKit URI address into (resource_id, Location).