telize 0.2.1__tar.gz → 0.2.3__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.
Files changed (96) hide show
  1. telize-0.2.3/PKG-INFO +360 -0
  2. telize-0.2.3/README.md +322 -0
  3. telize-0.2.3/examples/show.gif +0 -0
  4. {telize-0.2.1 → telize-0.2.3}/pyproject.toml +2 -2
  5. {telize-0.2.1 → telize-0.2.3}/src/telize/cli.py +8 -2
  6. {telize-0.2.1 → telize-0.2.3}/src/telize/runtime/workflow_input.py +34 -15
  7. {telize-0.2.1 → telize-0.2.3}/tests/test_workflow_input.py +16 -0
  8. {telize-0.2.1 → telize-0.2.3}/tests/test_yaml_action.py +52 -0
  9. {telize-0.2.1 → telize-0.2.3}/uv.lock +1 -1
  10. telize-0.2.1/PKG-INFO +0 -324
  11. telize-0.2.1/README.md +0 -286
  12. {telize-0.2.1 → telize-0.2.3}/.github/workflows/ci.yml +0 -0
  13. {telize-0.2.1 → telize-0.2.3}/.github/workflows/publish.yml +0 -0
  14. {telize-0.2.1 → telize-0.2.3}/.gitignore +0 -0
  15. {telize-0.2.1 → telize-0.2.3}/.python-version +0 -0
  16. {telize-0.2.1 → telize-0.2.3}/CHANGELOG.md +0 -0
  17. {telize-0.2.1 → telize-0.2.3}/CONTRIBUTING.md +0 -0
  18. {telize-0.2.1 → telize-0.2.3}/LICENSE +0 -0
  19. {telize-0.2.1 → telize-0.2.3}/examples/call_subflow.yaml +0 -0
  20. {telize-0.2.1 → telize-0.2.3}/examples/data/notes/alpha.md +0 -0
  21. {telize-0.2.1 → telize-0.2.3}/examples/data/notes/beta.md +0 -0
  22. {telize-0.2.1 → telize-0.2.3}/examples/data/sample.txt +0 -0
  23. {telize-0.2.1 → telize-0.2.3}/examples/env_config.yaml +0 -0
  24. {telize-0.2.1 → telize-0.2.3}/examples/llm_loop.yaml +0 -0
  25. {telize-0.2.1 → telize-0.2.3}/examples/llm_save_output.yaml +0 -0
  26. {telize-0.2.1 → telize-0.2.3}/examples/minimal_llm.yaml +0 -0
  27. {telize-0.2.1 → telize-0.2.3}/examples/multi_model.yaml +0 -0
  28. {telize-0.2.1 → telize-0.2.3}/examples/nested_workflow.yaml +0 -0
  29. {telize-0.2.1 → telize-0.2.3}/examples/nested_workflow_child.yaml +0 -0
  30. {telize-0.2.1 → telize-0.2.3}/examples/python_step.yaml +0 -0
  31. {telize-0.2.1 → telize-0.2.3}/examples/read_directory.yaml +0 -0
  32. {telize-0.2.1 → telize-0.2.3}/examples/read_file.yaml +0 -0
  33. {telize-0.2.1 → telize-0.2.3}/examples/shell_to_llm.yaml +0 -0
  34. {telize-0.2.1 → telize-0.2.3}/examples/shell_with_env.yaml +0 -0
  35. {telize-0.2.1 → telize-0.2.3}/examples/spec_reference.yaml +0 -0
  36. {telize-0.2.1 → telize-0.2.3}/src/telize/__init__.py +0 -0
  37. {telize-0.2.1 → telize-0.2.3}/src/telize/__main__.py +0 -0
  38. {telize-0.2.1 → telize-0.2.3}/src/telize/__version__.py +0 -0
  39. {telize-0.2.1 → telize-0.2.3}/src/telize/config/__init__.py +0 -0
  40. {telize-0.2.1 → telize-0.2.3}/src/telize/config/loader.py +0 -0
  41. {telize-0.2.1 → telize-0.2.3}/src/telize/config/models/__init__.py +0 -0
  42. {telize-0.2.1 → telize-0.2.3}/src/telize/config/models/actions.py +0 -0
  43. {telize-0.2.1 → telize-0.2.3}/src/telize/config/models/config.py +0 -0
  44. {telize-0.2.1 → telize-0.2.3}/src/telize/config/models/flow.py +0 -0
  45. {telize-0.2.1 → telize-0.2.3}/src/telize/config/models/spec.py +0 -0
  46. {telize-0.2.1 → telize-0.2.3}/src/telize/console/__init__.py +0 -0
  47. {telize-0.2.1 → telize-0.2.3}/src/telize/console/display.py +0 -0
  48. {telize-0.2.1 → telize-0.2.3}/src/telize/console/observer.py +0 -0
  49. {telize-0.2.1 → telize-0.2.3}/src/telize/exceptions.py +0 -0
  50. {telize-0.2.1 → telize-0.2.3}/src/telize/providers/__init__.py +0 -0
  51. {telize-0.2.1 → telize-0.2.3}/src/telize/providers/base.py +0 -0
  52. {telize-0.2.1 → telize-0.2.3}/src/telize/providers/openai.py +0 -0
  53. {telize-0.2.1 → telize-0.2.3}/src/telize/providers/registry.py +0 -0
  54. {telize-0.2.1 → telize-0.2.3}/src/telize/py.typed +0 -0
  55. {telize-0.2.1 → telize-0.2.3}/src/telize/runtime/__init__.py +0 -0
  56. {telize-0.2.1 → telize-0.2.3}/src/telize/runtime/actions/__init__.py +0 -0
  57. {telize-0.2.1 → telize-0.2.3}/src/telize/runtime/actions/base.py +0 -0
  58. {telize-0.2.1 → telize-0.2.3}/src/telize/runtime/actions/input.py +0 -0
  59. {telize-0.2.1 → telize-0.2.3}/src/telize/runtime/actions/llm.py +0 -0
  60. {telize-0.2.1 → telize-0.2.3}/src/telize/runtime/actions/python.py +0 -0
  61. {telize-0.2.1 → telize-0.2.3}/src/telize/runtime/actions/registry.py +0 -0
  62. {telize-0.2.1 → telize-0.2.3}/src/telize/runtime/actions/shell.py +0 -0
  63. {telize-0.2.1 → telize-0.2.3}/src/telize/runtime/actions/yaml.py +0 -0
  64. {telize-0.2.1 → telize-0.2.3}/src/telize/runtime/context.py +0 -0
  65. {telize-0.2.1 → telize-0.2.3}/src/telize/runtime/observer.py +0 -0
  66. {telize-0.2.1 → telize-0.2.3}/src/telize/runtime/paths.py +0 -0
  67. {telize-0.2.1 → telize-0.2.3}/src/telize/runtime/planning.py +0 -0
  68. {telize-0.2.1 → telize-0.2.3}/src/telize/runtime/runner.py +0 -0
  69. {telize-0.2.1 → telize-0.2.3}/src/telize/runtime/state.py +0 -0
  70. {telize-0.2.1 → telize-0.2.3}/src/telize/templating/__init__.py +0 -0
  71. {telize-0.2.1 → telize-0.2.3}/src/telize/templating/context.py +0 -0
  72. {telize-0.2.1 → telize-0.2.3}/src/telize/templating/load.py +0 -0
  73. {telize-0.2.1 → telize-0.2.3}/src/telize/templating/renderer.py +0 -0
  74. {telize-0.2.1 → telize-0.2.3}/tests/conftest.py +0 -0
  75. {telize-0.2.1 → telize-0.2.3}/tests/fixtures/cli_input_workflow.yaml +0 -0
  76. {telize-0.2.1 → telize-0.2.3}/tests/fixtures/external_child_workflow.yaml +0 -0
  77. {telize-0.2.1 → telize-0.2.3}/tests/fixtures/hello_agent_workflow.yaml +0 -0
  78. {telize-0.2.1 → telize-0.2.3}/tests/fixtures/invalid_duplicate_step.yaml +0 -0
  79. {telize-0.2.1 → telize-0.2.3}/tests/fixtures/minimal_workflow.yaml +0 -0
  80. {telize-0.2.1 → telize-0.2.3}/tests/fixtures/shell_only.yaml +0 -0
  81. {telize-0.2.1 → telize-0.2.3}/tests/fixtures/yaml_child_config_workflow.yaml +0 -0
  82. {telize-0.2.1 → telize-0.2.3}/tests/fixtures/yaml_input_workflow.yaml +0 -0
  83. {telize-0.2.1 → telize-0.2.3}/tests/test_cli.py +0 -0
  84. {telize-0.2.1 → telize-0.2.3}/tests/test_console_display.py +0 -0
  85. {telize-0.2.1 → telize-0.2.3}/tests/test_console_observer.py +0 -0
  86. {telize-0.2.1 → telize-0.2.3}/tests/test_llm_system_prompt.py +0 -0
  87. {telize-0.2.1 → telize-0.2.3}/tests/test_loader.py +0 -0
  88. {telize-0.2.1 → telize-0.2.3}/tests/test_loader_env.py +0 -0
  89. {telize-0.2.1 → telize-0.2.3}/tests/test_models.py +0 -0
  90. {telize-0.2.1 → telize-0.2.3}/tests/test_observer.py +0 -0
  91. {telize-0.2.1 → telize-0.2.3}/tests/test_openai_provider.py +0 -0
  92. {telize-0.2.1 → telize-0.2.3}/tests/test_planning.py +0 -0
  93. {telize-0.2.1 → telize-0.2.3}/tests/test_runner.py +0 -0
  94. {telize-0.2.1 → telize-0.2.3}/tests/test_templating.py +0 -0
  95. {telize-0.2.1 → telize-0.2.3}/tests/test_templating_load.py +0 -0
  96. {telize-0.2.1 → telize-0.2.3}/tests/test_version.py +0 -0
