Quickstart
uv add lexigram-vectorInstall the backend driver for your vector store:
uv add "lexigram-vector[pgvector]" # PostgreSQL + pgvectoruv add "lexigram-vector[qdrant]" # Qdrantuv add "lexigram-vector[pinecone]" # Pineconeuv add "lexigram-vector[chroma]" # ChromaDBuv add "lexigram-vector[weaviate]" # Weaviateuv add "lexigram-vector[all]" # Every backendMinimal Example
Section titled “Minimal Example”import asynciofrom lexigram import Applicationfrom lexigram.vector import VectorModule
async def main() -> None: async with Application.boot( name="vector-demo", modules=[VectorModule.configure()], ) as app: store = await app.container.resolve(VectorStoreProtocol) await store.create_collection( CollectionConfig(name="my_docs", dimension=1536) ) print("Collection ready!")
asyncio.run(main())What Just Happened
Section titled “What Just Happened”VectorModule.configure()created aVectorProviderwith default config (in-memory backend).- The provider registered
VectorStoreProtocolandVectorCollectionProtocolin the container. - An in-memory
MemoryVectorStorewas created and connected duringboot(). store.create_collection()created a vector collection capable of storing 1536-dimensional embeddings.
Next Steps
Section titled “Next Steps”- Guide — mental model, core concepts, common patterns
- Configuration — all config keys and env vars
- How-Tos — copy-pasteable recipes