Skip to main content

Give your LangChain agents eyes, ears, and memory — multimodal search, ingestion, and monitoring for video, images, audio, and documents

Project description

langchain-mixpeek

PyPI - Version PyPI - Downloads PyPI - License Python Tests

AI agents are blind. Mixpeek gives them eyes, ears, and memory.

The official LangChain integration for Mixpeek — the infrastructure layer that lets AI agents search video, images, audio, and documents through one API.

Quick install

pip install langchain-mixpeek

What's inside

Component Class What it does
Retriever MixpeekRetriever Search across video, images, audio, documents — returns LangChain Document objects
Tool MixpeekTool Standalone agent tool for search — returns JSON for LLM consumption
Toolkit MixpeekToolkit 6-tool suite: search, ingest, process, classify, cluster, alert
VectorStore MixpeekVectorStore Full CRUD — ingest any file type, search, and manage platform features
Async AsyncMixpeekRetriever Non-blocking retriever for async chains and agents

Usage

Retriever

from langchain_mixpeek import MixpeekRetriever

retriever = MixpeekRetriever(
    api_key="mxp_...",
    retriever_id="ret_abc123",
    namespace="my-namespace",
)
docs = retriever.invoke("find the red cup")

One-line agent tool

tool = retriever.as_tool()  # that's it — retriever becomes an agent tool

Agent with 6 capabilities

from langchain_mixpeek import MixpeekToolkit
from langgraph.prebuilt import create_react_agent
from langchain_anthropic import ChatAnthropic

toolkit = MixpeekToolkit(
    api_key="mxp_...",
    namespace="brand-protection",
    bucket_id="bkt_...",
    collection_id="col_...",
    retriever_id="ret_...",
)

agent = create_react_agent(
    ChatAnthropic(model="claude-sonnet-4-20250514"),
    toolkit.get_tools(),
)

result = agent.invoke({
    "messages": [("user", "Scan these product URLs and alert me about counterfeits")]
})

The toolkit gives your agent:

Tool Capability
mixpeek_search Search video, images, audio, documents by natural language
mixpeek_ingest Upload text, images, video, audio, PDFs, spreadsheets
mixpeek_process Trigger feature extraction (embedding, OCR, transcription, face detection)
mixpeek_classify Run taxonomy classification on documents
mixpeek_cluster Group similar documents (kmeans, dbscan, hdbscan)
mixpeek_alert Monitor content with webhook, Slack, or email notifications

Scope what your agent can do:

toolkit.get_tools(actions=["search"])                         # search only
toolkit.get_tools(actions=["search", "ingest", "process"])    # search + upload
toolkit.get_tools()                                           # all 6 tools

VectorStore — ingest any file type

from langchain_mixpeek import MixpeekVectorStore

store = MixpeekVectorStore(
    api_key="mxp_...",
    namespace="my-namespace",
    bucket_id="bkt_...",
    collection_id="col_...",
    retriever_id="ret_...",
)

# Eyes: images and video
store.add_images(["https://example.com/photo.jpg"])
store.add_videos(["https://example.com/clip.mp4"])

# Ears: audio
store.add_audio(["https://example.com/recording.mp3"])

# Memory: text, PDFs, spreadsheets
store.add_texts(["product description..."])
store.add_pdfs(["https://example.com/doc.pdf"])
store.add_excel(["https://example.com/data.xlsx"])

# Process everything (embedding, OCR, face detection, transcription)
store.trigger_processing()

# Search across all modalities
docs = store.similarity_search("red cup on the table")

Convert between interfaces anytime:

retriever = store.as_retriever()
tool = store.as_tool()
toolkit = store.as_toolkit()

RAG chain

from langchain_core.prompts import ChatPromptTemplate
from langchain_anthropic import ChatAnthropic
from langchain_mixpeek import MixpeekRetriever

retriever = MixpeekRetriever(api_key="mxp_...", retriever_id="ret_...", namespace="ns")
llm = ChatAnthropic(model="claude-sonnet-4-20250514")

prompt = ChatPromptTemplate.from_template(
    "Answer using this context:\n{context}\n\nQuestion: {question}"
)

chain = {"context": retriever, "question": lambda x: x} | prompt | llm
response = chain.invoke("what happens at 2 minutes?")

Multi-retriever agent

from langchain_mixpeek import MixpeekTool
from langgraph.prebuilt import create_react_agent

video_search = MixpeekTool(
    api_key="mxp_...", retriever_id="ret_video", namespace="archive",
    name="search_videos", description="Search video archive for scenes or faces.",
)
image_search = MixpeekTool(
    api_key="mxp_...", retriever_id="ret_images", namespace="catalog",
    name="search_images", description="Search product images by visual similarity.",
)

agent = create_react_agent(llm, [video_search, image_search])

Configuration

Parameter Type Default Description
api_key str required Mixpeek API key (mxp_...)
retriever_id str required Retriever ID for search (ret_...)
namespace str required Namespace to operate in
bucket_id str required* Bucket for uploads (bkt_...)
collection_id str required* Collection for processing (col_...)
top_k int 10 / 5 Max results (retriever / tool)
content_field str "text" Field to use as page_content
filters dict None Attribute filters for retriever

*Required for ingest/processing. Not needed for search-only via from_retriever().

Platform features

The VectorStore and Toolkit expose the full Mixpeek platform beyond search:

  • Taxonomies — create and run classification pipelines on your documents
  • Clusters — group similar content with kmeans, dbscan, hdbscan, or spectral clustering
  • Alerts — monitor for matches and notify via webhook, Slack, or email
  • Plugins — manage and test custom feature extractors

Documentation

License

MIT

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

langchain_mixpeek-0.4.3.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

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

langchain_mixpeek-0.4.3-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file langchain_mixpeek-0.4.3.tar.gz.

File metadata

  • Download URL: langchain_mixpeek-0.4.3.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for langchain_mixpeek-0.4.3.tar.gz
Algorithm Hash digest
SHA256 7985b4e7189c6bd29c9d7a12b044e0ccff76075e83113a3b58b9dc55d9768844
MD5 275eef6596bbe764ade69e43bb1a0b44
BLAKE2b-256 0faae54c041aa0871ea839a8113d772dfaeccf631a4c9b4b18cb4b131ec80010

See more details on using hashes here.

File details

Details for the file langchain_mixpeek-0.4.3-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_mixpeek-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6dce63df47bd94403e9e4ac08d074206410706269b741cd2fd51d5cb65f97ce4
MD5 6f39cd3719a00fd48de03f698e1ecbc0
BLAKE2b-256 0592df2454ec969aa8184c1cff5f21cc19404b260d727bae59965802f1e7e451

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