Oracle DBFS (Database File System) is a POSIX-like filesystem layered on SecureFile LOBs in a table. The agent sees files and directories; the database sees rows. Same backups, same audit, same security model as everything else in the harness — but with open()/read()/write() ergonomics.
The Codespace ran app/scripts/bootstrap.py, which provisions:
AGENT_DBFS_TS with a dedicated datafile.AGENT_SCRATCH (DBMS_DBFS_SFS.CREATEFILESYSTEM + DBMS_DBFS_CONTENT.REGISTERSTORE)./scratch (DBMS_DBFS_CONTENT.MOUNTSTORE).EXECUTE ON DBMS_DBFS_CONTENT, EXECUTE ON DBMS_DBFS_SFS, DBFS_ROLE).You don’t run any DDL in this Part. The notebook just wraps the PL/SQL PUTPATH / GETPATH calls behind a Python class so the rest of the harness can use read / write / append semantics.
Three reasons:
/scratch/draft.sql between calls without serializing a row id.We use DBFS only as the agent’s scratchpad — the long-term, search-heavy data stays in Part 2’s OAMP tables.
DBFS Python wrapperMinimal file-like wrapper. Only the methods the agent uses:
| Method | What it does | Use when |
|---|---|---|
write(path, content) |
Create-or-overwrite the file at path. |
SQL drafts, plan revisions — “latest is the truth” |
append(path, content) |
Append to path, create if missing. |
Running findings logs, transcripts |
read(path) |
Read the bytes back as a string. | Reading scratch before passing to run_sql |
list(path) |
Enumerate files under path. |
Inspecting state |
The agent uses these via three pre-registered tools: scratch_write, scratch_append, scratch_read.
/tmp?Because we want the scratchpad to live inside the database:
No separate filesystem to secure.
scratch_write for drafts, scratch_append for logs. Write replaces (SQL drafts, plan revisions); append grows (findings logs, transcripts).scratch_append per row of data is wasteful and burns the iteration budget. Combine many rows into one call.ORA-64001: path not found — File doesn’t exist. Either scratch.write it first or catch FileNotFoundError.
ORA-22288: file or LOB operation FILEOPEN failed — The DBFS store isn’t mounted. Re-run app/scripts/bootstrap.py.
PLS-00306: wrong number or types of arguments in call to PUTPATH — Wrong Oracle DBFS version. Ensure you’re on Oracle 23ai / 26ai.