telize-0.2.3/PKG-INFO ADDED
@@ -0,0 +1,360 @@
1
+ Metadata-Version: 2.4
2
+ Name: telize
3
+ Version: 0.2.3
4
+ Summary: Automate with flows, not loose prompts. Chain LLM, shell, and code in one YAML pipeline.
5
+ Project-URL: Homepage, https://github.com/telize-ai/telize
6
+ Project-URL: Documentation, https://github.com/telize-ai/telize#readme
7
+ Project-URL: Repository, https://github.com/telize-ai/telize
8
+ Project-URL: Issues, https://github.com/telize-ai/telize/issues
9
+ Project-URL: Changelog, https://github.com/telize-ai/telize/blob/main/CHANGELOG.md
10
+ Author-email: Telize AI <hello@telize.ai>
11
+ License-Expression: Apache-2.0
12
+ License-File: LICENSE
13
+ Keywords: agents,ai,llm,low-code,workflow,yaml
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: License :: OSI Approved :: Apache Software License
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.12
25
+ Requires-Dist: httpx>=0.28
26
+ Requires-Dist: jinja2>=3.1
27
+ Requires-Dist: openai>=1.0
28
+ Requires-Dist: pydantic>=2.10
29
+ Requires-Dist: pyyaml>=6.0.2
30
+ Requires-Dist: rich>=13.0
31
+ Provides-Extra: dev
32
+ Requires-Dist: mypy>=1.15; extra == 'dev'
33
+ Requires-Dist: pytest-cov>=6.0; extra == 'dev'
34
+ Requires-Dist: pytest>=8.3; extra == 'dev'
35
+ Requires-Dist: ruff>=0.9; extra == 'dev'
36
+ Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
37
+ Description-Content-Type: text/markdown
38
+
39
+ # Telize
40
+
41
+ **Build reproducible, structured AI workflows with YAML and run them from your terminal, combining LLMs, shell, Python, and more—fully under your control.**
42
+
43
+ Telize is a low-code framework for building agent-style pipelines: chain shell commands, file I/O, LLM calls, Python functions, and nested flows in a single workflow file. Configuration is validated before execution, and the CLI shows live progress as each step completes.
44
+
45
+ ![Telize CLI demo](https://raw.githubusercontent.com/telize-ai/telize/main/examples/show.gif)
46
+
47
+ [CI](https://github.com/telize-ai/telize/actions/workflows/ci.yml) · [Python 3.12+](https://www.python.org/downloads/) · [License](LICENSE)
48
+
49
+ ---
50
+
51
+ ## Table of contents
52
+
53
+ - [Features](#features)
54
+ - [Requirements](#requirements)
55
+ - [Installation](#installation)
56
+ - [Quick start](#quick-start)
57
+ - [Motivation](#-motivation)
58
+ - [How it works](#how-it-works)
59
+ - [Workflow reference](#workflow-reference)
60
+ - [Examples](#examples)
61
+ - [CLI](#cli)
62
+ - [Development](#development)
63
+ - [Contributing](#contributing)
64
+ - [License](#license)
65
+
66
+ ## Features
67
+
68
+ - **YAML workflows** — one file defines `config`, named `models`, flows, and steps
69
+ - **Composable steps** — `input`, `llm`, `shell`, `python`, `flow`, and `yaml` actions
70
+ - **Jinja templating** — wire step outputs together with `{{ steps.name.output }}`
71
+ - **Loops and sub-flows** — iterate LLM steps over split lists; call nested flows with `uses: flow`
72
+ - **Validated upfront** — Pydantic models catch schema errors before any step runs
73
+ - **Rich CLI output** — progress, step panels, and errors in the terminal
74
+ - **OpenAI-compatible LLMs** — official OpenAI API or local [Ollama](https://ollama.com/) via the same client
75
+
76
+ ## Requirements
77
+
78
+ - **Python 3.12+**
79
+ - **LLM endpoint** for `uses: llm` steps — [OpenAI](https://platform.openai.com/) or [Ollama](https://ollama.com/); set `api_url` on each model profile (default `http://localhost:11434`)
80
+ - Optional: [uv](https://docs.astral.sh/uv/) for fast local development
81
+
82
+ ## Installation
83
+
84
+ ```bash
85
+ pip install telize
86
+ ```
87
+
88
+ From source:
89
+
90
+ ```bash
91
+ git clone https://github.com/telize-ai/telize.git
92
+ cd telize
93
+ uv sync
94
+ uv pip install -e .
95
+ ```
96
+
97
+ Check the install:
98
+
99
+ ```bash
100
+ telize --version
101
+ ```
102
+
103
+ ## Quick start
104
+
105
+ **1.** For local models, start [Ollama](https://ollama.com/) and pull a model:
106
+
107
+ ```bash
108
+ ollama pull qwen3.5:4b # or any model id you set under models.*.model
109
+ ```
110
+
111
+ For OpenAI Cloud, set `OPENAI_API_KEY` and point a model profile at the API, for example `api_url: https://api.openai.com/v1`.
112
+
113
+ **2.** Create `hello.yaml`:
114
+
115
+ ```yaml
116
+ config:
117
+ entrypoint: main
118
+
119
+ models:
120
+ default:
121
+ provider: openai
122
+ model: qwen3.5:4b
123
+ api_url: http://localhost:11434
124
+
125
+ flows:
126
+ main:
127
+ steps:
128
+ - name: greet
129
+ uses: llm
130
+ model: default
131
+ prompt: Say hello in one friendly sentence.
132
+ ```
133
+
134
+ **3.** Run it:
135
+
136
+ ```bash
137
+ telize -f hello.yaml
138
+ ```
139
+
140
+ Validate the file without executing steps:
141
+
142
+ ```bash
143
+ telize -f hello.yaml --validate-only
144
+ ```
145
+
146
+ Run the bundled examples:
147
+
148
+ ```bash
149
+ telize -f examples/minimal_llm.yaml
150
+ telize -f examples/spec_reference.yaml --validate-only
151
+ ```
152
+
153
+ ## 🚀 Motivation
154
+
155
+ **Telize** addresses a massive pain point in the current AI engineering landscape:
156
+ ✨ **unpredictability and unnecessary complexity.**
157
+
158
+ Many popular _frameworks_ force developers to write complex, nested Python code (`LangChain`, `CrewAI`, `AutoGen`) just to string together a few **API calls**, a **bash script**, and an **LLM prompt**.
159
+ This results in heavy, hard-to-maintain codebases that frequently break when APIs change.
160
+
161
+ **Telize essentially acts as the _“GitHub Actions or Ansible for AI.”_**
162
+ By treating LLMs as just another step in a standard automation pipeline, it brings **sanity** back to the engineering process.
163
+
164
+ ---
165
+
166
+ ### ✨ Why it works:
167
+ - **Deterministic Structure + Non-Deterministic AI:**
168
+ It keeps the overall architecture _rigid and predictable_ (`YAML`), while allowing the AI to handle the _fuzzy, creative tasks_ (**text generation, summarization**) within strict boundaries.
169
+ - **Upfront Validation:**
170
+ Running LLM pipelines can be expensive and time-consuming; catching a syntax or configuration error _before_ wasting API credits is a **huge win**.
171
+ - **Low Friction:**
172
+ _Local-first by default_ (`Ollama-ready`) and _zero-code setup_ means a developer can prototype an agentic workflow in **5 minutes** without dealing with dependency hell.
173
+
174
+ ---
175
+
176
+ ### 👥 Who may choose Telize over Classic Agents?
177
+ - **DevOps and System Administrators:**
178
+ People who already love _Ansible_, _Docker Compose_, or _CI/CD pipelines_ may want to gravitate toward Telize or similar sollutions.
179
+ They don't want an **AI Agent** _guessing_ how to deploy code; they want a script that runs a test, **summarizes the failure using an LLM**, and posts it to Slack.
180
+ - **Enterprise & Production Environments:**
181
+ Companies _hate_ unpredictability. _Classic agents are too risky for production_ because they can behave wildly.
182
+ **Telize provides guardrails.** You know exactly what the workflow is going to do because you mapped out the steps.
183
+ - **Data Pipelines:**
184
+ For **ETL** (_Extract, Transform, Load_) tasks where text needs to be scraped, cleaned by an LLM, and saved to a database, a _YAML flow_ is infinitely better than a multi-agent swarm.
185
+
186
+ ---
187
+
188
+ ### ⚡ Where Telize Might Struggle (_The Limitations_)
189
+ While it is great for **structured automation**, it isn’t a silver bullet:
190
+
191
+ - **Dynamic Decision Making:**
192
+ If a task requires an AI to _dynamically look at a problem, decide it needs to create 3 new files, write code, test it, and self-correct on the fly_, Telize’s static YAML structure will feel **too restrictive**.
193
+ - **Complex State Management:**
194
+ For _highly conversational applications_ (like a customer support chatbot that needs to maintain a complex state over days), a **linear flow runner isn't the right tool**.
195
+
196
+ ---
197
+
198
+ ## How it works
199
+
200
+ 1. Telize loads your YAML and validates it against typed Pydantic models.
201
+ 2. The flow named in `config.entrypoint` runs first.
202
+ 3. Each step executes through a registered action (`input`, `llm`, `shell`, …); `llm` steps resolve their `model:` profile from the top-level `models` map.
203
+ 4. Later steps can reference earlier outputs via Jinja templates.
204
+ 5. The CLI prints progress and results as the workflow runs.
205
+
206
+ ## Workflow reference
207
+
208
+ ### Top-level structure
209
+
210
+ | Key | Description |
211
+ | -------- | ------------------------------------------------------------------- |
212
+ | `config` | Global settings: `entrypoint` (which flow runs first) |
213
+ | `models` | Named LLM profiles; referenced by `model:` on each `uses: llm` step |
214
+ | `flows` | Named flows; `config.entrypoint` must match one of these keys |
215
+
216
+ ### `config`
217
+
218
+ | Field | Description |
219
+ | ------------ | ------------------------------------------------- |
220
+ | `entrypoint` | Name of the flow to run when the file is executed |
221
+
222
+ ### `models`
223
+
224
+ Each key under `models` is a profile name (for example `default`, `creative`). LLM steps pick a profile with `model: <name>`.
225
+
226
+ | Field | Required | Description |
227
+ | --------------- | ------------------------------------- | ------------------------------------------------------------------------------- |
228
+ | `provider` | no (default `openai`) | Registered provider id |
229
+ | `model` | yes | Model id passed to the provider (e.g. `qwen3.5:4b`, `gpt-4o-mini`) |
230
+ | `temperature` | no | Sampling temperature (0–2) |
231
+ | `api_url` | no (default `http://localhost:11434`) | OpenAI-compatible API base URL (`/v1` is appended automatically) |
232
+ | `api_key` | no | API key; use `{{ env.OPENAI_API_KEY }}` or rely on the `OPENAI_API_KEY` env var |
233
+ | `system_prompt` | no | System message for steps using this profile (Jinja at runtime) |
234
+
235
+ Example — multiple profiles:
236
+
237
+ ```yaml
238
+ models:
239
+ factual:
240
+ model: qwen3.5:4b
241
+ temperature: 0.2
242
+ api_url: http://localhost:11434
243
+ system_prompt: Be concise and factual.
244
+
245
+ creative:
246
+ model: qwen3.5:4b
247
+ temperature: 1.0
248
+ api_url: http://localhost:11434
249
+ system_prompt: Be witty but brief.
250
+ ```
251
+
252
+ Load-time env in `api_url` (see [`examples/env_config.yaml`](examples/env_config.yaml)):
253
+
254
+ ```yaml
255
+ models:
256
+ default:
257
+ model: qwen3.5:4b
258
+ api_url: http://{{ env.OLLAMA_HOST }}:11434
259
+ ```
260
+
261
+ ### Flow
262
+
263
+ | Field | Description |
264
+ | ------- | --------------------------------------------------------- |
265
+ | `steps` | List of steps (unique `name` per flow), executed in order |
266
+
267
+ ### Steps (`uses`)
268
+
269
+ | `uses` | Description |
270
+ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
271
+ | `input` | Read a `file` or a `directory` (with glob `include`) |
272
+ | `llm` | Send a `prompt` using a named `model` from `models`; optional `output_to`, `loop` |
273
+ | `shell` | Run `run` commands; optional `envs` (supports templates) |
274
+ | `python` | Call `call` (`module.function`) with `args` |
275
+ | `flow` | Run another flow via `run` |
276
+ | `yaml` | Run an external workflow from `file` (own `config`, `models`, and `flows`); optional `input` map passed to the child as `{{ input.key }}` |
277
+
278
+ ### Templating
279
+
280
+ Telize uses [Jinja2](https://jinja.palletsprojects.com/) in step fields.
281
+
282
+ | When | What you can use |
283
+ | ------------- | ---------------------------------------------------------------------------------------------------------- |
284
+ | **Load time** | `{{ env.VAR }}` — expanded when the file is parsed |
285
+ | **Runtime** | `{{ steps.<name>.output }}`, `{{ models.<name>.model }}`, `{{ input.<key> }}`, `{{ item }}` (inside loops) |
286
+
287
+ Workflow **input** is provided when invoking Telize from the shell (`--input`, `--input-file`, `--input-stdin`) or by a parent `yaml` step's `input` map when running a nested workflow.
288
+
289
+ With `--input-stdin` or `--input-file`, input may be a YAML/JSON mapping (`{"name": "Ada"}` → `{{ input.name }}`) or **plain text** (`echo Hello` or a `.txt` file → `{{ input.text }}`).
290
+
291
+ Example — chain a shell step into an LLM step:
292
+
293
+ ```yaml
294
+ - name: fetch_data
295
+ uses: shell
296
+ run: cat ./data.txt
297
+
298
+ - name: summarize
299
+ uses: llm
300
+ model: default
301
+ prompt: |
302
+ Summarize this:
303
+ {{ steps.fetch_data.output }}
304
+ ```
305
+
306
+ ## Examples
307
+
308
+ | File | What it demonstrates |
309
+ | ---------------------------------------------------------------- | -------------------------------------------------------- |
310
+ | [`examples/spec_reference.yaml`](examples/spec_reference.yaml) | Full specification reference (all step types and fields) |
311
+ | [`examples/minimal_llm.yaml`](examples/minimal_llm.yaml) | Smallest runnable LLM workflow |
312
+ | [`examples/shell_to_llm.yaml`](examples/shell_to_llm.yaml) | Shell → LLM with `{{ steps.*.output }}` |
313
+ | [`examples/read_file.yaml`](examples/read_file.yaml) | `uses: input` — single file |
314
+ | [`examples/read_directory.yaml`](examples/read_directory.yaml) | `uses: input` — directory glob |
315
+ | [`examples/llm_save_output.yaml`](examples/llm_save_output.yaml) | `output_to` — persist LLM text to disk |
316
+ | [`examples/llm_loop.yaml`](examples/llm_loop.yaml) | `loop` — split output and iterate |
317
+ | [`examples/call_subflow.yaml`](examples/call_subflow.yaml) | `uses: flow` — sub-flow in the same file |
318
+ | [`examples/nested_workflow.yaml`](examples/nested_workflow.yaml) | `uses: yaml` — external workflow + `input` |
319
+ | [`examples/python_step.yaml`](examples/python_step.yaml) | `uses: python` — call a Python function |
320
+ | [`examples/multi_model.yaml`](examples/multi_model.yaml) | Multiple named `models` profiles |
321
+ | [`examples/shell_with_env.yaml`](examples/shell_with_env.yaml) | Shell `envs` and load-time `{{ env.* }}` |
322
+ | [`examples/env_config.yaml`](examples/env_config.yaml) | `{{ env.VAR }}` in the `models` section at load time |
323
+
324
+ ## CLI
325
+
326
+ ```
327
+ usage: telize [-h] [--version] [-f FILE] [--validate-only]
328
+
329
+ options:
330
+ -h, --help show help
331
+ --version show version
332
+ -f, --file FILE path to workflow YAML
333
+ --validate-only parse and validate without running steps
334
+ ```
335
+
336
+ ## Development
337
+
338
+ ```bash
339
+ uv sync
340
+ uv run pytest
341
+ uv run ruff check .
342
+ uv run ruff format .
343
+ uv run mypy
344
+ ```
345
+
346
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for pull request guidelines and [CHANGELOG.md](CHANGELOG.md) for release notes.
347
+
348
+ ## Contributing
349
+
350
+ Contributions are welcome — bug reports, docs, and pull requests. Please read [CONTRIBUTING.md](CONTRIBUTING.md) and open an [issue](https://github.com/telize-ai/telize/issues) before large changes.
351
+
352
+ ## License
353
+
354
+ Apache License 2.0 — see [LICENSE](LICENSE).
355
+
356
+ <p align="center">
357
+ <a href="https://github.com/telize-ai/telize">GitHub</a> ·
358
+ <a href="https://github.com/telize-ai/telize/issues">Issues</a> ·
359
+ <a href="CHANGELOG.md">Changelog</a>
360
+ </p>
telize-0.2.3/README.md ADDED
@@ -0,0 +1,322 @@
1
+ # Telize
2
+
3
+ **Build reproducible, structured AI workflows with YAML and run them from your terminal, combining LLMs, shell, Python, and more—fully under your control.**
4
+
5
+ Telize is a low-code framework for building agent-style pipelines: chain shell commands, file I/O, LLM calls, Python functions, and nested flows in a single workflow file. Configuration is validated before execution, and the CLI shows live progress as each step completes.
6
+
7
+ ![Telize CLI demo](https://raw.githubusercontent.com/telize-ai/telize/main/examples/show.gif)
8
+
9
+ [CI](https://github.com/telize-ai/telize/actions/workflows/ci.yml) · [Python 3.12+](https://www.python.org/downloads/) · [License](LICENSE)
10
+
11
+ ---
12
+
13
+ ## Table of contents
14
+
15
+ - [Features](#features)
16
+ - [Requirements](#requirements)
17
+ - [Installation](#installation)
18
+ - [Quick start](#quick-start)
19
+ - [Motivation](#-motivation)
20
+ - [How it works](#how-it-works)
21
+ - [Workflow reference](#workflow-reference)
22
+ - [Examples](#examples)
23
+ - [CLI](#cli)
24
+ - [Development](#development)
25
+ - [Contributing](#contributing)
26
+ - [License](#license)
27
+
28
+ ## Features
29
+
30
+ - **YAML workflows** — one file defines `config`, named `models`, flows, and steps
31
+ - **Composable steps** — `input`, `llm`, `shell`, `python`, `flow`, and `yaml` actions
32
+ - **Jinja templating** — wire step outputs together with `{{ steps.name.output }}`
33
+ - **Loops and sub-flows** — iterate LLM steps over split lists; call nested flows with `uses: flow`
34
+ - **Validated upfront** — Pydantic models catch schema errors before any step runs
35
+ - **Rich CLI output** — progress, step panels, and errors in the terminal
36
+ - **OpenAI-compatible LLMs** — official OpenAI API or local [Ollama](https://ollama.com/) via the same client
37
+
38
+ ## Requirements
39
+
40
+ - **Python 3.12+**
41
+ - **LLM endpoint** for `uses: llm` steps — [OpenAI](https://platform.openai.com/) or [Ollama](https://ollama.com/); set `api_url` on each model profile (default `http://localhost:11434`)
42
+ - Optional: [uv](https://docs.astral.sh/uv/) for fast local development
43
+
44
+ ## Installation
45
+
46
+ ```bash
47
+ pip install telize
48
+ ```
49
+
50
+ From source:
51
+
52
+ ```bash
53
+ git clone https://github.com/telize-ai/telize.git
54
+ cd telize
55
+ uv sync
56
+ uv pip install -e .
57
+ ```
58
+
59
+ Check the install:
60
+
61
+ ```bash
62
+ telize --version
63
+ ```
64
+
65
+ ## Quick start
66
+
67
+ **1.** For local models, start [Ollama](https://ollama.com/) and pull a model:
68
+
69
+ ```bash
70
+ ollama pull qwen3.5:4b # or any model id you set under models.*.model
71
+ ```
72
+
73
+ For OpenAI Cloud, set `OPENAI_API_KEY` and point a model profile at the API, for example `api_url: https://api.openai.com/v1`.
74
+
75
+ **2.** Create `hello.yaml`:
76
+
77
+ ```yaml
78
+ config:
79
+ entrypoint: main
80
+
81
+ models:
82
+ default:
83
+ provider: openai
84
+ model: qwen3.5:4b
85
+ api_url: http://localhost:11434
86
+
87
+ flows:
88
+ main:
89
+ steps:
90
+ - name: greet
91
+ uses: llm
92
+ model: default
93
+ prompt: Say hello in one friendly sentence.
94
+ ```
95
+
96
+ **3.** Run it:
97
+
98
+ ```bash
99
+ telize -f hello.yaml
100
+ ```
101
+
102
+ Validate the file without executing steps:
103
+
104
+ ```bash
105
+ telize -f hello.yaml --validate-only
106
+ ```
107
+
108
+ Run the bundled examples:
109
+
110
+ ```bash
111
+ telize -f examples/minimal_llm.yaml
112
+ telize -f examples/spec_reference.yaml --validate-only
113
+ ```
114
+
115
+ ## 🚀 Motivation
116
+
117
+ **Telize** addresses a massive pain point in the current AI engineering landscape:
118
+ ✨ **unpredictability and unnecessary complexity.**
119
+
120
+ Many popular _frameworks_ force developers to write complex, nested Python code (`LangChain`, `CrewAI`, `AutoGen`) just to string together a few **API calls**, a **bash script**, and an **LLM prompt**.
121
+ This results in heavy, hard-to-maintain codebases that frequently break when APIs change.
122
+
123
+ **Telize essentially acts as the _“GitHub Actions or Ansible for AI.”_**
124
+ By treating LLMs as just another step in a standard automation pipeline, it brings **sanity** back to the engineering process.
125
+
126
+ ---
127
+
128
+ ### ✨ Why it works:
129
+ - **Deterministic Structure + Non-Deterministic AI:**
130
+ It keeps the overall architecture _rigid and predictable_ (`YAML`), while allowing the AI to handle the _fuzzy, creative tasks_ (**text generation, summarization**) within strict boundaries.
131
+ - **Upfront Validation:**
132
+ Running LLM pipelines can be expensive and time-consuming; catching a syntax or configuration error _before_ wasting API credits is a **huge win**.
133
+ - **Low Friction:**
134
+ _Local-first by default_ (`Ollama-ready`) and _zero-code setup_ means a developer can prototype an agentic workflow in **5 minutes** without dealing with dependency hell.
135
+
136
+ ---
137
+
138
+ ### 👥 Who may choose Telize over Classic Agents?
139
+ - **DevOps and System Administrators:**
140
+ People who already love _Ansible_, _Docker Compose_, or _CI/CD pipelines_ may want to gravitate toward Telize or similar sollutions.
141
+ They don't want an **AI Agent** _guessing_ how to deploy code; they want a script that runs a test, **summarizes the failure using an LLM**, and posts it to Slack.
142
+ - **Enterprise & Production Environments:**
143
+ Companies _hate_ unpredictability. _Classic agents are too risky for production_ because they can behave wildly.
144
+ **Telize provides guardrails.** You know exactly what the workflow is going to do because you mapped out the steps.
145
+ - **Data Pipelines:**
146
+ For **ETL** (_Extract, Transform, Load_) tasks where text needs to be scraped, cleaned by an LLM, and saved to a database, a _YAML flow_ is infinitely better than a multi-agent swarm.
147
+
148
+ ---
149
+
150
+ ### ⚡ Where Telize Might Struggle (_The Limitations_)
151
+ While it is great for **structured automation**, it isn’t a silver bullet:
152
+
153
+ - **Dynamic Decision Making:**
154
+ If a task requires an AI to _dynamically look at a problem, decide it needs to create 3 new files, write code, test it, and self-correct on the fly_, Telize’s static YAML structure will feel **too restrictive**.
155
+ - **Complex State Management:**
156
+ For _highly conversational applications_ (like a customer support chatbot that needs to maintain a complex state over days), a **linear flow runner isn't the right tool**.
157
+
158
+ ---
159
+
160
+ ## How it works
161
+
162
+ 1. Telize loads your YAML and validates it against typed Pydantic models.
163
+ 2. The flow named in `config.entrypoint` runs first.
164
+ 3. Each step executes through a registered action (`input`, `llm`, `shell`, …); `llm` steps resolve their `model:` profile from the top-level `models` map.
165
+ 4. Later steps can reference earlier outputs via Jinja templates.
166
+ 5. The CLI prints progress and results as the workflow runs.
167
+
168
+ ## Workflow reference
169
+
170
+ ### Top-level structure
171
+
172
+ | Key | Description |
173
+ | -------- | ------------------------------------------------------------------- |
174
+ | `config` | Global settings: `entrypoint` (which flow runs first) |
175
+ | `models` | Named LLM profiles; referenced by `model:` on each `uses: llm` step |
176
+ | `flows` | Named flows; `config.entrypoint` must match one of these keys |
177
+
178
+ ### `config`
179
+
180
+ | Field | Description |
181
+ | ------------ | ------------------------------------------------- |
182
+ | `entrypoint` | Name of the flow to run when the file is executed |
183
+
184
+ ### `models`
185
+
186
+ Each key under `models` is a profile name (for example `default`, `creative`). LLM steps pick a profile with `model: <name>`.
187
+
188
+ | Field | Required | Description |
189
+ | --------------- | ------------------------------------- | ------------------------------------------------------------------------------- |
190
+ | `provider` | no (default `openai`) | Registered provider id |
191
+ | `model` | yes | Model id passed to the provider (e.g. `qwen3.5:4b`, `gpt-4o-mini`) |
192
+ | `temperature` | no | Sampling temperature (0–2) |
193
+ | `api_url` | no (default `http://localhost:11434`) | OpenAI-compatible API base URL (`/v1` is appended automatically) |
194
+ | `api_key` | no | API key; use `{{ env.OPENAI_API_KEY }}` or rely on the `OPENAI_API_KEY` env var |
195
+ | `system_prompt` | no | System message for steps using this profile (Jinja at runtime) |
196
+
197
+ Example — multiple profiles:
198
+
199
+ ```yaml
200
+ models:
201
+ factual:
202
+ model: qwen3.5:4b
203
+ temperature: 0.2
204
+ api_url: http://localhost:11434
205
+ system_prompt: Be concise and factual.
206
+
207
+ creative:
208
+ model: qwen3.5:4b
209
+ temperature: 1.0
210
+ api_url: http://localhost:11434
211
+ system_prompt: Be witty but brief.
212
+ ```
213
+
214
+ Load-time env in `api_url` (see [`examples/env_config.yaml`](examples/env_config.yaml)):
215
+
216
+ ```yaml
217
+ models:
218
+ default:
219
+ model: qwen3.5:4b
220
+ api_url: http://{{ env.OLLAMA_HOST }}:11434
221
+ ```
222
+
223
+ ### Flow
224
+
225
+ | Field | Description |
226
+ | ------- | --------------------------------------------------------- |
227
+ | `steps` | List of steps (unique `name` per flow), executed in order |
228
+
229
+ ### Steps (`uses`)
230
+
231
+ | `uses` | Description |
232
+ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
233
+ | `input` | Read a `file` or a `directory` (with glob `include`) |
234
+ | `llm` | Send a `prompt` using a named `model` from `models`; optional `output_to`, `loop` |
235
+ | `shell` | Run `run` commands; optional `envs` (supports templates) |
236
+ | `python` | Call `call` (`module.function`) with `args` |
237
+ | `flow` | Run another flow via `run` |
238
+ | `yaml` | Run an external workflow from `file` (own `config`, `models`, and `flows`); optional `input` map passed to the child as `{{ input.key }}` |
239
+
240
+ ### Templating
241
+
242
+ Telize uses [Jinja2](https://jinja.palletsprojects.com/) in step fields.
243
+
244
+ | When | What you can use |
245
+ | ------------- | ---------------------------------------------------------------------------------------------------------- |
246
+ | **Load time** | `{{ env.VAR }}` — expanded when the file is parsed |
247
+ | **Runtime** | `{{ steps.<name>.output }}`, `{{ models.<name>.model }}`, `{{ input.<key> }}`, `{{ item }}` (inside loops) |
248
+
249
+ Workflow **input** is provided when invoking Telize from the shell (`--input`, `--input-file`, `--input-stdin`) or by a parent `yaml` step's `input` map when running a nested workflow.
250
+
251
+ With `--input-stdin` or `--input-file`, input may be a YAML/JSON mapping (`{"name": "Ada"}` → `{{ input.name }}`) or **plain text** (`echo Hello` or a `.txt` file → `{{ input.text }}`).
252
+
253
+ Example — chain a shell step into an LLM step:
254
+
255
+ ```yaml
256
+ - name: fetch_data
257
+ uses: shell
258
+ run: cat ./data.txt
259
+
260
+ - name: summarize
261
+ uses: llm
262
+ model: default
263
+ prompt: |
264
+ Summarize this:
265
+ {{ steps.fetch_data.output }}
266
+ ```
267
+
268
+ ## Examples
269
+
270
+ | File | What it demonstrates |
271
+ | ---------------------------------------------------------------- | -------------------------------------------------------- |
272
+ | [`examples/spec_reference.yaml`](examples/spec_reference.yaml) | Full specification reference (all step types and fields) |
273
+ | [`examples/minimal_llm.yaml`](examples/minimal_llm.yaml) | Smallest runnable LLM workflow |
274
+ | [`examples/shell_to_llm.yaml`](examples/shell_to_llm.yaml) | Shell → LLM with `{{ steps.*.output }}` |
275
+ | [`examples/read_file.yaml`](examples/read_file.yaml) | `uses: input` — single file |
276
+ | [`examples/read_directory.yaml`](examples/read_directory.yaml) | `uses: input` — directory glob |
277
+ | [`examples/llm_save_output.yaml`](examples/llm_save_output.yaml) | `output_to` — persist LLM text to disk |
278
+ | [`examples/llm_loop.yaml`](examples/llm_loop.yaml) | `loop` — split output and iterate |
279
+ | [`examples/call_subflow.yaml`](examples/call_subflow.yaml) | `uses: flow` — sub-flow in the same file |
280
+ | [`examples/nested_workflow.yaml`](examples/nested_workflow.yaml) | `uses: yaml` — external workflow + `input` |
281
+ | [`examples/python_step.yaml`](examples/python_step.yaml) | `uses: python` — call a Python function |
282
+ | [`examples/multi_model.yaml`](examples/multi_model.yaml) | Multiple named `models` profiles |
283
+ | [`examples/shell_with_env.yaml`](examples/shell_with_env.yaml) | Shell `envs` and load-time `{{ env.* }}` |
284
+ | [`examples/env_config.yaml`](examples/env_config.yaml) | `{{ env.VAR }}` in the `models` section at load time |
285
+
286
+ ## CLI
287
+
288
+ ```
289
+ usage: telize [-h] [--version] [-f FILE] [--validate-only]
290
+
291
+ options:
292
+ -h, --help show help
293
+ --version show version
294
+ -f, --file FILE path to workflow YAML
295
+ --validate-only parse and validate without running steps
296
+ ```
297
+
298
+ ## Development
299
+
300
+ ```bash
301
+ uv sync
302
+ uv run pytest
303
+ uv run ruff check .
304
+ uv run ruff format .
305
+ uv run mypy
306
+ ```
307
+
308
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for pull request guidelines and [CHANGELOG.md](CHANGELOG.md) for release notes.
309
+
310
+ ## Contributing
311
+
312
+ Contributions are welcome — bug reports, docs, and pull requests. Please read [CONTRIBUTING.md](CONTRIBUTING.md) and open an [issue](https://github.com/telize-ai/telize/issues) before large changes.
313
+
314
+ ## License
315
+
316
+ Apache License 2.0 — see [LICENSE](LICENSE).
317
+
318
+ <p align="center">
319
+ <a href="https://github.com/telize-ai/telize">GitHub</a> ·
320
+ <a href="https://github.com/telize-ai/telize/issues">Issues</a> ·
321
+ <a href="CHANGELOG.md">Changelog</a>
322
+ </p>
Binary file