🚀 Quick Start · 🎬 Demo · 📖 How It Works · 🔌 Connectors · 🤝 Contributing
Upload a messy CSV, a complex PDF, or connect your database — watch 5 AI agents autonomously clean, validate, transform, detect anomalies and summarise your data in real time.
Every data team has the same nightmare.
You get a CSV from a stakeholder. It has:
- Dates in 3 different formats
- Missing customer IDs on 20% of rows
- A price of £999.99 that should be £9.99
- Column names that change every month
- No documentation. No schema. No context.
You spend 3 hours writing cleaning scripts. Then the next file arrives and breaks everything.
There has to be a better way.
Instead of writing rules, deploy agents.
Each agent has a single job, its own reasoning, and structured output. They run sequentially, passing context to each other. The result is a complete data quality report — in seconds.
Your messy data
↓
┌─────────────────────────────────────────────────────────────┐ │ │ │ 🧹 Cleaner → 🛡 Validator → ⚡ Transformer │ │ │ │ 📡 Anomaly Detector → 📊 Summariser │ │ │ └─────────────────────────────────────────────────────────────┘ ↓ Clean data + Full quality report + Business insights
No config files. No rigid schemas. No rules to write and maintain.
Just point it at your data and watch it work.
- Python 3.10+
- An Anthropic API key — get one free at console.anthropic.com
git clone https://github.com/harshitboots/multi-agent-data-pipeline.git
cd multi-agent-data-pipelinepython3 -m venv venv
# Mac / Linux
source venv/bin/activate
# Windows
venv\Scripts\activatepip install -r requirements.txtcp .env.example .envOpen .env and add your key:
ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxxpython main.py demo/sample_data.csvstreamlit run app.pyThen open http://localhost:8501
pip install multi-agent-data-pipeline
multi-agent-pipeline demo/sample_data.csvUpload any CSV — the agents find and fix everything automatically.
| Row | Issue | Agent |
|---|---|---|
| TXN002 | Date format 2024/01/15 — inconsistent |
🧹 Cleaner |
| TXN003 | Date format 15-01-2024 — inconsistent |
🧹 Cleaner |
| TXN003 | Missing product name | 🧹 Cleaner |
| TXN004 | Missing store ID | 🛡 Validator |
| TXN007 | Price anomaly — £999.99 for 4 × £12.99 items | 📡 Anomaly |
| TXN008 | Missing customer ID | 🛡 Validator |
| TXN011 | Negative price — -£5.00 |
📡 Anomaly |
Upload any PDF — contracts, reports, invoices, meeting notes.
Connect directly to your database — agents fetch a table and run the full pipeline.
10 database connectors — Azure Databricks, Snowflake, PostgreSQL, MySQL, BigQuery, MongoDB, Redshift, DuckDB, Microsoft Fabric, Elasticsearch
Each agent is a specialised Claude AI instance with:
- A focused system prompt defining its exact role
- A strict JSON output schema enforced by Pydantic
- Graceful error handling with typed fallback responses
- Context passing — each agent knows what the previous one found
No LangChain. No bloated frameworks. Just clean Python and direct API calls.
Identifies and fixes data quality issues before anything else runs.
# What it finds
{
"issues_fixed": [
"Inconsistent date formats — standardised to YYYY-MM-DD",
"Missing product names — flagged 1 row",
"Missing store IDs — flagged 1 row"
],
"rows_affected": 6,
"cleaned_columns": ["date", "product_name", "store_id"]
}Checks schema correctness, data types, constraints and completeness.
{
"schema_ok": true,
"violations": [
"Missing customer_id in rows 8",
"Negative unit_price in row 11"
],
"passed_checks": [
"All transaction IDs unique",
"Quantity values positive"
],
"completeness_score": 91.1
}Standardises, normalises and derives new columns from existing data.
{
"transformations_applied": [
"Standardised all dates to ISO 8601",
"Normalised product names to title case"
],
"new_columns": ["year", "month", "day_of_week", "price_band", "is_weekend"],
"rows_transformed": 15
}Finds statistical outliers, impossible values and suspicious patterns.
{
"anomalies": [
"TXN007: total £999.99 — expected ~£51.96 for 4 × £12.99",
"TXN011: negative unit_price -£5.00 — impossible value"
],
"anomaly_count": 7,
"anomaly_score": 8.5,
"flagged_rows": [7, 11]
}Produces a business-readable summary with key stats and recommendations.
{
"summary": "Dataset contains 15 retail transactions across 5 categories...",
"key_stats": {
"Total Revenue": "£413.56",
"Top Category": "Skincare",
"Date Range": "15–20 Jan 2024"
},
"recommendations": [
"Investigate TXN007 — possible data entry error",
"Standardise date format across all upstream systems"
]
}| Agent | Input | Output |
|---|---|---|
| 📄 PDF Parser | Raw PDF text | Document type, language, quality, key topics |
| 🔍 Entity Extractor | PDF text | People, orgs, dates, amounts, emails, locations |
| PDF text | PII flags, GDPR risks, legal/financial red flags | |
| ✅ Action Extractor | PDF text | Todos, decisions, deadlines, owners |
| 📊 Summariser | All agent context | Business summary + recommendations |
multi-agent-data-pipeline/ ├── src/ │ ├── agents/ │ │ ├── cleaner.py # CSV cleaning agent │ │ ├── validator.py # CSV validation agent │ │ ├── transformer.py # CSV transformation agent │ │ ├── anomaly.py # Anomaly detection agent │ │ ├── summariser.py # Summarisation agent │ │ ├── pdf_parser.py # PDF parsing agent │ │ ├── entity_extractor.py # Entity extraction agent │ │ ├── risk_detector.py # Risk detection agent │ │ └── action_extractor.py # Action item agent │ ├── connectors/ │ │ ├── databricks.py # Azure Databricks │ │ ├── snowflake_conn.py # Snowflake │ │ ├── postgres.py # PostgreSQL │ │ ├── mysql.py # MySQL │ │ ├── bigquery.py # BigQuery │ │ ├── mongodb.py # MongoDB │ │ ├── redshift.py # Amazon Redshift │ │ ├── duckdb_conn.py # DuckDB │ │ ├── fabric.py # Microsoft Fabric │ │ └── elasticsearch_conn.py # Elasticsearch │ ├── models.py # Pydantic schemas │ └── pipeline.py # Orchestrator ├── demo/ │ ├── sample_data.csv # Demo CSV with intentional issues │ └── sample_report.pdf # Demo PDF quarterly report ├── contrib/ │ ├── azure/ # Azure deployment guide │ ├── databricks/ # Databricks implementation │ ├── aws/ # AWS Lambda implementation │ └── docker/ # Docker deployment ├── tests/ │ └── test_pipeline.py # 11 passing tests ├── app.py # Streamlit UI ├── main.py # CLI entrypoint └── requirements.txt
User uploads CSV / PDF / connects DB ↓ Pipeline Orchestrator ↓ ┌─────────────────────┐ │ Agent 1: Cleaner │ ──→ CleanerResult (Pydantic) └─────────────────────┘ ↓ ┌──────────────────────┐ │ Agent 2: Validator │ ──→ ValidatorResult (Pydantic) └──────────────────────┘ ↓ ┌────────────────────────┐ │ Agent 3: Transformer │ ──→ TransformerResult (Pydantic) └────────────────────────┘ ↓ ┌──────────────────────────────┐ │ Agent 4: Anomaly Detector │ ──→ AnomalyResult (Pydantic) └──────────────────────────────┘ ↓ ┌─────────────────────────────────────────┐ │ Agent 5: Summariser (with full context) │ ──→ SummariserResult └─────────────────────────────────────────┘ ↓ PipelineResult (combined) ↓ CLI table + JSON export + UI display
Drop any CSV file — no schema required. The agents infer structure, detect issues and process automatically.
# CLI
python main.py your_data.csv
# With JSON output
python main.py your_data.csv --output results.jsonTested with:
- Retail transaction data
- Financial ledgers
- HR records
- IoT sensor readings
- Marketing campaign data
- Any flat file CSV
Upload any PDF document. Agents extract structured information automatically.
Best results with:
- Quarterly / annual reports
- Contracts and legal documents
- Invoices and purchase orders
- Meeting minutes and notes
- Research papers
- HR documents and policies
Connect directly to your database. Agents fetch any table and run the full pipeline.
from src.connectors.databricks import fetch_table
df = fetch_table(
host="adb-xxxxx.azuredatabricks.net",
token="dapi...",
http_path="/sql/1.0/warehouses/xxxxx",
table="catalog.schema.table_name"
)from src.connectors.snowflake_conn import fetch_table
df = fetch_table(
account="xy12345.eu-west-1",
user="my_user",
password="my_password",
database="MY_DATABASE",
schema="PUBLIC",
table="MY_TABLE"
)from src.connectors.postgres import fetch_table
df = fetch_table(
host="localhost",
port=5432,
database="my_database",
user="postgres",
password="my_password",
table="my_table"
)from src.connectors.mysql import fetch_table
df = fetch_table(
host="localhost",
port=3306,
database="my_database",
user="root",
password="my_password",
table="my_table"
)from src.connectors.bigquery import fetch_table
df = fetch_table(
project_id="my-gcp-project",
credentials_json=credentials_dict,
dataset="my_dataset",
table="my_table"
)from src.connectors.mongodb import fetch_collection
df = fetch_collection(
uri="mongodb://localhost:27017",
database="my_database",
collection="my_collection",
limit=1000
)from src.connectors.redshift import fetch_table
df = fetch_table(
host="cluster.abc123.eu-west-1.redshift.amazonaws.com",
port=5439,
database="dev",
user="awsuser",
password="my_password",
table="my_table"
)from src.connectors.duckdb_conn import fetch_table
df = fetch_table(
filepath="/path/to/my.duckdb",
table="my_table",
limit=1000
)Requires ODBC Driver 18 for SQL Server installed at the OS level.
from src.connectors.fabric import fetch_table
df = fetch_table(
server="xyz.datawarehouse.fabric.microsoft.com",
database="my_warehouse",
user="user@org.com",
password="my_password",
table="my_table"
)from src.connectors.elasticsearch_conn import fetch_index
df = fetch_index(
host="localhost",
port=9200,
index="my_index",
username="elastic", # optional
password="my_password", # optional
use_ssl=False,
limit=1000
)| Database | Auth Method | Fetch | Pipeline | Status |
|---|---|---|---|---|
| Azure Databricks | PAT Token | ✅ | ✅ | Stable |
| Snowflake | User/Pass | ✅ | ✅ | Stable |
| PostgreSQL | User/Pass | ✅ | ✅ | Stable |
| MySQL | User/Pass | ✅ | ✅ | Stable |
| BigQuery | Service Account JSON | ✅ | ✅ | Stable |
| MongoDB | URI | ✅ | ✅ | Stable |
| Amazon Redshift | User/Pass | ✅ | ✅ | Stable |
| DuckDB | File path | ✅ | ✅ | Stable |
| Microsoft Fabric | User/Pass | ✅ | ✅ | Requires ODBC Driver 18 |
| Elasticsearch | Optional User/Pass | ✅ | ✅ | Stable |
Want to add a connector? See Contributing
This pipeline runs locally out of the box. For production deployment it's compatible with every major cloud platform.
FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 8501
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]docker build -t multi-agent-pipeline .
docker run -p 8501:8501 -e ANTHROPIC_API_KEY=sk-ant-... multi-agent-pipelineOption 1 — Azure Container Apps
az containerapp create \
--name multi-agent-pipeline \
--resource-group my-rg \
--image my-registry/multi-agent-pipeline:latest \
--env-vars ANTHROPIC_API_KEY=sk-ant-...Option 2 — Azure Databricks Job
# Run as a Databricks notebook job
# Point pipeline at any Unity Catalog table
# Schedule via ADF pipeline triggerOption 3 — Azure Functions
# Trigger on Blob Storage upload
# Process CSV and store results to ADLS
# Integrate with ADF for orchestrationOption 1 — AWS Lambda + S3
import boto3
from src.pipeline import run_pipeline
def lambda_handler(event, context):
bucket = event['Records'][0]['s3']['bucket']['name']
key = event['Records'][0]['s3']['object']['key']
# Download CSV from S3
# Run pipeline
# Store results back to S3Option 2 — ECS + Fargate
# Deploy as a containerised service
# Auto-scale based on queue depth
# Integrate with SQS for async processingCloud Run
gcloud run deploy multi-agent-pipeline \
--image gcr.io/my-project/multi-agent-pipeline \
--platform managed \
--set-env-vars ANTHROPIC_API_KEY=sk-ant-...One-click deploy — zero infrastructure setup.
Render:
- Fork this repo
- Connect to Render
- Set
ANTHROPIC_API_KEYenvironment variable - Deploy — live URL in 2 minutes
Railway:
railway login
railway init
railway up| Variable | Required | Description |
|---|---|---|
ANTHROPIC_API_KEY |
✅ Yes | Your Anthropic API key |
DATABRICKS_HOST |
Optional | Databricks workspace URL |
DATABRICKS_TOKEN |
Optional | Databricks PAT token |
SNOWFLAKE_ACCOUNT |
Optional | Snowflake account identifier |
POSTGRES_HOST |
Optional | PostgreSQL host |
MYSQL_HOST |
Optional | MySQL host |
See
.env.examplefor the full list
See the contrib/ folder for community-contributed cloud implementations:
| Folder | Contents |
|---|---|
contrib/azure/ |
ADF trigger + Databricks job implementation |
contrib/databricks/ |
Full Databricks notebook implementation |
contrib/aws/ |
Lambda + S3 trigger implementation |
contrib/docker/ |
Production Docker + compose setup |
These are contributed by the community. Want to add yours? See Contributing
This repo is built for the community. Every contribution makes it better for thousands of data engineers.
Current contributors: 1 — be the second.
We want to support every major database. Next targets:
| Database | Difficulty | Issue |
|---|---|---|
| MongoDB | Medium | #1 ✅ |
| Redshift | Easy | #2 ✅ |
| DuckDB | Easy | #3 ✅ |
| Microsoft Fabric | Medium | #4 ✅ |
| Elasticsearch | Hard | #5 ✅ |
| Oracle DB | Medium | #6 |
| CockroachDB | Easy | #7 |
| ClickHouse | Medium | #8 |
Deploy this on your cloud and contribute the implementation:
contrib/azure/— ADF pipeline triggercontrib/databricks/— Full Databricks notebookcontrib/aws/— Lambda + S3 triggercontrib/docker/— Production Docker setupcontrib/gcp/— Cloud Run deployment
Ideas for new agents:
- Schema Inferencer — auto-detect and document schema
- PII Anonymiser — mask sensitive data automatically
- Data Lineage Tracker — track where each column came from
- Duplicate Detector — find near-duplicate records
- Language Translator — translate non-English data fields
Wrap the CLI for other languages:
- R package
- Node.js SDK
- Julia package
- Add example notebooks
- Write tutorials
- Translate docs
# 1. Fork the repo on GitHub
# 2. Clone your fork
git clone https://github.com/YOUR_USERNAME/multi-agent-data-pipeline.git
cd multi-agent-data-pipeline
# 3. Create virtual environment
python3 -m venv venv
source venv/bin/activate
# 4. Install dependencies
pip install -r requirements.txt
# 5. Create a branch
git checkout -b feature/mongodb-connector
# 6. Make your changes
# 7. Run tests — all must pass
pytest tests/ -v
# 8. Push and open a PR
git push origin feature/mongodb-connector- One feature per PR
- All tests must pass
- Add tests for new features
- Follow existing code style — each agent has the same structure
- Update README if adding a connector or agent
Follow this pattern — every connector has the same 3 functions:
# src/connectors/your_db.py
def connect(host: str, port: int, database: str, user: str, password: str):
# Return a connection object
pass
def list_tables(host: str, ...) -> list:
# Return list of table names
pass
def fetch_table(host: str, ..., table: str, limit: int = 1000) -> pd.DataFrame:
# Return a pandas DataFrame
passThen add it to the UI in app.py under the Database Connectors section.
Follow this pattern — every agent has the same structure:
# src/agents/your_agent.py
from pydantic import BaseModel, Field
from typing import List
SYSTEM_PROMPT = """You are a [role] agent.
Respond ONLY with valid JSON. No markdown. No explanation.
JSON format: { ... }"""
class YourAgentResult(BaseModel):
some_field: str = "default"
some_list: List[str] = Field(default_factory=list)
some_count: int = 0
def run(data: str, context: int) -> YourAgentResult:
response = client.messages.create(...)
# parse and return typed resultAll contributors are:
- Listed in the README contributors section
- Credited in the release notes
- Mentioned in the Medium article series
| Avatar | Name | Contribution |
|---|---|---|
| 👤 | Harshit Tripathi | Creator & maintainer |
| 👤 | Your name here | Your contribution |
pytest tests/ -vtests/test_pipeline.py::TestModels::test_cleaner_result_creation PASSED tests/test_pipeline.py::TestModels::test_validator_result_creation PASSED tests/test_pipeline.py::TestModels::test_transformer_result_creation PASSED tests/test_pipeline.py::TestModels::test_anomaly_result_creation PASSED tests/test_pipeline.py::TestModels::test_summariser_result_creation PASSED tests/test_pipeline.py::TestModels::test_pipeline_result_creation PASSED tests/test_pipeline.py::TestCSVLoading::test_csv_loads_correctly PASSED tests/test_pipeline.py::TestCSVLoading::test_csv_preview_generation PASSED tests/test_pipeline.py::TestCSVLoading::test_demo_csv_exists PASSED tests/test_pipeline.py::TestCSVLoading::test_demo_csv_has_correct_columns PASSED tests/test_pipeline.py::TestCSVLoading::test_demo_csv_has_rows PASSED 11 passed in 0.42s
| Layer | Technology |
|---|---|
| AI | Anthropic Claude (claude-sonnet-4-5) |
| Language | Python 3.12 |
| Data | Pandas, PyPDF |
| Validation | Pydantic v2 |
| CLI | Typer + Rich |
| UI | Streamlit |
| Connectors | Databricks SDK, Snowflake, psycopg2, mysql-connector, BigQuery, pymongo, redshift-connector, duckdb, elasticsearch, pyodbc |
| Testing | pytest |
| Packaging | pyproject.toml |
- CSV pipeline — 5 agents
- PDF intelligence — 5 agents
- Database connectors — 10 databases
- Streamlit UI — dark theme
- CLI entrypoint
- JSON export
- MongoDB connector
- Redshift connector
- DuckDB connector
- Microsoft Fabric connector
- Elasticsearch connector
- pip package —
pip install multi-agent-data-pipeline - Async parallel agent execution
- Agent memory — learn from past runs
- Webhook support — trigger via HTTP
- REST API — FastAPI wrapper
- Docker image on Docker Hub
- GitHub Actions CI/CD
Built by Harshit Tripathi — Lead Data Engineer
- Creator of ATLAS Knowledge Graph — AI-powered data lineage and discovery platform on Azure Databricks
- 10 years of experience across Azure, Databricks, PySpark, Unity Catalog, Microsoft Fabric
- Databricks Certified Professional
- Cross-industry background — retail, aerospace, healthcare
This project is part of the Britcore.AI open source initiative — building practical AI tools for data engineers.
| 🌐 Website | britcore.ai |
| 🐙 GitHub | github.com/harshitboots |
| linkedin.com/in/harshittripathi |
MIT License — free to use, modify and distribute.
See LICENSE for full terms.




