Skip to main content

Memory - Document ingestion engine. Chunks and indexes knowledge sources into Qdrant to power LiveKit agent's contextual retrieval.

Project description

livekit-memory

Document ingestion engine. Chunks and indexes knowledge sources into Qdrant to power LiveKit agent's contextual retrieval.

Installation

pip install livekit-memory

Usage

CLI

Ingest documents:

# Ingest a markdown file to Qdrant Cloud
livekit-memory ingest document.md --type markdown --collection my-docs \
    --url https://your-cluster.qdrant.io --api-key $QDRANT_API_KEY

# Ingest to localhost Qdrant (no API key required)
livekit-memory ingest --url localhost --collection my-docs --file document.md --type markdown

Query documents:

# Query from Qdrant Cloud
livekit-memory query --url https://your-cluster.qdrant.io --api-key $QDRANT_API_KEY \
    --collection my-docs --query "What is the main topic?"

# Query from localhost
livekit-memory query --url localhost --collection my-docs --query "What is the main topic?"

Migrate between Qdrant instances:

# Migrate from cloud to localhost
livekit-memory migrate \
    --source-url https://your-cluster.qdrant.io --source-api-key $QDRANT_API_KEY \
    --dest-url localhost \
    --collection my-docs

Python API

import asyncio
from livekit_memory import FastRAGPipeline, RAGConfig, QdrantConfig, EmbeddingConfig

async def main():
    config = RAGConfig(
        qdrant=QdrantConfig(
            url="localhost",
            collection_name="my-docs",
        ),
        embedding=EmbeddingConfig(
            model_name="BAAI/bge-small-en-v1.5",
        ),
    )

    pipeline = FastRAGPipeline(config)
    await pipeline.initialize_collection()

    # Ingest documents
    await pipeline.ingest_documents(["Document content here..."])

    # Retrieve context
    result = await pipeline.retrieve_context("What is this about?", top_k=5)
    print(result.top_result)

asyncio.run(main())

License

Apache-2.0

Project details


Download files

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

Source Distribution

livekit_memory-0.2.5.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

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

livekit_memory-0.2.5-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file livekit_memory-0.2.5.tar.gz.

File metadata

  • Download URL: livekit_memory-0.2.5.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for livekit_memory-0.2.5.tar.gz
Algorithm Hash digest
SHA256 067f0f1113a0c7d4bba3a9b42b37f4ae6f62178ad2a5628d2b172be08a788e6f
MD5 63113e8ac4b2b7a25ce14c6105f651b7
BLAKE2b-256 809a39018da1cc4efd428a567eddf7bdfa70fce3c5a2c4bcd57dd82d4d2651e7

See more details on using hashes here.

File details

Details for the file livekit_memory-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: livekit_memory-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for livekit_memory-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bf4c534b184a21749a9bc729b944a65d5f12bb711ec0a0a82e7d2806a673f027
MD5 242e0f849430b9a9038eacb0be671912
BLAKE2b-256 22d6075b68bed8b615b07850fa9a9dd11324fe556229fcde3e2fcb100a8cc426

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page