#Goal
Analyze local exports without attaching a directory as a database source or exposing arbitrary filesystem paths.
Suppose the admitted workspace contains:
/absolute/path/project/
└── exports/
├── orders.csv
├── customers.ndjson
└── archive/
└── prior-orders.csv#Admit the Workspace
from pathlib import Path
from daita import Agent, LocalWorkspace
workspace = LocalWorkspace(Path("/absolute/path/project"))
async with await Agent.open("exports", workspace=workspace) as agent:
result = await agent.run(
"Query exports/orders.csv. Summarize order count by status and "
"identify how many rows have a missing customer_id.",
files_only=True,
)
print(result.final_text)The workspace is a runtime admission, not a SourceRegistration. It has no source_id, does not create catalog resources, and does not require refresh after a file changes.
#What the Agent Can Use
The Files toolbox provides:
file_searchto locate files by workspace-relative path or literal text;file_readto read one bounded text chunk; andfile_queryto filter or aggregate a homogeneous CSV, TSV, JSON-records/NDJSON, or Parquet dataset.
For the aggregation above, file_query expands an exact relative pattern and exposes the selected dataset to validated SQL as one relation named data. Daita records the complete input manifest and physical revisions, runs a private one-call DuckDB worker, and returns at most the bounded result projection.
#Containment
The model receives workspace-relative logical paths, never the absolute root. Daita rejects traversal, symlinks, special files, secret-like paths, mixed or incompatible datasets, and files that change during a cursor or query binding.
There is no attached CSV/JSON source and no data_read_file tool in the current framework.
See Local Workspace for file-query bounds and the approved text-edit workflow.