ts-agents 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.
Files changed (115) hide show
  1. ts_agents-0.1.1/LICENSE +21 -0
  2. ts_agents-0.1.1/PKG-INFO +449 -0
  3. ts_agents-0.1.1/README.md +399 -0
  4. ts_agents-0.1.1/pyproject.toml +93 -0
  5. ts_agents-0.1.1/setup.cfg +4 -0
  6. ts_agents-0.1.1/tests/test_examples_forecasting_m4_monthly_mini.py +176 -0
  7. ts_agents-0.1.1/tests/test_hosted_app.py +39 -0
  8. ts_agents-0.1.1/tests/test_package_metadata.py +27 -0
  9. ts_agents-0.1.1/ts_agents/__init__.py +9 -0
  10. ts_agents-0.1.1/ts_agents/__main__.py +12 -0
  11. ts_agents-0.1.1/ts_agents/agents/__init__.py +37 -0
  12. ts_agents-0.1.1/ts_agents/agents/benchmarks/__init__.py +36 -0
  13. ts_agents-0.1.1/ts_agents/agents/benchmarks/metrics.py +376 -0
  14. ts_agents-0.1.1/ts_agents/agents/benchmarks/runner.py +551 -0
  15. ts_agents-0.1.1/ts_agents/agents/benchmarks/scenarios.py +344 -0
  16. ts_agents-0.1.1/ts_agents/agents/deep/__init__.py +75 -0
  17. ts_agents-0.1.1/ts_agents/agents/deep/orchestrator.py +709 -0
  18. ts_agents-0.1.1/ts_agents/agents/deep/subagents/__init__.py +23 -0
  19. ts_agents-0.1.1/ts_agents/agents/deep/subagents/classification.py +124 -0
  20. ts_agents-0.1.1/ts_agents/agents/deep/subagents/decomposition.py +98 -0
  21. ts_agents-0.1.1/ts_agents/agents/deep/subagents/forecasting.py +100 -0
  22. ts_agents-0.1.1/ts_agents/agents/deep/subagents/patterns.py +110 -0
  23. ts_agents-0.1.1/ts_agents/agents/deep/subagents/turbulence.py +118 -0
  24. ts_agents-0.1.1/ts_agents/agents/simple/__init__.py +26 -0
  25. ts_agents-0.1.1/ts_agents/agents/simple/agent.py +565 -0
  26. ts_agents-0.1.1/ts_agents/agents/simple/prompts.py +220 -0
  27. ts_agents-0.1.1/ts_agents/cli/__init__.py +5 -0
  28. ts_agents-0.1.1/ts_agents/cli/main.py +1661 -0
  29. ts_agents-0.1.1/ts_agents/cli/output.py +217 -0
  30. ts_agents-0.1.1/ts_agents/cli/skills.py +521 -0
  31. ts_agents-0.1.1/ts_agents/config.py +189 -0
  32. ts_agents-0.1.1/ts_agents/core/__init__.py +88 -0
  33. ts_agents-0.1.1/ts_agents/core/base.py +310 -0
  34. ts_agents-0.1.1/ts_agents/core/classification/__init__.py +45 -0
  35. ts_agents-0.1.1/ts_agents/core/classification/convolution.py +208 -0
  36. ts_agents-0.1.1/ts_agents/core/classification/distance_based.py +195 -0
  37. ts_agents-0.1.1/ts_agents/core/classification/hybrid.py +220 -0
  38. ts_agents-0.1.1/ts_agents/core/classification/utils.py +25 -0
  39. ts_agents-0.1.1/ts_agents/core/comparison.py +629 -0
  40. ts_agents-0.1.1/ts_agents/core/complexity/__init__.py +287 -0
  41. ts_agents-0.1.1/ts_agents/core/decomposition/__init__.py +22 -0
  42. ts_agents-0.1.1/ts_agents/core/decomposition/holt_winters.py +148 -0
  43. ts_agents-0.1.1/ts_agents/core/decomposition/hp_filter.py +133 -0
  44. ts_agents-0.1.1/ts_agents/core/decomposition/mstl.py +121 -0
  45. ts_agents-0.1.1/ts_agents/core/decomposition/stl.py +115 -0
  46. ts_agents-0.1.1/ts_agents/core/forecasting/__init__.py +25 -0
  47. ts_agents-0.1.1/ts_agents/core/forecasting/statistical.py +456 -0
  48. ts_agents-0.1.1/ts_agents/core/patterns/__init__.py +53 -0
  49. ts_agents-0.1.1/ts_agents/core/patterns/matrix_profile.py +304 -0
  50. ts_agents-0.1.1/ts_agents/core/patterns/peaks.py +182 -0
  51. ts_agents-0.1.1/ts_agents/core/patterns/recurrence.py +174 -0
  52. ts_agents-0.1.1/ts_agents/core/patterns/segmentation.py +312 -0
  53. ts_agents-0.1.1/ts_agents/core/spectral/__init__.py +31 -0
  54. ts_agents-0.1.1/ts_agents/core/spectral/coherence.py +187 -0
  55. ts_agents-0.1.1/ts_agents/core/spectral/psd.py +218 -0
  56. ts_agents-0.1.1/ts_agents/core/statistics/__init__.py +24 -0
  57. ts_agents-0.1.1/ts_agents/core/statistics/descriptive.py +235 -0
  58. ts_agents-0.1.1/ts_agents/core/windowing/__init__.py +29 -0
  59. ts_agents-0.1.1/ts_agents/core/windowing/selection.py +734 -0
  60. ts_agents-0.1.1/ts_agents/data_access.py +126 -0
  61. ts_agents-0.1.1/ts_agents/data_loader.py +76 -0
  62. ts_agents-0.1.1/ts_agents/hosted_app.py +54 -0
  63. ts_agents-0.1.1/ts_agents/persistence/__init__.py +93 -0
  64. ts_agents-0.1.1/ts_agents/persistence/experiment_log.py +601 -0
  65. ts_agents-0.1.1/ts_agents/persistence/results_cache.py +568 -0
  66. ts_agents-0.1.1/ts_agents/persistence/session_store.py +428 -0
  67. ts_agents-0.1.1/ts_agents/py.typed +1 -0
  68. ts_agents-0.1.1/ts_agents/resources/__init__.py +2 -0
  69. ts_agents-0.1.1/ts_agents/resources/data/README.md +109 -0
  70. ts_agents-0.1.1/ts_agents/resources/data/demo_labeled_stream.csv +4801 -0
  71. ts_agents-0.1.1/ts_agents/resources/data/m4_monthly_mini.csv +1467 -0
  72. ts_agents-0.1.1/ts_agents/resources/data/make_synthetic_labeled_stream.py +306 -0
  73. ts_agents-0.1.1/ts_agents/resources/data/short_real.csv +11 -0
  74. ts_agents-0.1.1/ts_agents/resources/demo/README.md +142 -0
  75. ts_agents-0.1.1/ts_agents/resources/demo/assets/demo.gif +0 -0
  76. ts_agents-0.1.1/ts_agents/resources/demo/demo.tape +29 -0
  77. ts_agents-0.1.1/ts_agents/resources/demo/demo_forecasting.tape +29 -0
  78. ts_agents-0.1.1/ts_agents/resources/demo/demo_wisdm.tape +29 -0
  79. ts_agents-0.1.1/ts_agents/resources/demo/plot_confusion_matrix.py +70 -0
  80. ts_agents-0.1.1/ts_agents/resources/demo/plot_window_selection.py +55 -0
  81. ts_agents-0.1.1/ts_agents/resources/demo/report_template.md +105 -0
  82. ts_agents-0.1.1/ts_agents/resources/skills/README.md +90 -0
  83. ts_agents-0.1.1/ts_agents/resources/skills/activity-recognition/SKILL.md +121 -0
  84. ts_agents-0.1.1/ts_agents/resources/skills/classification/SKILL.md +107 -0
  85. ts_agents-0.1.1/ts_agents/resources/skills/decomposition/SKILL.md +83 -0
  86. ts_agents-0.1.1/ts_agents/resources/skills/diagnostics/SKILL.md +96 -0
  87. ts_agents-0.1.1/ts_agents/resources/skills/forecasting/SKILL-pro.md +95 -0
  88. ts_agents-0.1.1/ts_agents/resources/skills/forecasting/SKILL.md +135 -0
  89. ts_agents-0.1.1/ts_agents/runtime_paths.py +51 -0
  90. ts_agents-0.1.1/ts_agents/sandbox/__init__.py +12 -0
  91. ts_agents-0.1.1/ts_agents/sandbox/modal_app.py +109 -0
  92. ts_agents-0.1.1/ts_agents/sandbox/runner.py +99 -0
  93. ts_agents-0.1.1/ts_agents/tools/__init__.py +165 -0
  94. ts_agents-0.1.1/ts_agents/tools/agent_tools.py +838 -0
  95. ts_agents-0.1.1/ts_agents/tools/bundles.py +599 -0
  96. ts_agents-0.1.1/ts_agents/tools/executor.py +1593 -0
  97. ts_agents-0.1.1/ts_agents/tools/registry.py +1741 -0
  98. ts_agents-0.1.1/ts_agents/tools/results.py +679 -0
  99. ts_agents-0.1.1/ts_agents/tools/wrappers.py +536 -0
  100. ts_agents-0.1.1/ts_agents/ui/__init__.py +33 -0
  101. ts_agents-0.1.1/ts_agents/ui/components/__init__.py +20 -0
  102. ts_agents-0.1.1/ts_agents/ui/components/chat.py +327 -0
  103. ts_agents-0.1.1/ts_agents/ui/components/classification.py +448 -0
  104. ts_agents-0.1.1/ts_agents/ui/components/comparison.py +556 -0
  105. ts_agents-0.1.1/ts_agents/ui/components/decomposition.py +301 -0
  106. ts_agents-0.1.1/ts_agents/ui/components/forecasting.py +364 -0
  107. ts_agents-0.1.1/ts_agents/ui/components/patterns.py +551 -0
  108. ts_agents-0.1.1/ts_agents/ui/gradio_app.py +435 -0
  109. ts_agents-0.1.1/ts_agents/ui/state.py +164 -0
  110. ts_agents-0.1.1/ts_agents.egg-info/PKG-INFO +449 -0
  111. ts_agents-0.1.1/ts_agents.egg-info/SOURCES.txt +113 -0
  112. ts_agents-0.1.1/ts_agents.egg-info/dependency_links.txt +1 -0
  113. ts_agents-0.1.1/ts_agents.egg-info/entry_points.txt +4 -0
  114. ts_agents-0.1.1/ts_agents.egg-info/requires.txt +30 -0
  115. ts_agents-0.1.1/ts_agents.egg-info/top_level.txt +1 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Farrukh Nauman
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,449 @@
1
+ Metadata-Version: 2.4
2
+ Name: ts-agents
3
+ Version: 0.1.1
4
+ Summary: Time series analysis toolkit with CLI, agents, and Gradio UI
5
+ Author-email: Farrukh Nauman <farrukhnauman@yahoo.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://fnauman.github.io/ts-agents/
8
+ Project-URL: Documentation, https://fnauman.github.io/ts-agents/
9
+ Project-URL: Repository, https://github.com/fnauman/ts-agents
10
+ Project-URL: Issues, https://github.com/fnauman/ts-agents/issues
11
+ Project-URL: Changelog, https://github.com/fnauman/ts-agents/blob/main/CHANGELOG.md
12
+ Keywords: time-series,agents,forecasting,classification,cli
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Scientific/Engineering
21
+ Classifier: Typing :: Typed
22
+ Requires-Python: <3.14,>=3.11
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: aeon>=1.3.0
26
+ Requires-Dist: coreforecast>=0.0.16
27
+ Requires-Dist: datasetsforecast>=1.0.0
28
+ Requires-Dist: gradio>=6.0
29
+ Requires-Dist: langchain>=1.0
30
+ Requires-Dist: langchain-community>=0.4.1
31
+ Requires-Dist: langchain-openai>=1.1.0
32
+ Requires-Dist: langgraph>=1.0
33
+ Requires-Dist: matplotlib>=3.10.7
34
+ Requires-Dist: mlforecast>=1.0.2
35
+ Requires-Dist: neuralforecast>=3.1.2
36
+ Requires-Dist: numpy>=2.2.6; python_version >= "3.12"
37
+ Requires-Dist: numpy<1.27,>=1.22; python_version < "3.12" and sys_platform == "win32"
38
+ Requires-Dist: numpy>=1.22; python_version < "3.12" and sys_platform != "win32"
39
+ Requires-Dist: pandas>=2.3.3
40
+ Requires-Dist: pydantic>=2.7.4
41
+ Requires-Dist: scikit-learn>=1.7.2
42
+ Requires-Dist: scipy>=1.13.0
43
+ Requires-Dist: sktime>=0.40.1
44
+ Requires-Dist: statsforecast>=2.0.3
45
+ Requires-Dist: statsmodels>=0.14.2
46
+ Requires-Dist: stumpy>=1.13.0
47
+ Requires-Dist: ruptures>=1.1.9
48
+ Requires-Dist: pyyaml>=6.0.2
49
+ Dynamic: license-file
50
+
51
+ # ts-agents
52
+
53
+ [![Docs](https://img.shields.io/badge/docs-online-blue)](https://fnauman.github.io/ts-agents/)
54
+ [![Python](https://img.shields.io/badge/python-3.11--3.13-3776AB)](#installation)
55
+ [![License](https://img.shields.io/badge/license-MIT-2EA44F)](https://github.com/fnauman/ts-agents/blob/main/LICENSE)
56
+
57
+ `ts-agents` is a CLI-first toolkit for time-series analysis and agent-driven
58
+ automation. It combines:
59
+ - a stable CLI contract for reproducible runs (`ts-agents`)
60
+ - inspectable artifacts instead of chat-only outputs (plots, JSON, reports)
61
+ - optional sandboxes for safer execution (`local`, `subprocess`, `docker`, `daytona`, `modal`)
62
+ - both a Gradio UI (`ts-agents-ui`) and tool-driven agents (simple + deep)
63
+
64
+ It ships with two out-of-the-box demos:
65
+ - `window-classification` (synthetic labeled-stream window-size selection + evaluation)
66
+ - `forecasting` (baseline comparison and report artifacts)
67
+
68
+ Source-checkout-only datasets such as `data/wisdm_subset.csv` are documented
69
+ separately and are not part of the published wheel.
70
+
71
+ **Start here:** [Quickstart](#quickstart) | [Choose your path](#choose-your-path) | [Docs site](https://fnauman.github.io/ts-agents/) | [Distribution guide](https://fnauman.github.io/ts-agents/distribution.html) | [Demo walkthroughs](https://fnauman.github.io/ts-agents/walkthroughs.html) | [Hosted demo guide](https://fnauman.github.io/ts-agents/huggingface-spaces.html)
72
+
73
+ ![ts-agents demo](https://raw.githubusercontent.com/fnauman/ts-agents/main/demo/assets/demo.gif)
74
+
75
+ ## Table of Contents
76
+
77
+ - [Choose your path](#choose-your-path)
78
+ - [Why ts-agents instead of using statsforecast/sktime/aeon directly?](#why-ts-agents-instead-of-using-statsforecastsktimeaeon-directly)
79
+ - [Design principles](#design-principles)
80
+ - [Quickstart](#quickstart)
81
+ - [Installation](#installation)
82
+ - [CLI usage](#cli-usage)
83
+ - [Gradio app](#gradio-app)
84
+ - [Sandbox backends](#sandbox-backends)
85
+ - [Guides](#guides)
86
+ - [Development](#development)
87
+
88
+ ## Choose Your Path
89
+
90
+ ### 1. Run a deterministic demo in under a minute
91
+
92
+ Use the scripted flows when you want a quick proof that the toolchain works,
93
+ without requiring an LLM key.
94
+
95
+ ```bash
96
+ uv sync
97
+ uv run ts-agents demo window-classification --no-llm
98
+ uv run ts-agents demo forecasting --no-llm
99
+ ```
100
+
101
+ ### 2. Use the CLI on bundled or custom data
102
+
103
+ Use the CLI when you want reproducible commands, saved artifacts, and easy
104
+ automation.
105
+
106
+ ```bash
107
+ ts-agents tool list --bundle demo
108
+ ts-agents run stl_decompose_with_data --run Re200Rm200 --var bx001_real
109
+ ts-agents demo window-classification --no-llm
110
+ ```
111
+
112
+ ### 3. Launch the UI or prepare a hosted demo
113
+
114
+ Use the Gradio app for interactive exploration, or the hosted entrypoint for a
115
+ public manual-mode deployment.
116
+
117
+ ```bash
118
+ ts-agents-ui
119
+ ts-agents-hosted
120
+ ```
121
+
122
+ For hosted deployment details, see [Hosted demo guide](https://fnauman.github.io/ts-agents/huggingface-spaces.html).
123
+
124
+ ## Why ts-agents Instead of Using statsforecast/sktime/aeon Directly?
125
+
126
+ Those libraries are excellent algorithm/toolkit layers, and `ts-agents`
127
+ intentionally builds on that ecosystem rather than trying to replace it.
128
+
129
+ Use the underlying libraries directly when:
130
+ - you only need one modeling library inside a notebook or a custom pipeline
131
+ - you do not need artifacts, tool routing, or sandboxed execution
132
+
133
+ Use `ts-agents` when you want:
134
+ - a stable CLI contract that works the same across demos, agents, and automation
135
+ - artifact-first outputs (plots, JSON, markdown/report assets) instead of chat-only responses
136
+ - reusable skills and tool bundles that encode workflow guidance
137
+ - optional sandbox backends for isolation, deployment, and heavier workloads
138
+ - swappable front ends: CLI, Gradio UI, or custom agent orchestration
139
+
140
+ ## Design Principles
141
+
142
+ - **CLI as the stable contract**: `ts-agents` is the primary interface for automation and reproducibility.
143
+ - **Framework adapters, not framework lock-in**: LangChain/deep-agent wrappers are convenience layers over the same tool registry.
144
+ - **Artifacts over chat**: tools produce inspectable files (plots, JSON, reports), and agents return summaries plus paths.
145
+ - **Swappable front-ends**: CLI agents, custom agents, and Gradio are interfaces around the same core tools.
146
+ - **Sandboxed execution**: backends can isolate dependencies and scale heavier workloads.
147
+
148
+ Canonical design docs:
149
+ - `docs/philosophy.qmd`
150
+ - `docs/architecture.qmd`
151
+
152
+ ## Quickstart
153
+
154
+ ```bash
155
+ uv sync
156
+ uv run ts-agents demo window-classification --no-llm
157
+ uv run ts-agents demo forecasting --no-llm
158
+ ```
159
+
160
+ LLM-backed demo/report mode requires `OPENAI_API_KEY`. Either export it
161
+ directly or add it to `~/.env` (one `KEY=VALUE` per line; the app loads this
162
+ file automatically and will not overwrite variables already in your shell):
163
+
164
+ ```bash
165
+ # Option A: export in your shell
166
+ export OPENAI_API_KEY=your-key
167
+
168
+ # Option B: store in ~/.env (loaded automatically)
169
+ echo 'OPENAI_API_KEY=your-key' >> ~/.env
170
+ ```
171
+
172
+ ```bash
173
+ uv run ts-agents demo window-classification
174
+ ```
175
+
176
+ The demo writes plots to `outputs/demo/` (e.g. `window_scores.png`).
177
+
178
+ ## Installation
179
+
180
+ Prerequisites:
181
+ - Python 3.11, 3.12, or 3.13
182
+ - [uv](https://github.com/astral-sh/uv)
183
+
184
+ Install from PyPI:
185
+
186
+ ```bash
187
+ python -m pip install ts-agents
188
+ ```
189
+
190
+ The default install is intentionally all-in-one and pulls a fairly heavy
191
+ forecasting/ML stack, including neural backends used by the shipped tool
192
+ surface. There is not yet a slim extras-based install profile, so plan for a
193
+ full scientific Python environment.
194
+ The dependency minimums also intentionally track the currently validated
195
+ `0.1.1` stack for this alpha release; widening lower-bound compatibility
196
+ is a follow-up task rather than part of the initial publish gate.
197
+
198
+ Run the packaged entrypoints:
199
+
200
+ ```bash
201
+ ts-agents --help
202
+ ts-agents-ui --help
203
+ ```
204
+
205
+ If you are running from a source checkout with `uv sync`, prefix the CLI
206
+ commands below with `uv run`.
207
+
208
+ Source checkout setup:
209
+
210
+ ```bash
211
+ git clone https://github.com/fnauman/ts-agents.git
212
+ cd ts-agents
213
+ uv sync
214
+ ```
215
+
216
+ Local editable install from a source checkout:
217
+
218
+ ```bash
219
+ python -m pip install -e .
220
+ ```
221
+
222
+ Publishing setup in this repo targets:
223
+ - PyPI package name: `ts-agents`
224
+ - sandbox image: `ghcr.io/fnauman/ts-agents-sandbox`
225
+
226
+ See [Distribution guide](https://fnauman.github.io/ts-agents/distribution.html) for the release, PyPI, and
227
+ GHCR publishing flow.
228
+
229
+ CLI entrypoints:
230
+ - Preferred: `ts-agents ...`
231
+ - Also supported: `python -m ts_agents ...`
232
+ - Gradio UI: `ts-agents-ui`
233
+ - Hosted profile: `ts-agents-hosted`
234
+
235
+ ### Environment variables
236
+
237
+ All optional. Set them via `export` or in `~/.env`.
238
+
239
+ | Variable | Purpose | Default |
240
+ |----------|---------|---------|
241
+ | `OPENAI_API_KEY` | LLM agent/demo features | _(none — required for LLM mode)_ |
242
+ | `OPENAI_MODEL` | Model override | `gpt-5-mini` |
243
+ | `TS_AGENTS_DATA_DIR` | Full dataset path | bundled package data (or repo `./data`) |
244
+ | `TS_AGENTS_USE_TEST_DATA` | Use bundled test data | `true` |
245
+ | `TS_AGENTS_TEST_DATA_FILE` | Override test dataset filename | `short_real.csv` |
246
+ | `TS_AGENTS_SANDBOX_MODE` | Default sandbox backend | `local` |
247
+
248
+ Sandbox-specific environment variables (Docker/Daytona/Modal auth, snapshots,
249
+ streaming, and log files) are documented in `SANDBOX.md`.
250
+
251
+ ### Hosted Demo Deployment
252
+
253
+ The installed package includes a hosted Gradio profile at `ts-agents-hosted`
254
+ intended for public demos such as Hugging Face Spaces. Source-checkout
255
+ deployments can still use the root `app.py` wrapper. It defaults to:
256
+ - manual analysis mode (`agent` disabled)
257
+ - no session persistence
258
+ - a public-safe configuration that does not require `OPENAI_API_KEY`
259
+
260
+ See [Hosted demo guide](https://fnauman.github.io/ts-agents/huggingface-spaces.html) for deployment instructions and optional agent-mode configuration.
261
+
262
+ ## Distribution
263
+
264
+ - Package metadata is configured for the `ts-agents` distribution name.
265
+ - GitHub Actions includes a PyPI publish workflow for tagged releases.
266
+ - GitHub Actions includes a GHCR workflow for publishing the sandbox image built
267
+ from `Dockerfile.sandbox`.
268
+ - GitHub release/tag/docs flow is summarized in [Distribution guide](https://fnauman.github.io/ts-agents/distribution.html).
269
+
270
+ ## CLI Usage
271
+
272
+ ### Discover data and tools
273
+
274
+ ```bash
275
+ ts-agents data list
276
+ ts-agents data vars
277
+ ts-agents tool list
278
+ ts-agents tool list --bundle demo
279
+ ```
280
+
281
+ ### Run tools directly
282
+
283
+ ```bash
284
+ ts-agents run stl_decompose_with_data --run Re200Rm200 --var bx001_real
285
+ ts-agents run forecast_theta_with_data --run Re200Rm200 --var bx001_real --param horizon=30
286
+ ```
287
+
288
+ ### Save output and extract embedded images
289
+
290
+ ```bash
291
+ ts-agents run forecast_theta_with_data \
292
+ --run Re200Rm200 \
293
+ --var bx001_real \
294
+ --param horizon=30 \
295
+ --save outputs/Re200Rm200/theta.txt \
296
+ --extract-images outputs/Re200Rm200/assets
297
+ ```
298
+
299
+ ### Agent mode
300
+
301
+ ```bash
302
+ ts-agents agent run "Find peaks in bx001_real for Re200Rm200"
303
+ ts-agents agent run --type deep "Compare forecasting methods for bx001_real"
304
+ ```
305
+
306
+ ### Demos
307
+
308
+ ```bash
309
+ # Scripted (no API key required)
310
+ ts-agents demo window-classification --no-llm
311
+ ts-agents demo forecasting --no-llm
312
+
313
+ # LLM-backed report mode
314
+ ts-agents demo window-classification
315
+ ts-agents demo forecasting
316
+ ```
317
+
318
+ Skill mapping for end-to-end demo runs:
319
+ - `demo window-classification` -> `activity-recognition` skill
320
+ - `demo forecasting` -> `forecasting` skill
321
+
322
+ Note: the WISDM example under `data/wisdm_subset.csv` is a source-checkout
323
+ workflow and is not bundled into the published wheel.
324
+
325
+ Example prompt for Claude Code:
326
+
327
+ ```text
328
+ Use the `time-series-activity-recognition` skill. Run `ts-agents demo window-classification --no-llm`, save outputs under `outputs/demo/`, and produce `outputs/reports/REPORT.qmd` plus `outputs/reports/REPORT.pdf`.
329
+ ```
330
+
331
+ Example prompt for Codex:
332
+
333
+ ```text
334
+ Use the `forecasting` skill. Run `ts-agents demo forecasting --no-llm`, summarize the outputs, and generate `outputs/reports/REPORT.qmd` plus `outputs/reports/REPORT.pdf`.
335
+ ```
336
+
337
+ For polished deliverables, generate a Quarto report and render to PDF:
338
+
339
+ ```bash
340
+ quarto render outputs/reports/REPORT.qmd --to pdf
341
+ ```
342
+
343
+ ### Skills
344
+
345
+ ```bash
346
+ ts-agents skills list
347
+ ts-agents skills validate
348
+ ts-agents skills export --all-agents
349
+ ts-agents skills export --all-agents --symlink
350
+ ```
351
+
352
+ Canonical skills are intentionally limited to a focused set in `skills/`.
353
+ Agent-specific folders are generated on demand via `skills export` and are not
354
+ tracked in this repository.
355
+
356
+ Copy vs symlink guidance:
357
+ - Use **copies** (default export mode) for CI, sharing, and cross-platform reliability.
358
+ - Use `--symlink` only for local Unix-like development when you want zero-copy edits.
359
+
360
+ ## Gradio App
361
+
362
+ Run the app:
363
+
364
+ ```bash
365
+ ts-agents-ui
366
+ ```
367
+
368
+ Useful options:
369
+
370
+ ```bash
371
+ ts-agents-ui --agent-type deep
372
+ ts-agents-ui --no-agent
373
+ ts-agents-ui --share
374
+ ts-agents-ui --port 8080
375
+ ```
376
+
377
+ ## Sandbox Backends
378
+
379
+ Tools run inside a sandbox. Pick one with `--sandbox <mode>` or set
380
+ `TS_AGENTS_SANDBOX_MODE`.
381
+
382
+ | Mode | Isolation | Requirements |
383
+ |------|-----------|--------------|
384
+ | **local** _(default)_ | None (in-process) | — |
385
+ | **subprocess** | Separate Python process | — |
386
+ | **docker** | Container | Docker running; build image first: `./build_docker_sandbox.sh` |
387
+ | **daytona** | Cloud sandbox | `pip install daytona` + `DAYTONA_API_KEY` ([Daytona docs](https://www.daytona.io/docs)); default bootstrap clones this repo + runs `pip install -e` |
388
+ | **modal** | Serverless cloud | Source-checkout deployment path: `pip install modal`, run `modal token new` (opens browser auth) or set `MODAL_TOKEN_ID`/`MODAL_TOKEN_SECRET`, then from the repo root deploy with `modal deploy -m ts_agents.sandbox.modal_app --env main --name ts-agents-sandbox` |
389
+
390
+ If the chosen backend is unavailable at runtime the executor falls back to
391
+ **local** with a warning.
392
+
393
+ For full details (env vars, resource limits, networking), see `SANDBOX.md`.
394
+
395
+ ## Guides
396
+
397
+ - Quickstart: `docs/quickstart.qmd`
398
+ - Demo walkthroughs: `docs/walkthroughs.qmd`
399
+ - Demo scripts: `demo/README.md`
400
+ - Data generation and licensing notes: `data/README.md`
401
+ - Docs home: `docs/index.qmd`
402
+ - Project philosophy: `docs/philosophy.qmd`
403
+ - Architecture: `docs/architecture.qmd`
404
+ - Project roadmap and priorities: `ROADMAP.md`
405
+ - Design philosophy slides (Quarto source): `docs/talks/ts_agents_talk.qmd`
406
+
407
+ ## Community
408
+
409
+ - Contributing guide: `CONTRIBUTING.md`
410
+ - Code of Conduct: `CODE_OF_CONDUCT.md`
411
+
412
+ ## Repository Layout
413
+
414
+ - `main.py` - Gradio app entrypoint
415
+ - `ts_agents/cli/` - CLI parser, command handlers, output helpers
416
+ - `ts_agents/core/` - pure time-series algorithms
417
+ - `ts_agents/tools/` - tool registry, wrappers, execution/sandbox routing
418
+ - `ts_agents/agents/` - simple and deep agent implementations
419
+ - `ts_agents/ui/` - Gradio tabs/components
420
+ - `ts_agents/persistence/` - cache/session/experiment logging
421
+ - `tests/` - unit and CLI tests
422
+ - `data/` - sample datasets and data generation/download scripts
423
+ - `skills/` - canonical skill definitions
424
+ - `build_docker_sandbox.sh` + `Dockerfile.sandbox` - Docker sandbox build assets
425
+
426
+ ## Development
427
+
428
+ Run tests:
429
+
430
+ ```bash
431
+ uv run python -m pytest -q
432
+ ```
433
+
434
+ Run CLI test suite only:
435
+
436
+ ```bash
437
+ uv run python -m pytest -q tests/cli
438
+ ```
439
+
440
+ Render docs site locally (Quarto):
441
+
442
+ ```bash
443
+ quarto render docs
444
+ quarto preview docs
445
+ ```
446
+
447
+ ## License
448
+
449
+ [MIT](https://github.com/fnauman/ts-agents/blob/main/LICENSE)