Daita Agents · Guide
Let Daita compute, transform and chart your data with Python in an isolated, bounded workspace.
For work SQL cannot do, Daita can run Python: statistics, simulations, text processing, checking structured records, combining datasets, charts. It uses one tool, python_execute, in the Analysis toolbox. The model finds and loads it on demand. See Tools.
Ordinary Python with DuckDB, NumPy, pandas, SciPy, PyArrow, Matplotlib and NetworkX.
| Requirement | Detail |
|---|---|
| Platform | macOS ARM64 |
| Managed installer | Includes the pinned scientific environment |
| Source checkout | pip install -e '.[dev,analysis]' |
On other platforms, or when a package is missing or mismatched, the tool is unavailable. Daita never installs packages at run time and never falls back to an uncontained interpreter. Agent.analysis_runtime() reports availability and package versions without starting a worker.
Ask in plain language:
Fit a trend to monthly paid revenue and chart it with the fitted line.Python state lasts for one run. Variables and scratch files survive between cells of the same run, not between messages or between routine runs.
state_may_have_changed.state_reset: true. Failed code is never replayed.Code reads data through the same tools the model already has. Inside a cell:
result = tools.call("file_read", {"source": "Working folder", "path": "sales.json"})
if result["is_error"]:
raise ValueError(result["output"])
data = result["output"]["data"]tools.call returns output, is_error, evidence_id and sensitivity. tools.batch runs independent reads together. Only read tools already callable in the run can be used. Python cannot load tools, write to a database, make external calls or start a model. Every call shares the run's tool-call allowance and goes through the usual checks.
Always check is_error before using output. A failed read is a result, not necessarily a Python exception. A partial read stays partial: keep reported coverage and limitations in your conclusions.
data_query rows are a bounded preview. For dataset statistics, export the exact result as Arrow and read it in Python:
captured = tools.capture("data_query", export_arguments, name="orders")
if captured["is_error"]:
raise ValueError(captured["output"])
import pyarrow.ipc as ipc
with ipc.open_file(inputs.path("orders")) as reader:
orders = reader.read_all()You can also run data_query(output="arrow") first and pass the artifact in inputs. Capture accepts only the relational Arrow export.
inputs maps names to earlier results or artifacts from the same run:
{"sales": {"kind": "tool_result", "result_ref": "r3"},
"saved": {"kind": "artifact", "artifact_id": "..."}}Supported inputs are JSON, UTF-8 text, CSV, Arrow IPC and Parquet. Job runs can also import artifacts that runs of the same job saved.
Write a file in the scratch directory and register it:
import json
with open("summary.json", "w", encoding="utf-8") as output:
json.dump({"total": 42}, output)
outputs.add("summary", "summary.json")Registering does not publish anything. Set save_output="summary" on the cell, or save_outputs=["summary", "chart"] for up to four, to store them as artifacts. Use one or the other, not both.
| Rule | Detail |
|---|---|
| Formats | CSV, Parquet, JSON, PNG, Markdown, UTF-8 text, Python or SQL source |
| Names | Start with a letter. Letters, digits, _ and - |
| Candidates | 4 per cell, 16 per run |
| Charts | Matplotlib, saved as PNG |
| Failure | A failed save reports save_status="failed". Earlier files stay saved |
Each saved artifact keeps its code, the inputs it used, coverage and an output hash. Agent.artifact_computation_evidence(artifact_id) returns that record, even after history is cleared. Raw input data is not kept, so a result may not be reproducible without it. A run that completed is not proof the analysis is correct.
AgentConfig.analysis_limits takes daita.config.AnalysisLimits. You can narrow limits, within their ceilings.
| Limit | Default |
|---|---|
| Time per cell | 30 seconds (also bounded by the run's remaining time) |
| CPU per run | 120 seconds |
| Memory per worker | 1.5 GiB |
| Scratch space | 64 MiB, 256 files |
| Code per cell | 64 KiB |
| Output per cell | 16 KiB each for stdout and stderr |
| Child reads per cell | 16 |
| Captured inputs and saved outputs | 64 MiB each per run |
| Table parsing | 10 seconds, 128 MiB, 1,000,000 rows, 256 columns |
| Workers | 1 (worker_count, at most 2) |
The worker runs without network, host credentials, Daita state or the ability to start processes. Memory and scratch limits are watched about every 20 ms, not hard quotas, so reported overshoot is real. Print short previews, not full datasets.
Routines can use python_execute within their saved sources. They cannot read local computer files, import retained artifacts or save local files. Jobs and their sub-runs can import artifacts saved by runs of the same job, which is how a job hands tables from one run to the next.
runtime = agent.analysis_runtime()
evidence = await agent.analysis_evidence(run_id)
usage = await agent.analysis_usage(run_id)analysis_evidence returns host-measured facts for a run: CPU, wall time, peak memory, scratch use and child-call counts. Unavailable measurements are null, never zero.