Skip to content

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 ​

ComponentResponsibilitylink
CiteKitClientMain entry point, caching, and orchestration.Client API
MappersAnalyzing and tree-generation (Gemini/Local).Mappers API
ResolversPhysical clipping (FFmpeg/PyMuPDF).Resolvers API
ModelsPydantic schemas for maps and nodes.Data Models
UtilitiesAggregation 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).

Released under the MIT License.