Working With Your Data, Safely: Files, Approvals and Memory
dotnet shows how to move from a “read-only” agent to one that can safely work with your data by adding controlled file access, approval gates for risky actions, and memory that survives restarts.
Overview
Adding file access for real data
The episode extends the agent so it can:
- Read a real
portfolio.csvfrom disk. - Write generated reports back to disk.
This turns the agent from something that can only discuss markets into something that can operate on local data and produce artifacts you can keep.
Putting sensitive tools behind explicit approval
To prevent the agent from doing something it shouldn’t, the episode places a place_trade tool behind an explicit human approval step.
Reducing approval fatigue with auto-approval rules
Approving every single read is impractical, so the episode adds:
- Auto-approval rules for calls considered safe.
- One custom rule that allows the agent to clear small trades on its own.
Durable memory that survives restarts
The episode finishes by adding durable memory in two forms:
- Files curated by the agent (agent-managed artifacts on disk).
- Facts extracted automatically by Foundry (structured memory extracted from interactions).
Both memory types are demonstrated to persist across an agent restart.
Series links
- Series page: https://aka.ms/FMTA/series
- Resource: https://aka.ms/AgentHarness