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
Metadata
Release files for langchain-opendma 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| langchain_opendma-0.3.0.tar.gz | 22.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_opendma-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.4 kB
Release files / langchain_opendma-0.3.0.tar.gz
| Download URL | langchain_opendma-0.3.0.tar.gz |
|---|---|
| Size | 22.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d418af886d6232c3cce66b49535e30d0a6eaf815c3b2ec95b8ebcf8501b37531
|
|
BLAKE2b-256 checksum How to use checksums |
50d57ebf7c36f6b152fe0d037daa3bb538b6569fbf0cb43c35bfafe9405b37b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / langchain_opendma-0.3.0-py3-none-any.whl
| Download URL | langchain_opendma-0.3.0-py3-none-any.whl |
|---|---|
| Size | 25.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c093f2f4e3af395010bbc0eae8012ba78f68d5b7f924a9a7acd119f828fa3fbf
|
|
BLAKE2b-256 checksum How to use checksums |
7a58951e9547685c32af26e3f88631fb632621dc6040aa8e52ee5d576037f52c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Security for langchain-opendma 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.