Agentic environmental due-diligence text classification using EnvBert and LangGraph
Project description
-- coding: utf-8 --
"""
EnvBert-Agent
EnvBert-Agent is an agentic AI pipeline for environmental due diligence text classification.
It combines:
- ๐ง EnvBert (domain-specific transformer backbone)
- ๐ค Optional LLM fallback
- ๐ Agentic routing & confidence arbitration
- ๐ Quality control & explainability
- ๐งฉ Modular LangGraph orchestration
๐ฉโ๐ป Authors
- Afreen Aman
- Deepak John Reji
๐ Features
- Environmental domain classification using EnvBert
- Confidence-based fallback to LLM
- Agentic workflow orchestration via LangGraph
- CLI interface for quick usage
- Python SDK interface for integration
- Designed for due diligence, remediation, and compliance workflows
๐ฆ Installation
Install from PyPI:
pip install envbert-agent
โ๏ธ Requirements
- Python 3.9+
- Transformers (version constrained for TensorFlow compatibility)
- TensorFlow (required by EnvBert backbone)
๐ฅ๏ธ CLI Usage
After installation:
envbert-agent "BEHP was detected in groundwater"
Example output:
Label: Contaminated Media
Confidence: 0.87
Route: envbert
๐งช Python Usage
Basic Usage
from envbert_agent import run
text = "BEHP was detected in groundwater"
result = run(text)
print(result)
Direct CLI Invocation from Python
from envbert_agent.cli import main
main(["BEHP was detected in groundwater"])
Graph Edges & Flow
START
โ
[preprocess] โโโโโโโโโโโโโโโโโ
โ โ
[envbert] โโโโโโโโโโโโโโโโโโโโโค
โ โ
[arbitrate] โ Conditional Router:
โโ (quality < 0.4) โ route = "review"
โโ (confidence โฅ 0.75) โโโโโโผโโโโโโโ route = "accept"
โโ (confidence < 0.75) โโโโโโ route = "llm"
โ
โโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโ
โ โ โ
(review) (accept) (llm)
โ โ โ
โ โโโโโโโโโโ[llm]โโโโโโ
โ
[evaluate]
โ
[explain]
โ
[monitor]
โ
END
๐ License
MIT License
See the LICENSE file for details.
โ ๏ธ Notes
-
This package depends on the EnvBert backbone.
-
Transformers version is constrained for TensorFlow compatibility.
-
Future versions may migrate to a PyTorch backend for improved compatibility and lighter installation footprint.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file envbert_agent-0.1.1.tar.gz.
File metadata
- Download URL: envbert_agent-0.1.1.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24848b833be7dabe26b46e4e57ce5fef96e569561bd6239f76e1956fe02400f5
|
|
| MD5 |
8ba23f12a90a944b7fe4ba73a2df4a08
|
|
| BLAKE2b-256 |
233dc642045ce8caa7127ac1a95953d5ce71225318e9ef14af74569ac1e5fbbc
|
File details
Details for the file envbert_agent-0.1.1-py3-none-any.whl.
File metadata
- Download URL: envbert_agent-0.1.1-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6889abd02e269bbf746e35a0d31d7b44ffee4b7e129833d3919a9b2bb8efda7e
|
|
| MD5 |
521e590bd91318b2ea3d2b323f127972
|
|
| BLAKE2b-256 |
b9be4896aeb6058a2c7842b3cfd9768eadd14ecfb016d0a9e0839bafb1f071f8
|