crewai-xberg
CrewAI tools backed by Xberg. Give an agent document intelligence: extract text, metadata, keywords, entities, and summaries from 107 file formats — PDF, DOCX, XLSX, HTML, images with OCR, and more. Extraction is async at the core; the batch tool routes many files through Xberg's extract_batch in a single native call.
Install
pip install crewai-xberg
Requires Python 3.10+.
Tools
| Tool | Input | Returns |
|---|---|---|
XbergExtractTool |
file_path |
Extracted text, plus any requested rich results. |
XbergExtractBatchTool |
file_paths |
One section per document via extract_batch, then errors. |
XbergExtractMetadataTool |
file_path |
Title, authors, dates, page/table/image counts, format info. |
Use
from crewai import Agent
from crewai_xberg import XbergExtractTool, XbergExtractBatchTool, XbergExtractMetadataTool
agent = Agent(
role="Document Analyst",
goal="Extract and analyze document content",
backstory="You process documents of any format.",
tools=[XbergExtractTool(), XbergExtractBatchTool(), XbergExtractMetadataTool()],
)
Call a tool directly to see its output:
tool = XbergExtractTool()
# Plain extraction
text = tool.run(file_path="report.pdf")
# Force OCR and surface keywords, entities, and a summary
enriched = tool.run(
file_path="scan.pdf",
output_format="markdown",
force_ocr=True,
extract_keywords=True,
extract_entities=True,
summarize=True,
)
# Many files in one batched extraction
combined = XbergExtractBatchTool().run(file_paths=["report.pdf", "notes.docx", "sheet.xlsx"])
Options
Both extraction tools accept the same options. Each toggles an Xberg ExtractionConfig capability:
| Option | Default | Effect |
|---|---|---|
output_format |
"markdown" |
plain, markdown, or html. |
force_ocr |
False |
Run OCR on every page, even with a text layer. |
chunk |
False |
Split into semantic chunks; report the chunk count. |
extract_keywords |
False |
Append a keyword list. |
extract_entities |
False |
Append named entities (people, orgs, locations). |
summarize |
False |
Append a short summary. |
Detected languages and tables are surfaced automatically when present.
Async
The tools are async at the core. Inside an event loop, await tool.arun(...); the synchronous run bridges to it and must not be called from a running loop.
Errors
A missing file raises from Xberg directly. In batch mode, per-file failures land in ExtractionResult.errors and are reported in a trailing Errors section instead of aborting the batch.
For the full API, see the Xberg documentation.
Metadata
Release files for crewai-xberg 1.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| crewai_xberg-1.3.4.tar.gz | 10.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| crewai_xberg-1.3.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.6 kB
Release files / crewai_xberg-1.3.4.tar.gz
| Download URL | crewai_xberg-1.3.4.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5dab73cdc6ba955766b2703f6cb24b6f546da859f7e53b00edf5f03b1aaf57e7
|
|
BLAKE2b-256 checksum How to use checksums |
136fa076909b08703e9dbf8d19b0bcb3575c5a39688360f5034d1e559ab8e812
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / crewai_xberg-1.3.4-py3-none-any.whl
| Download URL | crewai_xberg-1.3.4-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
046005ceba3a98589838b122e4955a53521472ba106481e0c5dfd22d40158f9f
|
|
BLAKE2b-256 checksum How to use checksums |
4aa2d7ef54d25f4520d126ef6b06d705675f9f221585d3a4ff9d373db4ae1781
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|