amodal.json
amodal.json sits in the agent's root directory, which is the repository root unless deploy settings set another one. A minimal file:
{
"name": "investor-relations",
"version": "0.1.0"
}Model selection
In a version 2 definition, set models.main to the default for the agent. Add a key for each category of work that needs a different model.
{
"schemaVersion": 2,
"name": "sample-review",
"version": "1.0.0",
"models": {
"main": { "provider": "openai", "model": "gpt-4.1" },
"peer-review": { "provider": "anthropic", "model": "claude-sonnet-4-6" }
}
}In the specialist’s agent.json, set "modelTier": "peer-review". A specialist that omits modelTier or names an unconfigured category uses the run’s main model. A manifest can define up to 128 categories. Category names are case-sensitive, start with a letter, and can contain letters, digits, hyphens and underscores (up to 64 characters). main selects the main model. Legacy selectors using default also select it.
A model entry accepts provider, model, and optional effort. Credentials and endpoint URLs belong in the runtime. Version 1 definitions ignore the model map.
For the target of a run, an explicit per-run selection takes precedence. Otherwise the runtime uses the target’s category, or the main model when the category is unbound. For each selection, explicit runtime settings override the corresponding manifest entry. With no main selection anywhere, the runtime uses its built-in default. Changing these settings affects new published runs. An MCP or A2A clarification continues with the model that asked the question, including after a restart.
The schema drops unknown fields without an error, so a misspelled field has no effect.
Fields
| Field | Type | Description |
|---|---|---|
name | string | Required. Agent name used in logs, deploy metadata, and generated identifiers. |
version | string | Required. Non-empty agent source version that you control. |
schemaVersion | integer | Use 2 for new projects with a scoped main agent. Omitting it selects legacy version 1. A value newer than the runtime supports fails with CONFIG_SCHEMA_VERSION_UNSUPPORTED. |
models | object | Version 2 default model and named model categories. See Model selection. |
description | string | Human-readable description. |
basePrompt | string | Replaces the default behavior instructions: tool use, data handling and error handling. The agent identity, agent instructions, skills, knowledge, connections, stores and automation context are always added. An empty string removes the default behavior instructions. Prefer skills and knowledge for domain context. |
packages | array | npm packages that ship agent content. See Packages. |
runtimeApp | object | Custom browser app build settings: custom, build, dist. See Runtime Apps. |
publications | array | Legacy declarations. Define new external operations in a tool’s tool.json, an agent’s agent.json, or a native OpenAPI connection’s spec.json (expose.mcp). See Publish a tool. |
mcp.servers | object | MCP server definitions. See MCP Servers. |
capabilities | object | Shared presentation, document, PDF, web, automation, attachment, and memory capabilities. See Capabilities. |
webTools | object or true | Your own Google key for web_search and fetch_url. See Tools. |
memory | object | Older form of capabilities.memory, with an extra enabled field. See Memory. |
scope | object | requireScope flag. See Scope. |
fileTools | boolean or object | File-tool sandbox settings: allowedDirs and blockedFiles. false disables file tools. Agents still opt in through their tools list. |
hooks | object | Hook order, disabled, and per-hook config. See Hooks. |
ci | object | Push deployment rules (ci.deploy) and deployment evals (ci.evals). See CI Rules. |
sandbox | object | Sandbox for agent code. provider (for example local) gives the agent the bash, read_file, write_file, and publish_file tools, each session in its own sandbox. Also accepts setup (shell script run when the environment is built; a deploy to the machines backend, the default for hosted deployments, fails when it is set; use one of the capabilities instead, which provide their tools there), network (deny-all by default, allow-all, or { "allow": [...] }), adapter config, and builtinSkills (built-in skills to turn on: documents, and reading-documents, which capabilities.attachments also turns on). shellExec, template, and maxTimeout have no runtime effect. |
artifactProviders | array | App-owned HTTP artifact sources ({ id, baseUrlEnv, tokenEnv, path }) that custom tools can register via ctx.artifacts.register. |
Store schemas live in amodal/stores/*.json. Do not put store backend configuration in amodal.json; the cloud runtime supplies the database.
Packages
{
"packages": [
"@acme/connection-crm",
{
"package": "@acme/support-content",
"use": ["skills.triage", "knowledge.support-policy"]
}
]
}A bare string loads everything the package ships. The object form loads only the use entries, each written as <kind>.<name>. Kinds are connections, skills, knowledge, stores, tools, hooks, and channels. Local repo content wins when names collide.
Install the packages with your package manager. npm dependencies for a runtime app or tool code belong in package.json, not in amodal.json.
Environment Variables
Write a string value as env:NAME to read it from the environment instead of committing it:
{
"webTools": {
"provider": "google",
"apiKey": "env:GOOGLE_GENERATIVE_AI_API_KEY"
}
}amodal dev resolves every env: value in amodal.json when it loads the file. An unset variable fails the load with ENV_NOT_SET.
The hosted runtime loads amodal.json without resolving env: values. Connection specs and webTools.apiKey resolve their own env: references from agent secrets; see Connections.
"webTools": true is shorthand for the example above. In the hosted runtime, an agent without a GOOGLE_GENERATIVE_AI_API_KEY secret uses Amodal's managed search instead, the same as capabilities.web: { search: true }. Managed search has no fetch_url; declare capabilities.web: { search: true, read: true } instead of webTools to read pages.
Capabilities
Declare the work an agent can do in amodal.json:
{
"capabilities": {
"presentations": true,
"documents": true,
"pdf": true,
"web": { "search": true, "read": true },
"automations": true,
"attachments": true
}
}Presentations and documents include the runtime tools, on-demand guidance, persistent files, visual inspection, and editable artifacts in the standard runtime app. No editor source or tool implementations are required in the agent repository. Explicit agent tool allowlists still apply.
Themes and templates
Use an object instead of true to configure each artifact's design:
{
"capabilities": {
"presentations": {
"theme": "Use forest-green backgrounds, gold accents, and generous whitespace.",
"template": "./templates/company-slides.potx"
},
"documents": {
"theme": "Use white pages, violet headings, and restrained table shading.",
"template": "./templates/company-report.dotx"
}
}
}Both fields are optional. theme is freeform design guidance (up to 12,000 characters) added when the corresponding skill loads. It supplements the shared skill; editing, preservation, and quality checks still apply. Explicit user requests take precedence, and existing artifacts or user-supplied templates retain their design unless restyling is requested. Fonts must be available in the editor and renderers; theme text does not install fonts or enforce branding mechanically.
template is a relative path inside the agent repository: PPTX/POTX for presentations, DOCX/DOTX for documents. Templates must be at most 5 MB for presentations or 20 MB for documents. Commit these files with the agent so Cloud can package them. Absolute paths, URLs, and links outside the repository are rejected. Templates are included unchanged in production archives and resolved from the loaded repository on either host. Package integrity and editor compatibility are checked when creating the artifact; invalid templates fail instead of silently falling back to blank content.
The agent starts a deck with presentation_create, or a document with document_create (title only, no Markdown when using a template), then reads and edits the native copy. These operations never replace an existing artifact or modify the original template. Uploaded files use the import tools instead. The optional useTemplate: false creation argument starts without the configured template when the user asks for that. Changing a theme or template does not restyle existing artifacts; restart the local demo or redeploy after replacing template assets.
Documents use the maintained @amodalai/opendoc package. One DOCX document is stored per chat; browser changes autosave and flush before an agent turn. The editor locks while the agent works, and stale writes are rejected. Headless document processing uses host-provided isolated compute. Local hosts persist documents under the runtime state directory; Cloud stores them in session-associated object storage, with session ownership checked on every editor request. This supports ordinary text, headings and tables; it does not promise complete Microsoft Word fidelity.
web: true enables both search and managed page reading; an object enables only actions explicitly set to true. Search uses the authenticated Amodal gateway and retains team/session attribution. Host operators configure AMODAL_WEB_SEARCH_TOOL (default web-search) and AMODAL_WEB_READ_TOOL (default web-read) to gateway tool aliases. Provider keys and reader destinations stay in gateway configuration. The declaration does not grant direct network access or provide an external-provider fallback; an on-premises host must configure its gateway aliases to approved internal services.
automations: true turns on scheduled tasks for end users. The agent can schedule, list, and remove its own automations from chat with schedule_automation, list_automations, and remove_automation. The standard runtime app shows its Scheduled tasks page, and the runtime serves /api/automations, which useAutomation calls. Without the flag, /api/automations answers 404 with code AUTOMATIONS_DISABLED and the standard runtime app hides its Scheduled tasks entry. Automations an operator creates in Studio do not depend on this flag. A host without a scheduler, such as amodal dev, leaves the tools out without an error.
attachments: true lets the agent read the files attached to the conversation with the built-in reading-documents skill. The host provides the sandbox, so amodal.json needs no sandbox block. A named agent exposes the skill only when its skills list names it, which also brings bash, read_file, and write_file into its scope. A repo or package skill named reading-documents replaces the built-in one.
pdf: true adds an on-demand pdf skill that reads PDFs, extracts text and tables with page citations, inspects rendered pages, OCRs scans, creates PDFs with ReportLab or headless Chromium, merges, splits, rotates, and watermarks pages, extracts images, fills forms, and encrypts or decrypts files. It works through the session's bash, read_file, and write_file tools. The host provides the sandbox, so amodal.json needs no sandbox block, but the sandbox must be isolated: amodal dev needs Docker. The sandbox carries Poppler, qpdf, OCRmyPDF, Tesseract, the DejaVu fonts, pypdf 6.1.1, pdfplumber 0.11.7, ReportLab 4.4.4, cryptography 46.0.3, and Chromium from Playwright 1.61.1 at /usr/local/bin/chromium. On the machines backend, the default for hosted deployments, the agent runs in the prebuilt office image, which ships these tools. Other providers install them with a setup script when the sandbox is built.
webTools connects web search to your own Google key; see Web Tools. Use either capabilities.web or webTools, never both. Hosts must provide compute/storage for document and presentation capabilities and a managed gateway for web; missing services fail before a model turn.
Memory
{
"capabilities": {
"memory": {
"editableBy": "any",
"maxEntries": 50,
"maxTotalChars": 8000
}
}
}memory: true turns memory on with the default settings. An object turns it on and accepts only editableBy, maxEntries, maxTotalChars, and sourceAccess.
With memory on and a memory backend, the runtime registers a memory tool with add, remove, list, and search actions. A named agent must also list memory in its tools. Saved memory appears in the prompt, each entry with an id such as memory:a1b2c3d4, its tier, and its topic when it has one, so the agent can cite it: - [memory:a1b2c3d4 · company · on Fund II] LP X fee is 1.5%. remove archives an entry: it leaves the prompt and the tool, and can be restored.
Memory is stored per agent and partitioned by scope_id. Each entry records who saved it, who last edited it, the citation ids of its sources, and an optional topic.
A topic names what a memory is about, such as a deal or a customer, so one subject's memories can be read together. The memory tool's add takes topic, and its list with topic returns only that topic's memories. /api/memory, useMemory, and ctx.memory.list take it too. The runtime trims a topic, stores an empty one as no topic, and refuses one longer than 100 characters. A topic filter matches the stored topic exactly and narrows what the reader already sees; it never shows a memory the reader could not see without it. The sources grant no access. Without sourceAccess they restrict none either.
Tiers
Memory has two tiers within a scope:
- Company memories are shared with everyone in the scope.
- Private memories belong to one signed-in person, the session's memory user.
A session sees the company tier plus its memory user's private tier. The memory user is the signed-in person for chat (a hosted-login end user, an employee, or the amodal dev user), the run's owner for durable runs and /api/agents/:name/run, and the verified person for /api/tools/:name/call. API keys, SDK client tokens, cron, webhooks, channels, and evals name no person, so their sessions have no memory user. Without one, the prompt shows the company tier only and the tool refuses tier: "private".
Who can publish a company memory
A company memory never reaches a person who could not already read the conversation that produced it, unless a person shares it:
- In a session with no memory user, the agent saves company memories directly. Every caller of that scope can already read its sessions.
- In a session with a memory user, the agent may have read that person's private data, such as their mailbox. A company save there is stored as a private memory proposed for the company. It becomes a company memory only when its owner shares it with
PATCH /api/memory/:id {"tier": "company"}. Until then it reaches only sessions whose memory user is its owner, and operators can open such sessions. A run that an operator starts withowner_user_idhas that person as its memory user. An API key that continues a hosted-login user's chat while the runtime still holds the session keeps that user's memory. - In a session that acts for a person who is not its memory user, such as a user's session that an API key resumes from storage, the tool refuses every
add.removestill works.
An app that pins several people into one scope with a client token makes that scope its privacy boundary, because those people share session history. For per-person privacy, use distinct people (hosted login or employees) or distinct scopes.
Source access
An agent whose records have per-reader access, such as LP terms or mailboxes, names a tool that checks them:
{
"capabilities": {
"memory": {
"sourceAccess": { "tool": "memory_source_access" }
}
}
}The bundle fails to load unless the tool exists, runs inline rather than execution: "durable", and sets llm_callable: false.
The runtime calls the tool with {"source_ids": ["lp:terms-x", "mail:123"]} in the reader's context: ctx.userId and ctx.claims come from the verified caller, never from a request body. The tool returns {"sources": {"lp:terms-x": {"withheld": ["fee"]}, "mail:123": null}}. null, or an id missing from sources, means the reader cannot open the source or it no longer exists. withheld lists the field names hidden from this reader and is empty for full access. Ids that start with memory: never reach the tool; the runtime resolves them against the reader's own memory list.
When a save cites sources, the runtime checks them as the saving person and stores the answer on the memory as its owner's view. A source the saver cannot open stays in source_ids and is left out of the owner's view, so the memory stays with its owner.
A reader sees their own memories. A company memory that someone else saved is shown when, for every source it cites:
- the reader's answer is not
null, and - every field withheld from the reader was also withheld from the owner.
A cited memory: id must name a memory the reader sees under the same rule. A cited memory that is missing, or a cycle of citations, hides the citing memory. A company memory that cites sources but has no owner's view, because it was saved before the agent set sourceAccess, stays with its owner.
The rule applies to the prompt, GET /api/memory with or without archived=true, the memory tool's list and search, ctx.memory.list in tool code, and the lookup before remove and PATCH /api/memory/:id. A memory the reader cannot see answers as not found. Studio's Memory page does not apply it.
Each read makes one call to the tool, for every source its company memories cite, and logs memory_source_access with the source count and duration. Every read runs the access tool in a build of the whole agent's tools, as /api/tools/:name/call does, so a named agent's tools and connections do not limit the check. The access tool's own context has no ctx.memory.
When the call throws, runs past the tool's timeout, or returns another shape, the runtime logs memory_source_access_failed and hides every company memory that cites a source other than a memory. A save during such a failure records no owner's view.
The check covers only the sources the agent cites, and a signed-in session may have read private sources it did not cite. A company save from the memory tool in a session with a memory user is therefore still stored as a private memory proposed for the company until its owner shares it.
Who can change memory
Studio's Memory page manages the company tier with the memory.write capability, whatever editableBy says. It never shows private memories, proposed ones included.
editableBy | The memory tool | /api/memory callers |
|---|---|---|
"any" (default) | Registered | Signed-in people write both tiers; callers who name no person write company only |
"admin" | Not registered; memory is prompt-only | Operators as under "any"; everyone else reads only |
"none" | Not registered; memory is prompt-only | Everyone reads only |
Budgets
maxEntries defaults to 50 and maxTotalChars to 8000. They apply per tier: the company tier of a scope gets the full budget, and each person's private tier in that scope gets it again, so a prompt can carry up to twice the budget. Only active entries count, and an add, restore, share, or edit that would exceed the budget is refused. The hosted runtime and amodal dev enforce both limits. Studio writes are not budgeted.
The older top-level memory key takes the same fields plus enabled, which turns memory on when true. It also accepts nudgeInterval and sessionSearch, which have no runtime effect. Use either capabilities.memory or memory, never both.
Scope
scope_id partitions sessions, memory, and non-shared store data by end user, tenant, or workspace. Your backend sets it in the runtime tokens it mints; see Embedding & Multi-tenancy.
The hosted runtime does not enforce scope.requireScope, and amodal dev runs every request in one fixed scope (see CLI). Enforce scope in your backend instead of relying on this flag.
CI Rules
The platform reads ci from amodal.json at the pushed commit. ci.deploy applies to connected GitHub and GitLab repositories. ci.evals applies to deployments from every source.
{
"ci": {
"deploy": {
"branches": ["main", "release/*"],
"paths": ["package.json", "pnpm-lock.yaml"]
},
"evals": { "runOn": "production" }
}
}| Field | Behavior |
|---|---|
ci.deploy.branches | Branch names allowed to deploy on push. * matches any characters. Omitted means every branch. |
ci.deploy.paths | Repo-relative path prefixes that trigger a deploy in addition to the agent's root directory. |
ci.evals | Deployment comparison settings: runOn, gate, runs, passRate, judgeModel, confirmRuns. See Deployment triggers. |
A push that touches neither the agent's root directory nor a listed path skips the build. An unreadable amodal.json falls back to the defaults.
Pushes build only when autoDeploy is on in the agent's deploy settings. It is off by default. See Deploy Settings.