# `ReqManagedAgents.Providers.ClaudeManagedAgents.Artifacts`
[🔗](https://github.com/cash-mckeeman/req_managed_agents/blob/v0.13.0/req_managed_agents/lib/req_managed_agents/providers/claude_managed_agents/artifacts.ex#L1)

`ReqManagedAgents.Artifacts` store over the Anthropic Files API, scoped to one
session. `list` uses the session-scoped file listing (the only way to discover
server-minted file ids for files the agent wrote); `fetch`/`delete` act on the
newest record when a name appears more than once (re-runs accumulate);
`put` uploads and attaches at `opts[:mount_path]` (default `"/data/<name>"`).

The default mount path is built as `"/data/" <> name` with no sanitization —
callers passing untrusted names must validate them (path traversal, e.g.
`"../x"`, is forwarded verbatim).

**The outputs-dir convention:** only files the agent writes under
`/mnt/session/outputs/` become session artifacts (session-scoped and
downloadable — what `list`/`fetch` see). Direct the agent's deliverables
there in its system prompt; files written elsewhere in the sandbox are not
retrievable.

# `output_path`

Absolute sandbox path for a named deliverable: `"/mnt/session/outputs/" <> name`.

# `outputs_dir`

The sandbox directory whose files become session artifacts (session-scoped,
downloadable — what `list/2` and `fetch/3` see). Interpolate this into the
agent's system prompt rather than copying the string — files written
anywhere else in the sandbox are not retrievable:

    system: "Write all output files under /mnt/session/outputs/."

# `store`

Build a store term. `client_mod` is injectable for tests (defaults to the live client).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
