# Settings, and where artifacts are kept [中文](settings.zh-CN.md) An artifact is a folder on your disk. This page says where a new one goes, how you choose, and where Open Artifact keeps its settings: one file of your own, and an optional file in a project. ## Where a new artifact goes When the agent's call names no folder, Open Artifact picks one and names it from the title: | Location | Folder | What it means | | --- | --- | --- | | `home` | `~/OpenArtifact//` | Under your **Open Artifact folder**, one folder per project. Nothing lands in the repository, so `git status` stays clean, and the artifacts outlive a deleted checkout or worktree. | | `workspace` | `/artifacts/` | In the folder the agent works in. The artifacts sit beside the code and can be committed with it. | Which one applies, when nothing is set: | The session's app | Default | Why | | --- | --- | --- | | Claude Code, Codex, Cursor, GitHub Copilot, Antigravity, ZCode, DeepSeek Harness | `workspace` | In their usual modes the ones that were measured ask before, or refuse, a write outside the working folder ([below](#let-your-app-write-to-the-open-artifact-folder)); the others are kept the same until they are measured. | | ChatGPT on the web (`open-artifact chatgpt`) | `workspace` | The connector tells its artifacts apart by their path. | | Pi, OMP, Hermes Agent, the `open-artifact` command line, any app without a profile | `home` | Nothing stops the write. | | An app that starts the daemon with `OPEN_ARTIFACT_WORKSPACE_FOLDERS_ONLY=1` | `workspace`, always | A confined daemon keeps every folder in the workspace; no setting or call changes that. | When an app's default puts artifacts in a Git checkout and Open Artifact has to make the `artifacts/` folder, it also writes `artifacts/.gitignore` (one line, `*`), so the artifacts stay out of `git status`. Delete that file to track them. A folder that was already there, or one that you, the project or the call chose, gets no `.gitignore`: there the artifacts are meant to be seen by git. Artifacts you make on the home page (no session) go to `~/OpenArtifact/artifacts/`, as before. ### The Open Artifact folder ```text ~/OpenArtifact/ ├── artifacts/ made on the home page │ └── reading-list/ ├── shop/ the project ~/code/shop │ ├── .open-artifact-project.json │ ├── launch-plan/ │ └── q3-review/ └── app-3f9c/ a second project whose folder is also called "app" ``` - **A project** is the Git checkout the session works in (its top folder), whichever folder inside it the agent started in. Every worktree of a repository is the same project. A folder in no checkout is its own project. A folder with a project settings file ([below](#the-projects-file)) is a project too, which is how a package of a monorepo gets its own. - A project's folder is named after the project's folder. `.open-artifact-project.json` says which project it holds; when two projects have the same name, the second gets a few digits of a hash of its path (`app-3f9c`), the same ones every time. - The folder itself is `homeWorkspace` in your settings (`open-artifact config set homeWorkspace ~/Documents/Artifacts`). "This project's artifacts" (what `Artifact {action: "list"}` shows a session, and what `quickstart` offers to reuse) are the ones made for the project, wherever their folders are, plus any whose folder is inside the session's folder. You see the projects too. On the home page (`open-artifact open`) each card names the project its artifact was made for (the full folder shows when you point at it), and when your artifacts are of more than one project a row above the list narrows it to one: **All**, each project with how many artifacts it has, and **No project** for the ones made on the home page or before projects were kept. Two projects of one name are told apart by the folder each is in (`app (work)`, `app (play)`). In Open Artifact Desktop the library says the project under each title, its filter menu has a **Project** submenu, the search finds a project by its path, and a row in the sidebar shows the project when you point at it. ### Choosing | You want | Do | | --- | --- | | One artifact somewhere else | Tell the agent: "put it in the project" or "put it in my Open Artifact folder". It passes `location: "workspace"` or `location: "home"`. Name an exact path and it passes `folder`. A folder inside `~/.agents/open-artifact/` (or `$OPEN_ARTIFACT_HOME`), which holds the settings and keys, or a folder that holds it, is refused (`invalid_argument`). | | Everything in your Open Artifact folder | `open-artifact config set artifactsLocation home`, and [let your app write there](#let-your-app-write-to-the-open-artifact-folder). | | Everything in the workspace, visible to git | `open-artifact config set artifactsLocation workspace` | | One project differently, for you only | In the project: `open-artifact config set artifactsLocation home --local` | | One project the same way for everyone | In the project: `open-artifact config set artifactsLocation workspace --project`, then commit `.agents/open-artifact/settings.json` | | Back to the default | `open-artifact config unset artifactsLocation` (with `--local` or `--project` for those) | Nothing that exists moves: a setting decides where the **next** artifact goes, and every artifact made before stays where it is and stays in its project's list. ## Let your app write to the Open Artifact folder An agent writes an artifact's files with its own file tools. Most agent apps limit those to the working folder, which is why their default is `workspace`. To use `home` with such an app, add the Open Artifact folder to the folders it may write: | App | Setting | Measured | | --- | --- | --- | | Claude Code | `claude --add-dir ~/OpenArtifact`, or `"permissions": {"additionalDirectories": ["/Users/you/OpenArtifact"]}` in its settings | 2.1.318: with it, `acceptEdits` writes there without asking. `auto` needs nothing. | | Codex | `codex --add-dir ~/OpenArtifact`, or `sandbox_workspace_write.writable_roots = ["/Users/you/OpenArtifact"]` in `config.toml` | 0.171.0-alpha: without it, `workspace-write` refuses the write. | | GitHub Copilot CLI | `copilot --add-dir ~/OpenArtifact` | 1.0.114: without it, the write waits for your approval. | | Cursor CLI | None found: `--add-dir` does not lift it. `--force` allows every write. | 2026.11.13 | | Pi | Nothing to set. | 1.6.1 | These were measured on macOS, in each app's headless mode. Not measured: Antigravity, ZCode, DeepSeek Harness, OMP, the apps' interactive prompts, the Cursor editor, the Claude desktop app, Windows and Linux. Open Artifact never changes another app's permission settings for you. When an artifact's folder is outside the agent's working folder, the create result says so. An agent that cannot write there can still fill the artifact: `Artifact {action: "publish", url, files: {...}}` has the daemon write the files. ## The settings files ### Your file `~/.agents/open-artifact/settings.json` (`$OPEN_ARTIFACT_HOME/settings.json` when that is set) holds your settings for every app and project on this computer. Only what you changed is in it. The keys about where artifacts go: | Key | Default | Means | | --- | --- | --- | | `artifactsLocation` | unset | `home` or `workspace`. Unset: the app's default, as in the table above. | | `artifactsDir` | `artifacts` | The folder's name under a workspace, and for home-page artifacts under the Open Artifact folder. | | `homeWorkspace` | `~/OpenArtifact` | Your Open Artifact folder. `OPEN_ARTIFACT_HOME_WORKSPACE` sets it when the file does not. | | `projects` | unset | Your own settings for single projects, by the project's folder: `{"~/code/shop": {"artifactsLocation": "home"}}`. Written by `config set --local`. An `artifactsDir` here is relative to the project's folder. | Its other keys (types, trusted projects, sites, the port, the runtime) have commands of their own: see [Making your own artifact types](custom-types.md), [Connecting your computers and agents](connecting-agents.md) and [Runtime and updates](integrating/runtime.md). An install preset (`preset.json`) is a different thing: it gives a computer its site at install time and sets nothing on this page. ### The project's file `/.agents/open-artifact/settings.json`, beside the project's types (`.agents/artifact-types/`). Commit it, and everyone who works in the repository gets the same answer. It may set two keys: | Key | Means | | --- | --- | | `artifactsLocation` | `home` or `workspace`, for sessions in this project. | | `artifactsDir` | Where the project keeps its artifacts: a path relative to the folder the file is in, and inside it (`docs/artifacts`). | ```json { "artifactsLocation": "workspace", "artifactsDir": "docs/artifacts" } ``` Every other key in that file is ignored. A repository is something anyone may have written: it does not get to trust itself, move your Open Artifact folder, add a site or turn publishing on. `open-artifact config list` names the keys it ignored. Open Artifact looks for the file from the session's folder upward to the top of the Git checkout, and uses the nearest one. It does not look above the checkout, nor in a folder with no checkout around it other than the session's own, and it never takes your own settings file for a project's. (A project's **types** are still looked for in the session's folder only: see [custom types](custom-types.md).) ### Which wins Highest first: 1. The call: `folder` (an exact path), then `location`. 2. A confined daemon (`OPEN_ARTIFACT_WORKSPACE_FOLDERS_ONLY=1`): the workspace. 3. Your entry for the project (`projects`, `config set --local`). 4. The project's file. 5. Your `artifactsLocation`. 6. The app's default (its harness profile's `policy.artifacts`). 7. `home`. ## `open-artifact config` ```bash open-artifact config # what is in effect here, as JSON: each value and who set it open-artifact config get artifactsLocation # one value open-artifact config set artifactsLocation home # in your settings.json open-artifact config set artifactsLocation home --local # yours, for this project only open-artifact config set artifactsDir docs/artifacts --project # in this project's settings file open-artifact config unset artifactsLocation [--local | --project] ``` - **Keys:** `artifactsLocation`, `artifactsDir`, `homeWorkspace`, `serverPort`. `--project` and `--local` take the first two. - **Which project:** the one the current folder is in; `--workspace ` names another. `--harness ` makes `list` and `get` answer for that app's sessions (`--harness claude-code`). - `list` gives each value a `source`: `local` (you, for this project), `project` (its file), `user` (you), `environment`, `harness` (the app's default) or `default`. `project.ignored` lists the keys of the project's file that are not used. - `set` and `unset` go through the daemon, so it uses the change at once. After editing a file by hand, restart it: `open-artifact daemon restart`. - **Only you change settings.** Inside an agent's session `config set` and `config unset` are refused, as trusting a project or publishing is; `list` and `get` work anywhere. `--project` removes the file when nothing is left in it. ## Models, permissions and connectors A page can ask a model to write (`use("sample")`), and so can a built-in editor (Sheets). You choose which **model source** answers: one of your own API keys (OpenAI-, Anthropic- or Gemini-compatible endpoints, a proxy, or a model on your network), or an **agent app** on this computer that can answer for pages (see [plugins](../plugins/README.md)). A page can also call tools of your connectors (`use("mcp")`). Nothing here is ever in an artifact's folder, so an export or a copy carries none of it. | File (in `~/.agents/open-artifact/`, or `$OPEN_ARTIFACT_HOME`) | Holds | Changed in | | --- | --- | --- | | `models.json` (`$OPEN_ARTIFACT_MODELS` names another path) | Your key sources (with each one's effort), the default one, the limits, and the model and effort you chose for each agent app's command line (`harness`). Written with mode `0600`; a key may be written `${ENV_VAR}` to read it from the environment. No route ever answers a key: lists show its last four characters. | The home page's **Settings → Models**; the consent dialog's **Add a model source…** | | `grants.json` | What you allowed: one artifact, every artifact of a type, or every artifact (**Always allow**); a page refused with **Not this page**; and each artifact's connector permissions. A deleted artifact's entries go with it. | The dialog a page's first call opens; the page's **AI models** panel; **Settings → Models → Permissions** | | `usage/models.jsonl` | One line per model call: when, which artifact, source, model, tokens (exact, estimated or not reported), duration, result. Never the prompt or the answer, and never a key. A call you refused is kept too, as "not allowed", and counts toward no total; refusals of one artifact with the same code in the same minute are one line with a count (×N in the panel). Lines older than 400 days are folded into one total per artifact, and past 50,000 lines the oldest days are folded into one total per day, so the file stays small and the totals stay right. | Nothing: a record | | `connectors.json` (`$OPEN_ARTIFACT_CONNECTORS` names another path) | Your connectors: the MCP servers pages and Data dashboards may call. | By hand ([Data](types/data.md)) | | `connector-usage.json` | Each artifact's calls per connector and tool: counts, failures, the last call. Never arguments or results. | Nothing: a record | The limits in `models.json`, both in **Settings → Models → Limits**: | Key | Default | Means | | --- | --- | --- | | `limits.perArtifactPerHour` | `60` | Calls that reach a model, per artifact, per hour; `0` for no hourly limit. One more is refused `rate_limited`. | | `limits.maxOutputTokens` | `16000` | The output cap of each answer. | Choosing a source's model and effort, in **Settings → Models**: - A key source: its **Default**, **Quick** and **Complex** models (once **Fetch models** has listed them, a searchable list; else typed), and its **Effort** (`low`, `medium` or `high`, kept as the source's `effort`). - An agent app: **Change** beside it opens the same pickers for its command line, filled from the models the app itself lists (Cursor, GitHub Copilot, Codex; read once, kept a day, **Refresh the list** reads it again) or the names it suggests (Claude Code), and its **Effort** of the levels it takes (up to `xhigh` and `max`). A model the list does not have yet can be typed. Each field left at **The app’s default** passes nothing, so the app's own default answers. Kept as `harness.`: `{"models": {"default": "claude-sonnet-5.5"}, "effort": "xhigh"}`; **Use the app’s defaults** forgets it. It applies while the app answers by its command line; an app that answers through its adapter or MCP connection uses the model of its own session, and the editor says so. - Your effort answers when a page names none; a page's own `effort` wins. A level the source does not take is not passed. The page's **AI models** panel shows the app's current choice. - The consent dialog offers the same choice for the source it has selected: its **Default model** (searchable) and its **Effort**, under the list of sources. A change is kept on that source when you allow the page (so the source's other pages use it too); **Don’t allow** keeps nothing. An app answering through its adapter or MCP connection has nothing to choose there. Allowing and taking back: - A page's first call opens a dialog in the Open Artifact window: pick a source, then **Allow this page**, **Allow all artifacts** or **Always allow, don’t ask again**. **Don’t allow** refuses it. A page allowed by its type or by **Always allow** runs without a dialog, and the window says so under its bar, with **Manage** and **Not this page**. - The window's **AI** mark opens the page's **AI models** panel (**AI models and connectors** once the page has connectors): the source, today's, this month's and all calls and tokens, the calls this hour against the limit, the recent calls, **Change source** (for this page only), **Model and effort** of the source in use (its default model, searchable, and its effort: each change is kept on the source at once, so its other pages use it from their next call), **Stop allowing this page** (or its type, or **Always allow**), and, for connectors, **Stop allowing** each one. - A connector is allowed per artifact only, never per type or for every artifact. A tool the connector marks read-only then runs; any other call asks you each time with its arguments (**Allow once**, **Always allow this tool**, **Allow all declared tools**). - A source an agent app answers by its command line run read-only (Codex, Cursor: the program can still read files while it writes) can be allowed for one artifact at a time only, and is never picked first while another source can answer. One answered by MCP sampling is allowed for the client that answered; another client answering for the same app asks you again. - Editing a key source keeps its saved key only while its kind and its endpoint's origin stay the same; changing either asks for the key again. A source never follows a redirect (the message asks for the final address), and a key the endpoint refuses is said in fixed words: no message carries the key or a piece of it. - An agent cannot allow anything for you: the routes that change sources, limits and permissions refuse a request from inside an agent's session, and an agent does not edit these files for you. `open-artifact doctor --harness ` has a `harness-generate` check (**Model source**): whether that app can answer pages' model calls now, and by which way (its adapter, its MCP client, or its command line). It never runs a model. **On a site** (a self-hosted Open Artifact), a page's model calls use your own key too, but it is kept in your browser, for your account on that site, and your browser calls the endpoint directly: it never reaches the site's server (the endpoint must allow calls from the site, CORS). **This tab only, don’t save** keeps it in the tab's memory instead. Your permissions and usage are kept in the browser too, and signing out forgets that account's keys first. Allowing a page for its type or every artifact is offered only on artifacts you own on that site. The site's operator can turn this off or limit the endpoints ([hosting](hosting.md)). Connectors are not available to pages on a site. ## Check it: `open-artifact doctor` ```bash open-artifact doctor --harness claude-code # in the project; --workspace names another folder ``` Among its checks, four are about this page: | Check | Says | | --- | --- | | `home-workspace` | Your Open Artifact folder, and whether it can be written (not made yet is fine). Fails when it cannot. | | `artifacts-location` | Where a session of that app in this folder keeps new artifacts, and who chose it. When that is your Open Artifact folder and the app keeps its agent to the working folder (Claude Code, Codex, Copilot CLI, Cursor), a warning with the setting to add. For Claude Code and Codex doctor reads the app's own settings (`~/.claude/settings.json` and the project's `.claude/settings*.json`; `~/.codex/config.toml`) and says ok when they already allow the folder; it cannot see a `--add-dir` given on the command line. | | `project-settings` | The project's settings file and what it sets; a warning naming the keys that are not used, or a file that is not a JSON object; and your own entry for the project. | | `settings-projects` | A warning for entries of `projects` in your settings whose folder is gone, or that are not named by an absolute path. | doctor only reads: it changes neither your settings nor another app's. ## For agents - Do not make up a folder. Leave `folder` out: the daemon chooses it and names it from the title. - The person asks for the project ("in the repo", "commit it with the code"): `location: "workspace"`. For their Open Artifact folder: `location: "home"`. For an exact path: `folder`. A workspace-confined app refuses `location: "home"` (`not_granted`). - The create result's `root` is where the files go. When it is outside your working folder the result's `notes` say so: tell the person where the folder is, and if your app does not let you write there, send the files with `Artifact {action: "publish", url, files}`. - Never run `open-artifact config set` yourself, and do not edit either settings file to change where artifacts go. Tell the person the command. - Never edit `models.json`, `grants.json` or `connectors.json`, and never allow a page's model or connector use for the person. A page you write that uses a model or a connector must work when the answer is `not_granted`: tell the person where to allow it (the dialog, or the page's **AI models** panel).