agentl-etl 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agentl_etl-0.1.1/.gitignore +227 -0
- agentl_etl-0.1.1/CHANGELOG.md +34 -0
- agentl_etl-0.1.1/LICENSE +21 -0
- agentl_etl-0.1.1/PKG-INFO +202 -0
- agentl_etl-0.1.1/README.md +144 -0
- agentl_etl-0.1.1/agentl/__init__.py +19 -0
- agentl_etl-0.1.1/agentl/cli.py +91 -0
- agentl_etl-0.1.1/agentl/connectors/__init__.py +6 -0
- agentl_etl-0.1.1/agentl/connectors/_util.py +25 -0
- agentl_etl-0.1.1/agentl/connectors/files.py +104 -0
- agentl_etl-0.1.1/agentl/connectors/http.py +109 -0
- agentl_etl-0.1.1/agentl/connectors/sql.py +38 -0
- agentl_etl-0.1.1/agentl/connectors/transforms.py +69 -0
- agentl_etl-0.1.1/agentl/dashboard.py +103 -0
- agentl_etl-0.1.1/agentl/graph.py +45 -0
- agentl_etl-0.1.1/agentl/llm.py +113 -0
- agentl_etl-0.1.1/agentl/notify.py +105 -0
- agentl_etl-0.1.1/agentl/py.typed +0 -0
- agentl_etl-0.1.1/agentl/registry.py +60 -0
- agentl_etl-0.1.1/agentl/runner.py +192 -0
- agentl_etl-0.1.1/agentl/spec.py +181 -0
- agentl_etl-0.1.1/agentl/store.py +95 -0
- agentl_etl-0.1.1/examples/data/clientes.json +4 -0
- agentl_etl-0.1.1/examples/data/notas.csv +4 -0
- agentl_etl-0.1.1/examples/notas.yaml +43 -0
- agentl_etl-0.1.1/media/launch-video/README.md +35 -0
- agentl_etl-0.1.1/pyproject.toml +82 -0
- agentl_etl-0.1.1/tests/__init__.py +0 -0
- agentl_etl-0.1.1/tests/helpers.py +2 -0
- agentl_etl-0.1.1/tests/test_agentl.py +222 -0
- agentl_etl-0.1.1/tests/test_cli.py +34 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
*.lcov
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
# Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# uv
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
# poetry.lock
|
|
110
|
+
# poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
# pdm.lock
|
|
117
|
+
# pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
# pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi/*
|
|
127
|
+
!.pixi/config.toml
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule*
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Spyder project settings
|
|
163
|
+
.spyderproject
|
|
164
|
+
.spyproject
|
|
165
|
+
|
|
166
|
+
# Rope project settings
|
|
167
|
+
.ropeproject
|
|
168
|
+
|
|
169
|
+
# mkdocs/Zensical documentation
|
|
170
|
+
/site
|
|
171
|
+
|
|
172
|
+
# mypy
|
|
173
|
+
.mypy_cache/
|
|
174
|
+
.dmypy.json
|
|
175
|
+
dmypy.json
|
|
176
|
+
|
|
177
|
+
# Pyre type checker
|
|
178
|
+
.pyre/
|
|
179
|
+
|
|
180
|
+
# pytype static type analyzer
|
|
181
|
+
.pytype/
|
|
182
|
+
|
|
183
|
+
# Cython debug symbols
|
|
184
|
+
cython_debug/
|
|
185
|
+
|
|
186
|
+
# PyCharm
|
|
187
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
188
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
189
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
190
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
191
|
+
# .idea/
|
|
192
|
+
|
|
193
|
+
# Abstra
|
|
194
|
+
# Abstra is an AI-powered process automation framework.
|
|
195
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
196
|
+
# Learn more at https://abstra.io/docs
|
|
197
|
+
.abstra/
|
|
198
|
+
|
|
199
|
+
# Visual Studio Code
|
|
200
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
|
|
201
|
+
# can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
202
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer, you
|
|
203
|
+
# could uncomment the following to ignore the entire vscode folder
|
|
204
|
+
# .vscode/
|
|
205
|
+
# Temporary file for partial code execution
|
|
206
|
+
tempCodeRunnerFile.py
|
|
207
|
+
|
|
208
|
+
# Ruff stuff:
|
|
209
|
+
.ruff_cache/
|
|
210
|
+
|
|
211
|
+
# PyPI configuration file
|
|
212
|
+
.pypirc
|
|
213
|
+
|
|
214
|
+
# Marimo
|
|
215
|
+
marimo/_static/
|
|
216
|
+
marimo/_lsp/
|
|
217
|
+
__marimo__/
|
|
218
|
+
|
|
219
|
+
# Streamlit
|
|
220
|
+
.streamlit/secrets.toml
|
|
221
|
+
|
|
222
|
+
# agentl
|
|
223
|
+
.agentl/
|
|
224
|
+
.dev.vars
|
|
225
|
+
|
|
226
|
+
# docs build
|
|
227
|
+
site/
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here.
|
|
4
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
|
|
5
|
+
and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
While the version is `0.x`, minor releases may contain breaking changes.
|
|
8
|
+
They are always listed under **Changed** or **Removed**.
|
|
9
|
+
|
|
10
|
+
## [Unreleased]
|
|
11
|
+
|
|
12
|
+
## [0.1.1] - 2026-10-13
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- The PyPI distribution is now `agentl-etl` (PyPI treats `agentl` as confusable with an existing
|
|
17
|
+
project). Install with `pip install agentl-etl`; the import (`import agentl`) and the `agentl`
|
|
18
|
+
command are unchanged. 0.1.0 was never published.
|
|
19
|
+
|
|
20
|
+
## [0.1.0] - 2026-10-13
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- YAML pipeline spec with `${VAR}` interpolation and `extract`/`transform`/`load` sections.
|
|
25
|
+
- Runner that executes steps in graph order and emits run, step and item events.
|
|
26
|
+
- Agent steps with schema-validated output, per-record cache and rejected items.
|
|
27
|
+
- Connectors: CSV, JSON/JSONL, Excel, PDF, Word, HTTP, SQLite, `select`, `filter`, `dedupe`, `join`, `concat`.
|
|
28
|
+
- LLM providers: Anthropic and an offline `echo` provider.
|
|
29
|
+
- Notifications to Slack, generic webhooks and the console.
|
|
30
|
+
- CLI (`run`, `validate`, `diagram`, `runs`, `connectors`, `dashboard`) and a local dashboard.
|
|
31
|
+
|
|
32
|
+
[Unreleased]: https://github.com/arimayuji/agentl/compare/v0.1.1...HEAD
|
|
33
|
+
[0.1.1]: https://github.com/arimayuji/agentl/compare/v0.1.0...v0.1.1
|
|
34
|
+
[0.1.0]: https://github.com/arimayuji/agentl/releases/tag/v0.1.0
|
agentl_etl-0.1.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 arima
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: agentl-etl
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Agentic ETL for Python: YAML pipelines where each step is a connector, a function or an LLM agent.
|
|
5
|
+
Project-URL: Homepage, https://github.com/arimayuji/agentl
|
|
6
|
+
Project-URL: Repository, https://github.com/arimayuji/agentl
|
|
7
|
+
Project-URL: Issues, https://github.com/arimayuji/agentl/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/arimayuji/agentl/blob/main/CHANGELOG.md
|
|
9
|
+
Author: Yuji Arima
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: agents,ai,data-engineering,data-pipeline,etl,llm,yaml
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Database
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
25
|
+
Classifier: Typing :: Typed
|
|
26
|
+
Requires-Python: >=3.10
|
|
27
|
+
Requires-Dist: pydantic>=2
|
|
28
|
+
Requires-Dist: pyyaml>=6
|
|
29
|
+
Provides-Extra: all
|
|
30
|
+
Requires-Dist: anthropic>=0.70; extra == 'all'
|
|
31
|
+
Requires-Dist: openpyxl>=3.1; extra == 'all'
|
|
32
|
+
Requires-Dist: pypdf>=4; extra == 'all'
|
|
33
|
+
Requires-Dist: python-docx>=1.1; extra == 'all'
|
|
34
|
+
Provides-Extra: anthropic
|
|
35
|
+
Requires-Dist: anthropic>=0.70; extra == 'anthropic'
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: mypy>=1.11; extra == 'dev'
|
|
38
|
+
Requires-Dist: openpyxl>=3.1; extra == 'dev'
|
|
39
|
+
Requires-Dist: pre-commit>=3; extra == 'dev'
|
|
40
|
+
Requires-Dist: pypdf>=4; extra == 'dev'
|
|
41
|
+
Requires-Dist: pytest-cov>=5; extra == 'dev'
|
|
42
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
43
|
+
Requires-Dist: python-docx>=1.1; extra == 'dev'
|
|
44
|
+
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
45
|
+
Requires-Dist: types-pyyaml; extra == 'dev'
|
|
46
|
+
Provides-Extra: docs
|
|
47
|
+
Requires-Dist: mkdocs-material<10,>=9.5; extra == 'docs'
|
|
48
|
+
Requires-Dist: mkdocs<2,>=1.6; extra == 'docs'
|
|
49
|
+
Requires-Dist: mkdocstrings[python]>=0.26; extra == 'docs'
|
|
50
|
+
Provides-Extra: excel
|
|
51
|
+
Requires-Dist: openpyxl>=3.1; extra == 'excel'
|
|
52
|
+
Provides-Extra: office
|
|
53
|
+
Requires-Dist: openpyxl>=3.1; extra == 'office'
|
|
54
|
+
Requires-Dist: python-docx>=1.1; extra == 'office'
|
|
55
|
+
Provides-Extra: pdf
|
|
56
|
+
Requires-Dist: pypdf>=4; extra == 'pdf'
|
|
57
|
+
Description-Content-Type: text/markdown
|
|
58
|
+
|
|
59
|
+
<p align="center">
|
|
60
|
+
<a href="https://agentl.com.br">
|
|
61
|
+
<img src="media/brand/assets/agentl-social-1280x640.png" alt="agentl: Agentic ETL for Python" width="820">
|
|
62
|
+
</a>
|
|
63
|
+
</p>
|
|
64
|
+
|
|
65
|
+
<p align="center">
|
|
66
|
+
<a href="https://agentl.com.br"><b>Website</b></a> ·
|
|
67
|
+
<a href="https://agentl.com.br/getting-started/">Getting started</a> ·
|
|
68
|
+
<a href="https://agentl.com.br/connectors/">Connectors</a> ·
|
|
69
|
+
<a href="https://pypi.org/project/agentl-etl/">PyPI</a> ·
|
|
70
|
+
<a href="https://github.com/arimayuji/agentl/discussions">Discussions</a>
|
|
71
|
+
</p>
|
|
72
|
+
|
|
73
|
+
[](https://github.com/arimayuji/agentl/actions/workflows/ci.yml)
|
|
74
|
+
[](https://pypi.org/project/agentl-etl/)
|
|
75
|
+
[](https://pypi.org/project/agentl-etl/)
|
|
76
|
+
[](LICENSE)
|
|
77
|
+
|
|
78
|
+
Agentic ETL for Python. Declare pipelines in YAML where each step is a connector, a function or an LLM agent. Read CSV, Excel, PDF, Word, HTTP and SQL, validate agent outputs with schemas, and follow every run in a live diagram, a local dashboard and notifications.
|
|
79
|
+
|
|
80
|
+
> Status: early (v0.1). The API may change.
|
|
81
|
+
|
|
82
|
+
## Install
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
pip install agentl-etl # core: CSV, JSON, HTTP, SQLite, runner, dashboard
|
|
86
|
+
pip install 'agentl-etl[office,pdf]' # Excel, Word, PDF
|
|
87
|
+
pip install 'agentl-etl[anthropic]' # Claude as the LLM provider
|
|
88
|
+
pip install 'agentl-etl[all]'
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The distribution is named `agentl-etl` on PyPI; the import and the CLI are both `agentl`.
|
|
92
|
+
|
|
93
|
+
## A pipeline
|
|
94
|
+
|
|
95
|
+
```yaml
|
|
96
|
+
name: notas-fiscais
|
|
97
|
+
llm:
|
|
98
|
+
provider: anthropic # or "echo" to run offline
|
|
99
|
+
model: claude-opus-5-5
|
|
100
|
+
|
|
101
|
+
steps:
|
|
102
|
+
- id: notas
|
|
103
|
+
use: csv.read
|
|
104
|
+
with: { path: data/notas.csv }
|
|
105
|
+
|
|
106
|
+
- id: clientes
|
|
107
|
+
use: json.read
|
|
108
|
+
with: { path: data/clientes.json }
|
|
109
|
+
|
|
110
|
+
- id: cruzar
|
|
111
|
+
use: join
|
|
112
|
+
input: [notas, clientes]
|
|
113
|
+
with: { left: notas, right: clientes, on: cnpj, how: left }
|
|
114
|
+
|
|
115
|
+
- id: classificar
|
|
116
|
+
agent: Classify the expense category and flag unknown clients for review.
|
|
117
|
+
input: cruzar
|
|
118
|
+
output: { numero: str, cliente: str?, categoria: str?, revisar: bool? }
|
|
119
|
+
|
|
120
|
+
- id: salvar
|
|
121
|
+
use: sqlite.write
|
|
122
|
+
input: classificar
|
|
123
|
+
with: { db: out/notas.db, table: notas }
|
|
124
|
+
|
|
125
|
+
notify:
|
|
126
|
+
channels:
|
|
127
|
+
slack: { webhook: "${SLACK_WEBHOOK}" }
|
|
128
|
+
rules:
|
|
129
|
+
- on: run.failed
|
|
130
|
+
to: [slack]
|
|
131
|
+
summary: agent # the LLM explains the failure in 3 lines
|
|
132
|
+
- on: item.rejected
|
|
133
|
+
when: "rate > 0.05"
|
|
134
|
+
to: [slack]
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
agentl validate pipeline.yaml
|
|
139
|
+
agentl run pipeline.yaml --show classificar
|
|
140
|
+
agentl diagram pipeline.yaml # Mermaid
|
|
141
|
+
agentl dashboard # http://127.0.0.1:7070
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
You can also write `extract:`, `transform:` and `load:` sections instead of `steps:`. Inside `transform` and `load`, a step without `input` reads from the previous one.
|
|
145
|
+
|
|
146
|
+
## Concepts
|
|
147
|
+
|
|
148
|
+
**Everything is a step.** A step gets records (`list[dict]`) from its inputs and returns records. Extract, transform and load are labels, not different machinery. Steps form a graph, so ETL, ELT, fan-out and joins all fit.
|
|
149
|
+
|
|
150
|
+
| Step kind | YAML | Use for |
|
|
151
|
+
|---|---|---|
|
|
152
|
+
| Connector | `use: pdf.read` | Reading and writing files, APIs and databases |
|
|
153
|
+
| Function | `fn: my_module:clean` | Your own deterministic code |
|
|
154
|
+
| Agent | `agent: "..."` + `output:` | Semantic work: classify, extract, normalize, audit |
|
|
155
|
+
|
|
156
|
+
**Agent steps** run once per record, in parallel (`concurrency`), and must declare an `output` schema (`str`, `int`, `float`, `bool`, `list[str]`, `dict`; a trailing `?` means optional). Outputs are validated; a record that fails twice is rejected, not the whole run, and shows up as an `item.rejected` event. Results are cached per record in `.agentl/agentl.db`, so re-running after a crash only pays for what is left.
|
|
157
|
+
|
|
158
|
+
**Secrets** come from the environment: `${VAR}` or `${VAR:-default}`. Never put them in the YAML.
|
|
159
|
+
|
|
160
|
+
## Built-in connectors
|
|
161
|
+
|
|
162
|
+
`csv.read` `csv.write` `json.read` `json.write` `excel.read` `pdf.read` `docx.read` `http.get` `http.post` `sqlite.read` `sqlite.write` `select` `filter` `dedupe` `join` `concat`
|
|
163
|
+
|
|
164
|
+
`agentl connectors` lists what is installed. `http.get` accepts `{field}` placeholders in the URL to make one request per upstream record, plus `items: data.results` to pick the list out of the response.
|
|
165
|
+
|
|
166
|
+
## Extending
|
|
167
|
+
|
|
168
|
+
```python
|
|
169
|
+
from agentl import connector, register_provider
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
@connector("crm.contacts")
|
|
173
|
+
def contacts(input, since=None):
|
|
174
|
+
return [{"id": 1, "email": "a@b.com"}]
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Packages can register connectors through the `agentl.connectors` entry point group, so `pip install agentl-yourthing` is enough. LLM providers plug in with `register_provider(name, factory)`; the factory returns an object with `structured(instruction, record, schema)` and `text(instruction, content)`.
|
|
178
|
+
|
|
179
|
+
## Events
|
|
180
|
+
|
|
181
|
+
The runner emits `run.started`, `step.started`, `step.succeeded`, `step.failed`, `item.rejected`, `source.empty`, `run.succeeded` and `run.failed`. They feed the store, the dashboard and notification rules (`slack`, `webhook`, `console`).
|
|
182
|
+
|
|
183
|
+
## Roadmap
|
|
184
|
+
|
|
185
|
+
- Connectors: S3/R2, email (IMAP), Postgres, Playwright, AWS Lambda
|
|
186
|
+
- Agent tools (HTTP, SQL, browser) and MCP servers as tools
|
|
187
|
+
- More providers (OpenAI, Ollama, Bedrock), cost budget per run
|
|
188
|
+
- `agentl new "describe the pipeline"` and an MCP server to operate pipelines from Claude Code
|
|
189
|
+
|
|
190
|
+
## Contributing
|
|
191
|
+
|
|
192
|
+
Bug reports, connector requests and pull requests are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
193
|
+
for the setup and the checks every PR must pass, and [SECURITY.md](SECURITY.md) to report vulnerabilities privately.
|
|
194
|
+
Release history is in [CHANGELOG.md](CHANGELOG.md).
|
|
195
|
+
|
|
196
|
+
## Sponsors
|
|
197
|
+
|
|
198
|
+
agentl is free and MIT licensed. If it saves you time, consider [sponsoring the project](https://github.com/sponsors/arimayuji).
|
|
199
|
+
|
|
200
|
+
## License
|
|
201
|
+
|
|
202
|
+
MIT
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://agentl.com.br">
|
|
3
|
+
<img src="media/brand/assets/agentl-social-1280x640.png" alt="agentl: Agentic ETL for Python" width="820">
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://agentl.com.br"><b>Website</b></a> ·
|
|
9
|
+
<a href="https://agentl.com.br/getting-started/">Getting started</a> ·
|
|
10
|
+
<a href="https://agentl.com.br/connectors/">Connectors</a> ·
|
|
11
|
+
<a href="https://pypi.org/project/agentl-etl/">PyPI</a> ·
|
|
12
|
+
<a href="https://github.com/arimayuji/agentl/discussions">Discussions</a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
[](https://github.com/arimayuji/agentl/actions/workflows/ci.yml)
|
|
16
|
+
[](https://pypi.org/project/agentl-etl/)
|
|
17
|
+
[](https://pypi.org/project/agentl-etl/)
|
|
18
|
+
[](LICENSE)
|
|
19
|
+
|
|
20
|
+
Agentic ETL for Python. Declare pipelines in YAML where each step is a connector, a function or an LLM agent. Read CSV, Excel, PDF, Word, HTTP and SQL, validate agent outputs with schemas, and follow every run in a live diagram, a local dashboard and notifications.
|
|
21
|
+
|
|
22
|
+
> Status: early (v0.1). The API may change.
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install agentl-etl # core: CSV, JSON, HTTP, SQLite, runner, dashboard
|
|
28
|
+
pip install 'agentl-etl[office,pdf]' # Excel, Word, PDF
|
|
29
|
+
pip install 'agentl-etl[anthropic]' # Claude as the LLM provider
|
|
30
|
+
pip install 'agentl-etl[all]'
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The distribution is named `agentl-etl` on PyPI; the import and the CLI are both `agentl`.
|
|
34
|
+
|
|
35
|
+
## A pipeline
|
|
36
|
+
|
|
37
|
+
```yaml
|
|
38
|
+
name: notas-fiscais
|
|
39
|
+
llm:
|
|
40
|
+
provider: anthropic # or "echo" to run offline
|
|
41
|
+
model: claude-opus-5-5
|
|
42
|
+
|
|
43
|
+
steps:
|
|
44
|
+
- id: notas
|
|
45
|
+
use: csv.read
|
|
46
|
+
with: { path: data/notas.csv }
|
|
47
|
+
|
|
48
|
+
- id: clientes
|
|
49
|
+
use: json.read
|
|
50
|
+
with: { path: data/clientes.json }
|
|
51
|
+
|
|
52
|
+
- id: cruzar
|
|
53
|
+
use: join
|
|
54
|
+
input: [notas, clientes]
|
|
55
|
+
with: { left: notas, right: clientes, on: cnpj, how: left }
|
|
56
|
+
|
|
57
|
+
- id: classificar
|
|
58
|
+
agent: Classify the expense category and flag unknown clients for review.
|
|
59
|
+
input: cruzar
|
|
60
|
+
output: { numero: str, cliente: str?, categoria: str?, revisar: bool? }
|
|
61
|
+
|
|
62
|
+
- id: salvar
|
|
63
|
+
use: sqlite.write
|
|
64
|
+
input: classificar
|
|
65
|
+
with: { db: out/notas.db, table: notas }
|
|
66
|
+
|
|
67
|
+
notify:
|
|
68
|
+
channels:
|
|
69
|
+
slack: { webhook: "${SLACK_WEBHOOK}" }
|
|
70
|
+
rules:
|
|
71
|
+
- on: run.failed
|
|
72
|
+
to: [slack]
|
|
73
|
+
summary: agent # the LLM explains the failure in 3 lines
|
|
74
|
+
- on: item.rejected
|
|
75
|
+
when: "rate > 0.05"
|
|
76
|
+
to: [slack]
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
agentl validate pipeline.yaml
|
|
81
|
+
agentl run pipeline.yaml --show classificar
|
|
82
|
+
agentl diagram pipeline.yaml # Mermaid
|
|
83
|
+
agentl dashboard # http://127.0.0.1:7070
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
You can also write `extract:`, `transform:` and `load:` sections instead of `steps:`. Inside `transform` and `load`, a step without `input` reads from the previous one.
|
|
87
|
+
|
|
88
|
+
## Concepts
|
|
89
|
+
|
|
90
|
+
**Everything is a step.** A step gets records (`list[dict]`) from its inputs and returns records. Extract, transform and load are labels, not different machinery. Steps form a graph, so ETL, ELT, fan-out and joins all fit.
|
|
91
|
+
|
|
92
|
+
| Step kind | YAML | Use for |
|
|
93
|
+
|---|---|---|
|
|
94
|
+
| Connector | `use: pdf.read` | Reading and writing files, APIs and databases |
|
|
95
|
+
| Function | `fn: my_module:clean` | Your own deterministic code |
|
|
96
|
+
| Agent | `agent: "..."` + `output:` | Semantic work: classify, extract, normalize, audit |
|
|
97
|
+
|
|
98
|
+
**Agent steps** run once per record, in parallel (`concurrency`), and must declare an `output` schema (`str`, `int`, `float`, `bool`, `list[str]`, `dict`; a trailing `?` means optional). Outputs are validated; a record that fails twice is rejected, not the whole run, and shows up as an `item.rejected` event. Results are cached per record in `.agentl/agentl.db`, so re-running after a crash only pays for what is left.
|
|
99
|
+
|
|
100
|
+
**Secrets** come from the environment: `${VAR}` or `${VAR:-default}`. Never put them in the YAML.
|
|
101
|
+
|
|
102
|
+
## Built-in connectors
|
|
103
|
+
|
|
104
|
+
`csv.read` `csv.write` `json.read` `json.write` `excel.read` `pdf.read` `docx.read` `http.get` `http.post` `sqlite.read` `sqlite.write` `select` `filter` `dedupe` `join` `concat`
|
|
105
|
+
|
|
106
|
+
`agentl connectors` lists what is installed. `http.get` accepts `{field}` placeholders in the URL to make one request per upstream record, plus `items: data.results` to pick the list out of the response.
|
|
107
|
+
|
|
108
|
+
## Extending
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
from agentl import connector, register_provider
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
@connector("crm.contacts")
|
|
115
|
+
def contacts(input, since=None):
|
|
116
|
+
return [{"id": 1, "email": "a@b.com"}]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Packages can register connectors through the `agentl.connectors` entry point group, so `pip install agentl-yourthing` is enough. LLM providers plug in with `register_provider(name, factory)`; the factory returns an object with `structured(instruction, record, schema)` and `text(instruction, content)`.
|
|
120
|
+
|
|
121
|
+
## Events
|
|
122
|
+
|
|
123
|
+
The runner emits `run.started`, `step.started`, `step.succeeded`, `step.failed`, `item.rejected`, `source.empty`, `run.succeeded` and `run.failed`. They feed the store, the dashboard and notification rules (`slack`, `webhook`, `console`).
|
|
124
|
+
|
|
125
|
+
## Roadmap
|
|
126
|
+
|
|
127
|
+
- Connectors: S3/R2, email (IMAP), Postgres, Playwright, AWS Lambda
|
|
128
|
+
- Agent tools (HTTP, SQL, browser) and MCP servers as tools
|
|
129
|
+
- More providers (OpenAI, Ollama, Bedrock), cost budget per run
|
|
130
|
+
- `agentl new "describe the pipeline"` and an MCP server to operate pipelines from Claude Code
|
|
131
|
+
|
|
132
|
+
## Contributing
|
|
133
|
+
|
|
134
|
+
Bug reports, connector requests and pull requests are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
135
|
+
for the setup and the checks every PR must pass, and [SECURITY.md](SECURITY.md) to report vulnerabilities privately.
|
|
136
|
+
Release history is in [CHANGELOG.md](CHANGELOG.md).
|
|
137
|
+
|
|
138
|
+
## Sponsors
|
|
139
|
+
|
|
140
|
+
agentl is free and MIT licensed. If it saves you time, consider [sponsoring the project](https://github.com/sponsors/arimayuji).
|
|
141
|
+
|
|
142
|
+
## License
|
|
143
|
+
|
|
144
|
+
MIT
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""agentl: agentic ETL for Python."""
|
|
2
|
+
|
|
3
|
+
from .llm import register_provider
|
|
4
|
+
from .registry import connector
|
|
5
|
+
from .runner import Runner, RunResult, run
|
|
6
|
+
from .spec import PipelineSpec, SpecError, load, parse
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"PipelineSpec",
|
|
10
|
+
"RunResult",
|
|
11
|
+
"Runner",
|
|
12
|
+
"SpecError",
|
|
13
|
+
"connector",
|
|
14
|
+
"load",
|
|
15
|
+
"parse",
|
|
16
|
+
"register_provider",
|
|
17
|
+
"run",
|
|
18
|
+
]
|
|
19
|
+
__version__ = "0.1.1"
|