Skip to main content

LangChain OpenDMA

Integrate LangChain with Enterprise Content Management systems such as Alfresco, CMOD, Documentum, FileNet P8, OnBase, SharePoint, and other platforms.

OpenDMA is a vendor-neutral abstraction layer for Enterprise Content Management. It provides a common API for repositories allowing developers to build applications that access content stored on different platforms, including federating across multiple repositories.

This package connects that API to LangChain by loading and retrieving OpenDMA documents as langchain_core.documents.Document objects.

A convenient Toolkit allows agentic applications to browse through complex repository layouts to retrieve information.

See our examples and tutorials to learn how to build RAG pipelines and tool-calling agents.

Features

  • Tools to browse an ECM repository, e.g. to enable agents to discover relevant documents.
  • Tools for reading text chunks of documents, e.g. to allow agents to read sections of documents.
  • Load documents by document ID, folder ID, or query, e.g. to build a knowledge base.
  • Use LangChain's retriever API for full text search, e.g. to use an existing repository as knowledge base.
  • Preserve full metadata on every LangChain Document, e.g. to scope RAG retrieval to a subset of relevant items.
  • Process richer document formats with optional Unstructured or Docling handlers.

Installation

Install OpenDMA and this integration from PyPI:

pip install langchain-opendma

Install optional parser integrations when you need Office, PDF, HTML, images, or other rich formats:

pip install "langchain-opendma[unstructured]"
pip install "langchain-opendma[docling]"
pip install "langchain-opendma[all]"

Quickstart

from langchain_opendma import OpenDMALoader

loader = OpenDMALoader(
    endpoint="http://localhost:8080/opendma",
    username="admin",
    password="admin",
    repository_id="my-repository",
    document_ids=["some-document-id"],
)

documents = loader.load()

for document in documents:
    print(document.metadata["source"])
    print(document.metadata.get("opendma:Title"))
    print(document.page_content)

By default, OpenDMALoader handles text/plain content. For PDF, Office, HTML, image, and other rich formats, configure an Unstructured or Docling content handler. See the content handler documentation for details.

Use OpenDMARetriever when you want LangChain to call an OpenDMA search as part of a retrieval pipeline:

from langchain_opendma import OpenDMARetriever

retriever = OpenDMARetriever(
    endpoint="http://localhost:8080/opendma",
    username="admin",
    password="admin",
    repository_id="my-repository",
    query_language="opendma:sfts",
)

documents = retriever.invoke("needle keyword")

The OpenDMAToolkit provides various tools to allow agents to browse repository layouts and read sections of text documents:

from langchain_opendma import OpenDMAToolkit
from langchain_opendma.content_handlers import DoclingLoaderContentHandler
from langchain.agents import create_agent
from langchain.chat_models import init_chat_model

toolkit = OpenDMAToolkit(
    endpoint="http://localhost:8080/opendma",
    username="ignored",
    password="ignored",
    repository_id="sample-repo",
    content_handlers=[DoclingLoaderContentHandler()],
)

agent = create_agent(
    model=init_chat_model("openai:gpt-4o-mini"),
    tools=toolkit.get_tools(),
    system_prompt="You are...",
)

result = agent.invoke(
    {"messages": [{"role": "user", "content": "Where can I find the latest meeting notes of project orion?"}]}
)
print(result["messages"][-1].content)

Documentation

  • Tutorials: guided LangChain application tutorials
  • Documentation: usage, loader options, and content handlers
  • Examples: runnable examples using the tutorial repository

Development

This project uses uv for dependency management.

uv sync --all-extras
uv run pytest
uv run ruff check src tests
uv run mypy src tests

Related Projects

Download files

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

Source Distribution

langchain_opendma-0.3.0.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

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

langchain_opendma-0.3.0-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

File details

Details for the file langchain_opendma-0.3.0.tar.gz.

File metadata

  • Download URL: langchain_opendma-0.3.0.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for langchain_opendma-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d418af886d6232c3cce66b49535e30d0a6eaf815c3b2ec95b8ebcf8501b37531
MD5 11c70e633e90dd0ae02be78b0ce93fd0
BLAKE2b-256 50d57ebf7c36f6b152fe0d037daa3bb538b6569fbf0cb43c35bfafe9405b37b5

See more details on using hashes here.

File details

Details for the file langchain_opendma-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: langchain_opendma-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 25.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for langchain_opendma-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c093f2f4e3af395010bbc0eae8012ba78f68d5b7f924a9a7acd119f828fa3fbf
MD5 25cdd29679285988a643e7e661c3137c
BLAKE2b-256 7a58951e9547685c32af26e3f88631fb632621dc6040aa8e52ee5d576037f52c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.2.0

2 files

0.1.0

2 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