Skip to main content

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

Metadata

Release files for langchain-mixpeek 0.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-mixpeek 0.4.3
File Size Uploaded
langchain_mixpeek-0.4.3.tar.gz 22.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-mixpeek 0.4.3
File Interpreter ABI Platform
langchain_mixpeek-0.4.3-py3-none-any.whl Python 3 none any Details

Total release size: 40.5 kB

Release files / langchain_mixpeek-0.4.3.tar.gz

Download URL langchain_mixpeek-0.4.3.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7985b4e7189c6bd29c9d7a12b044e0ccff76075e83113a3b58b9dc55d9768844
BLAKE2b-256 checksum
How to use checksums
0faae54c041aa0871ea839a8113d772dfaeccf631a4c9b4b18cb4b131ec80010
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.13

Release files / langchain_mixpeek-0.4.3-py3-none-any.whl

Download URL langchain_mixpeek-0.4.3-py3-none-any.whl
Size 17.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6dce63df47bd94403e9e4ac08d074206410706269b741cd2fd51d5cb65f97ce4
BLAKE2b-256 checksum
How to use checksums
0592df2454ec969aa8184c1cff5f21cc19404b260d727bae59965802f1e7e451
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.13

Release history Release notifications | RSS feed

This release

0.4.3 This release

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page