Metadata-Version: 2.4
Name: domino-agent
Version: 0.10.0
Summary: The command for an agent folder on the Domino agent service: domino-agent init, dev, check, deploy, pull, chat and eval.
License-Expression: Apache-2.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: ruamel.yaml>=0.18
Dynamic: license-file

# domino-agent

`domino-agent` is the command for an agent folder on the Domino agent service. An agent folder is a folder in git that holds one
agent's definition. `domino-agent init <name>` makes a new one. `domino-agent dev` tries it as it is on your disk, before you
commit it, as your dev copy on Domino, in a conversation in the terminal. `domino-agent deploy` brings the folder into the agent
service: that is a Registration, and the agent is then a registered agent, whose definition has git as its source of truth.
`domino-agent check` checks the folder as `deploy` does, with no sign-in, so a pipeline runs it on each pull request.
`domino-agent pull` writes the agent folder of an agent that exists. `domino-agent chat` talks to an agent that is on Domino already,
through live chat. `domino-agent eval` runs the eval cases of the folder on your dev copy, so that you know before a merge that the
agent still does what it must.

The agent service runs governed agents on Domino. You need its address and a Domino token: see "Sign in" below.

## Install

```
pip install domino-agent
```

It needs Python 3.10 or later, and the `git` command for `deploy`. Each command has its help:

```
domino-agent --version
domino-agent init --help
domino-agent dev --help
domino-agent check --help
domino-agent deploy --help
domino-agent pull --help
domino-agent chat --help
domino-agent eval --help
```

## A small agent folder

```
governance-agent/       the agent folder
  definition.md         the definition file: the settings, and the instructions below them
  instructions.md       optional: the instructions in their own file, not below the settings
  skills/
    policy-evidence/    an own skill: only this agent has it
      SKILL.md
  subagents/
    reviewer.md         a custom subagent: a helper with its own instructions, and the agent's tools or fewer
  tools/
    findings.py         own tools: each Python function with @tool in it is a tool of the agent
  schedules/
    weekly-findings.md  a schedule: the agent starts a task at fixed times
  subscriptions/
    failed-check.md     a subscription: the agent starts a task when an event of one type comes in
```

The definition file has its settings as YAML between two `---` lines, and the instructions below them:

```markdown
---
name: governance-agent          # the identifier: lowercase letters, numbers and hyphens
title: Governance Agent         # the name that people see
description: Investigates failing policy checks and writes findings.
model: [sonnet, haiku]          # aliases of the LLM Gateway: the first one, then the fallback
---
You are Domino's Governance Agent. You help bundle owners understand why a policy check failed.
```

- `name`, `title` and `model` are required. A field that has its default value doesn't have to be in the file.
- A field that the command doesn't know is refused, with the list of the fields that it knows.
- `deploy` uploads only the known paths: `definition.md`, `instructions.md`, the files of `skills/<name>/`,
  `subagents/<file>.md`, the files of `tools/`, and the files of `schedules/` and `subscriptions/`. Other files, such as a README
  or a unit test, stay in git.
- No secret goes in the folder. `deploy` refuses any text that looks like a credential.
- An own skill's `SKILL.md` has `name` (the folder's name) and `description` on top. A store skill of the agent service's skills
  store goes in the definition file as `name@version`, such as `skills: [domino-governance-review@1.2.0]`.
- A custom subagent never has more than its agent: a tool, an access or a model that the agent doesn't have is refused.
- Each function with `@tool` in a Python file of `tools/` is an own tool of the agent: see "Own tools" below.
- The tools of the agent service's tool servers are not in the folder. `tool-servers` in the definition file names the ones that the
  agent may use: see "Tools from tool servers" below.
- Each file `schedules/<name>.md` is a schedule of the agent, and each file `subscriptions/<name>.md` is a subscription: see
  "Schedules and subscriptions" below.

## The fields

The settings of the definition file. A field that has its default value doesn't have to be in the file, and `init` writes each
other field as a comment line. A field in a group is written below the group's name, indented: `tools.shell` is `shell:` under
`tools:`.

| Field | Values | Default | What it sets |
| --- | --- | --- | --- |
| `name` | lowercase letters, numbers and hyphens, at most 63 characters | required | The agent's identifier for `deploy`. It is unique among registered agents. |
| `id` | an agent's ID, such as `agt_0123456789` | none | The agent that `domino-agent pull` wrote the folder from. |
| `title` | text | required | The name that people see. |
| `description` | text | no description | What the agent does, in the agent list. |
| `tags` | a list of text | none | The agent's tags. |
| `lane` | `harness` | `harness` | An agent folder holds only harness agents for now. |
| `project` | a Domino project's name | any project | With a name, the agent always runs in that project, and only its collaborators can use it. |
| `model` | an LLM Gateway alias, or a list of aliases | required | The model, then the ones to fall back to. With `endpoint`: the one model ID at the endpoint. |
| `model-access` | `identity`, `service-account`, `owner` | `identity` | Whose LLM Gateway access the model calls use: the identity that the agent acts as, a service account, or the owner. |
| `endpoint` | `url`, `key`, `key-from` | the LLM Gateway | A custom endpoint in place of the LLM Gateway. `url` is its https address. `key` names the Domino environment variable that holds the key, and `key-from` is `user` (default) or `project`. |
| `environment` | an Environment's name in Domino | the deployment's agent Environment | The Environment that the agent's Jobs run on. |
| `hardware-tier` | a hardware tier's name in Domino | the deployment's default tier | The hardware tier of the agent's Jobs. |
| `compute` | the name of a compute backend, such as `job` | the deployment's choice | Where the agent's runs happen. `job` is a Domino Job, `runner` the runner app. Any other name works only on a deployment whose operator turned on non-Job compute, and the service refuses a name that deployment doesn't have, or one whose backend can't serve the agent's `identity` or `limits.minutes`. A file that leaves it out keeps the compute that the agent already has. |
| `copy-project-files` | `true`, `false` | `false` | Copy the project's files into a sandbox run (the `sandbox` compute only: a Domino Job has the project mounted). `false`: nothing is copied and the agent keeps its Domino tools on the project as `access.project` allows. `access.project: none` copies nothing even when this is `true`. |
| `fast-start` | `true`, `false` | `true` | Take a sandbox from the shared warm pool (the `sandbox` compute only; about 2 s to start instead of about 25 s). `false` starts every run cold and takes nothing from the pool. |
| `limits.minutes` | 1 to 480 | `30` | The most minutes of one round. |
| `limits.turns` | 1 to 500 | `60` | The most turns of one round. |
| `limits.wait-minutes` | 0 to 120 | `10` | How long a Job waits for an answer to a question or a plan. |
| `limits.keep-alive-minutes` | 0 to 60 | the deployment's | How many minutes a sandbox stays up after a round, for follow-up messages (the `sandbox` compute only; a Domino Job never stays up). |
| `identity` | `requester`, `service-account`, `owner` | `requester` | Whose permissions the agent acts with: the person who starts the task, a service account, or the owner. |
| `plan-first` | `true`, `false` | `false` | The agent posts a plan and waits for its approval. |
| `check-in-often` | `true`, `false` | `false` | The agent says what it found after each step, and asks before it goes on. |
| `completion` | `review`, `auto` | `review` | `review`: a person closes the task. `auto`: the agent closes it. |
| `on-error` | `pause`, `fail` | `pause` | What the agent does after an error that it can't recover from. |
| `start-as` | `job`, `live` | `live` with `check-in-often`, else `job` | How a new task from the App starts: a background Job, or live chat. |
| `starter-prompts` | a list of text | none | Requests that people can pick when they start a task. |
| `notify` | a list of `inbox`, `email`, `governance-finding` | none | Where a task's result goes: the App's inbox of the person who started it, an email to them, a governance finding. |
| `tools.shell` | `true`, `false` | `true` | The agent runs commands and scripts. |
| `tools.web` | `true`, `false` | `false` | The agent fetches pages from the domains of `allowed-domains`. |
| `tools.subagents` | `true`, `false` | `true` | The built-in subagent: the agent hands a part of the work to a helper. |
| `tools.jobs` | `true`, `false` | `false` | The agent starts Domino Jobs in the task's project. |
| `tools.push` | `true`, `false` | `false` | The agent pushes the task's branch. It needs `access.project: write`. |
| `access.project` | `read`, `write` | `write` | The files of the task's project. |
| `access.datasets` | `none`, `read`, `write` | `read` | The datasets of the task's project that are not inputs. |
| `access.attached` | `read`, `write` | `read` | Other resources attached to the task. |
| `access.other` | `none`, `read` | `none` | Resources that are not attached to the task. |
| `allowed-domains` | a list of host names, such as `pypi.org` or `*.example.com`, or `["*"]` | none | Where the agent's traffic may go besides Domino's services. None: only Domino's services. `["*"]` (alone, in quotes): Open to internet, any public host over HTTP and HTTPS; it needs `access.other: none`. |
| `inputs` | a list of inputs | none | What each task gives the agent. |
| `tool-servers` | a list of tool server names | none | The tool servers that the agent may use, and their tools: see "Tools from tool servers" below. |
| `skills` | a list of `name@version` | none | The skills of the skills store that the agent uses. |
| `memory.personal` | `true`, `false` | `false` | Personal memory: the agent keeps notes about each person who starts a task with it directly, and reads them in that person's next tasks. Only a harness agent has it. |
| `memory.agent` | `true`, `false` | `false` | Agent memory: the agent keeps notes for every person who uses it, and reads them in each task. A task proposes each new note, and an owner or an editor of the agent accepts it. Only a harness agent has it. |
| `memory.task` | `true`, `false` | `false` | Task memory: the agent keeps notes for one task, and reads them in each later round of that task. A different task can read them when a person names the task at its create. Only a harness agent has it. |

The instructions are the text below the settings, or the file `instructions.md` next to `definition.md`, not both. Each input of
`inputs` is a list item: `type` (`project`, `bundle`, `model`, `dataset`, `volume` or `text`), and the optional `name`, `required`,
`multiple`, `description` and `access` (`read`, the default, or `write`). An item of `tool-servers` is a tool server's name, for
each of its tools, or `server: <name>` with `tools: [...]`, the tools that the agent may use.

## Sign in

The command calls the agent service as you, with your Domino token. It reads three environment variables:

- `AGENT_SERVICE_URL`: the agent service's address, the URL of its Domino App. Always set it. The App runs in a frame of Domino's
  page, so the browser's address bar shows Domino's URL, not the App's. Copy the App's URL from the App: open any agent, then
  Triggers, and copy the Endpoint of the "On demand" card, without its `/api/...` part.
- `DOMINO_TOKEN`: your Domino token, such as a personal access token. Set it on a laptop or in a pipeline.
- `DOMINO_API_PROXY`: the token sidecar of a Domino workspace. Its default is `http://localhost:8899`, so you don't set it.

In a Domino workspace, set only the address. The command gets your token from the workspace for each request:

```
export AGENT_SERVICE_URL=https://apps.<domino host>/apps-internal/<app id>
```

On a laptop or in a pipeline, set your token too:

```
export AGENT_SERVICE_URL=https://apps.<domino host>/apps-internal/<app id>
export DOMINO_TOKEN=<your Domino token>
```

When the token is missing, expired or refused, the output starts with "Sign-in problem, not about the agent folder". A redirect or
a login page means that you are not signed in, or that Domino has no consent yet: open the App's URL once in a browser, then try
again.

## init

`init` makes a new agent folder in the current folder, with one file: `definition.md`. It needs no sign-in:

```
domino-agent init release-checker
```

The file has `name`, `title` and `model`, then each other field as a comment line at its default, then short example instructions.
`--model` gives the `model` line. Else, when you are signed in, it is the first alias with tool calling that the LLM Gateway lists for
you. Else it is the placeholder `<model-alias>`: `dev` and `deploy` refuse it, and with a sign-in their fix names your aliases.
`--title` gives the title that people see.

## dev

`dev` tries the agent folder as it is on your disk, before you commit it. It needs no git repo, and it writes nothing into the folder:

```
cd release-checker
domino-agent dev
```

1. It checks the folder as `deploy` does, then sends the known files to your dev copy: a second agent that only you can use. The
   registered agent with the same `name` doesn't change.
2. It opens a conversation in the terminal. Type a message, and the reply streams, with a line for each tool call, skill and subagent,
   then the time and the tokens. The conversation is a task: it stays, and it opens in the browser.
3. It watches the folder. A file that you change takes effect on your next message, in the same conversation. A change that the check
   refuses doesn't reach the dev copy: your messages use its last good definition until you fix the folder.

The rules of a dev copy:

- There is one dev copy for each person and each `name`, and each `dev` uses it again. `deploy` never touches it.
- It always acts as you, and its model calls use your own access. When the definition file names a service account or the owner, a
  notice says so: `dev` doesn't prove the permissions of that identity, and a task of the registered agent after `deploy` does.
- Live chat refuses a call that needs a person's approval, and the approval needs a person other than you, which a dev copy doesn't
  have. Test such a call after `deploy`, in a Domino Job of the registered agent.
- It can't be shared. It gets no schedule and no subscription, so nothing starts it by itself: `dev --fire NAME` tests one (see
  "Schedules and subscriptions" below). `deploy` is the only way to give an agent to other people.
- `domino-agent dev --remove` removes it. The agent service removes a dev copy that had no `dev` and no message for 14 days (the
  deployment can change the number). Its tasks stay.

In the conversation of `dev` and of `chat`:

- Ctrl+C stops a reply. `/quit`, an end of input (Ctrl+D) or Ctrl+C at the prompt ends the chat.
- When the agent waits for a decision on its plan, type `/approve`, or `/decline <what should change>`. On its access request, type
  `/retry` when the access is sorted out in Domino, or `/without` to continue without it.

For a script or a coding assistant, `-m` sends one message, prints the reply's text on standard output (each other line goes to
standard error) and exits: 0 when the reply ended, else 1. `--task <key>` continues the conversation of a task that you started:

```
domino-agent dev -m "Check the notes of release 2.4."
domino-agent dev --task AGT-109 -m "And the notes of release 2.5?"
```

`--project NAME` gives the agent a Domino project to work in. `--no-memory` starts the task with no personal memory: see "Personal
memory" below.

## check

`check` checks agent folders as `dev` and `deploy` check them before they send a folder. It needs no sign-in, no agent service and no
git repo. A pipeline runs it on each pull request with no secret, and a coding assistant runs it after each edit:

```
domino-agent check
domino-agent check agents/churn-brief agents/governance-agent
```

- It checks the definition file, the own skills, the custom subagents, the own tools and the files of `schedules/` and
  `subscriptions/`. It reads the files on the disk, also changes that are not committed.
- Each refusal is the line that `deploy` prints: the file, the line, the reason and a fix. With more than one folder, each refusal
  names its folder.
- The last line counts the refusals. It also says that the checks that need Domino did not run, such as the Environment, the
  hardware tier and the models of the LLM Gateway.
- The agent service also does checks that `check` does not do: the values of a cron expression (such as an hour of 25), a time zone
  name, a schedule that never fires, `notify: email` on a deployment with no email, and a file of the folder that is a link in git.
- `domino-agent deploy --dry-run` runs every check but the last one, with a sign-in, and registers nothing.

```
agents/churn-brief/definition.md:8: `limits.minutes` must be a whole number from 1 to 480, not `900`. Fix: Write `limits.minutes: 1` or another number in that range
1 refusal. The checks that need Domino did not run.
```

The exit code is 0 when each folder is good, 1 when a folder has a refusal or a path is not an agent folder, and 2 for a wrong
command line.

## deploy

`deploy` registers the agent folder at a path, or in the current folder. Commit the folder first:

```
domino-agent deploy governance-agent --dry-run
domino-agent deploy governance-agent
```

In this order, it:

1. Checks the folder on your side, with no network call. Each refusal names the file, the line and a fix.
2. Reads git: the repo's URL (with no credential in it), the branch, the folder's path in the repo, and the commit.
3. Sends the known files with the commit. The agent service checks them again, then creates the agent, updates it, or says "No
   change".

A new `name` makes a new agent that you own. A registered `name` updates that agent, when you can edit it and the folder is in the
recorded repo and path. The output:

```
Created Governance Agent (agt_0123456789)
  Page:    https://agents.example.com/#/agents/agt_0123456789
  Changed: title, description, model, instructions, skills/policy-evidence, subagents, tools/findings.py
  Source:  3f2a9c1e7b4d on main, governance-agent in https://github.com/acme/agents.git
```

A refusal:

```
governance-agent/definition.md:6: `limits.minutes` must be a whole number from 1 to 480, not `900`. Fix: Write `limits.minutes: 1` or another number in that range
The agent folder was refused: 1 problem. Nothing was registered.
```

The options:

- `--dry-run`: run every check, the agent service's too, and say what the deploy would do. Nothing is registered.
- `--allow-dirty`: for a test: register the folder with changes that are not committed, or outside a git repo. The agent's record
  then says that it is not clean: `domino-agent deploy governance-agent --allow-dirty`
- `--branch NAME`: the branch to record when the checkout has none (a detached HEAD, as in a pipeline):
  `domino-agent deploy governance-agent --branch main`
- `--move`: the agent's `name` is registered from another repo or path, and the move is intended. The agent's record gets this repo
  and path: `domino-agent deploy governance-agent --move`

The exit code is 0 when the deploy is done, 1 when it is refused or fails (the output says why), and 2 for a wrong command line.

## pull

`pull` writes the agent folder of an agent that you can edit. With no `--agent`, it lists the agents that you can edit, and you
select one by its number:

```
domino-agent pull
```

In a script, name the agent with its ID, or with a registered agent's `name`:

```
domino-agent pull --agent agt_0123456789
domino-agent pull governance-agent --agent governance-agent
```

- The folder's default path is a new folder named after the agent's `name`. Give a path to write it in another place.
- The definition file has an ID line, `id: <the agent's ID>`. Nobody types it. After a commit, `domino-agent deploy` of the folder
  connects it to the same agent, which keeps its ID, its tasks and its history.
- A wizard agent (one made in the agent service's UI or with its API) moves to git this way: `pull` it, commit the folder, then
  `deploy` it.
- `pull` writes a file in `schedules/` or `subscriptions/` for each trigger from the agent folder. A trigger that a person made in
  the browser gets no file, and a notice counts them.
- `pull` refuses to write into a folder that has files. `--force` writes into it: the agent's files replace them, and each known
  file that the agent doesn't have (`instructions.md`, a skill's file, a subagent file, a file of `tools/`, `schedules/` or
  `subscriptions/`) is removed, so that an old one doesn't deploy. Other files, such as a README, stay.
- `pull` refuses a framework agent: an agent folder holds only harness agents for now.

## chat

`chat` talks to an agent that is on Domino already, through live chat. In an agent folder, it talks to the folder's registered agent.
`--agent` names another agent that you may use: its ID, or a registered agent's `name`:

```
domino-agent chat --agent governance-agent
```

`chat` sends no file of the folder: it talks to what is deployed. The conversation, `-m`, `--task`, `--project` and `--no-memory` work
as for `dev`.
`--upstream-task KEY` names an upstream task of a new task, whose notes each round reads: see "Task memory" below.

## eval

`eval` runs the eval cases of the agent folder on your dev copy, before you commit or merge a change. An eval case is a file
`evals/<case-name>.yaml` in the agent folder: a conversation of one message or more, or one fire of a schedule or a subscription,
and what you expect the agent to do. `evals/due-date.yaml`:

```yaml
messages:
  - The check of bundle B-17 failed on 2026-11-02 with a high finding. When is the fix due?
expect:
  - tool: own_due_date
    outcome: allowed
  - reply-contains: "2026-11-16"
  - ends-with: result
```

```
domino-agent eval
domino-agent eval --case due-date --runs 3
```

- `eval` checks the folder and its eval cases as `check` does, and sends the folder to your dev copy, as `dev` does. Then it runs
  each eval case as its own task: through live chat, or as a background task with `background: true`. No file of `evals/` is sent,
  and the registered agent doesn't change.
- An eval case has `messages`, or `fire: <name>` with a `payload` for a subscription. Its expectations, under `expect`:
  `reply-contains` and `reply-not-contains` (the last reply), `tool` with `args` and `outcome`, `no-tool`, `ends-with` (`result`,
  `question`, `plan` or `access`), `script` (your Python script reads the record of the run as JSON, and exits 0 to pass) and
  `judge` (a model on the LLM Gateway reads the conversation against your rubric, as you). `check` checks each case file.
- The tools are real, and they act as you: write eval cases that are safe to repeat. A call that needs a person's approval is
  refused, and the eval run never approves a plan.
- A task of an eval run has no personal memory. It reads no agent memory and makes no memory proposal, so a case gives the same
  result each time: see "Agent memory" below. Each run of a case is a new task: its task memory starts empty, and `eval` names no
  upstream task.
- `eval` prints one line for each case (PASS, FAIL, or SKIP for a case that could not run), then the counts. The exit code is 0
  when each case passed, 1 when one failed, 2 for a wrong command line, and 3 when a case could not run and none failed, or when
  the eval run could not start.
- `--case NAME` runs only that case (give it again for more), `--runs N` runs each case N times, and `--parallel N` runs N live
  cases at the same time. `eval` deletes the task of each case that passed, and `--keep` keeps them. `--out FILE` writes the
  results as JSON for a pipeline: it can hold data of the tasks, so don't commit it.
- `--save TASK` with `--case NAME` writes `evals/NAME.yaml` from a task of your dev copy: your messages, a draft `tool` expectation
  for each tool call, and how the conversation ended. Edit the drafts, then run `eval`.
- In a pipeline, a dev copy acts as the token's identity. Use your own personal access token, with a short expiry, only in a repo
  that only you can write to. Else use a service account only for evals, with the least access that the cases need.

## Own tools

An own tool is a Python function that you write in a file of `tools/`. Each function with `@tool` is a tool, and the agent sees it
as `own_<name>`:

```python
from datetime import date, timedelta

from domino_agent import tool


@tool
def due_date(severity: str, found_on: str) -> dict:
    """The date by which the owner must fix a finding. Give its severity and the day when the check failed, as YYYY-MM-DD."""
    days = {"critical": 3, "high": 14, "medium": 30, "low": 90}[severity]
    return {"severity": severity, "due": str(date.fromisoformat(found_on) + timedelta(days=days))}
```

- The function's name is the tool's name, its docstring is the description, and its type hints give the arguments: `str`, `int`,
  `float`, `bool`, `list` and `dict`, a `list[T]` or a `dict[str, T]` of these, and `T | None`. A default value makes an argument
  optional. The result is text, or a value that JSON can hold.
- A function with no `@tool` is a helper. Helper code and small data files go in a subfolder of `tools/`, and a tool file imports
  them as `from tools.helpers import name`.
- `deploy` and `dev` check each file of `tools/` and never run it. A refusal names the file, the line and a fix. An agent folder has
  at most 30 own tools.
- An own tool runs in the agent's sandbox, with the power of the shell and no more: no secret, no approval, and no credential of its
  own for Domino's API, a gateway tool or a tool server. For a secret or an approval, use a tool server of the agent service.
- One call has at most 120 seconds, and one result at most 256 KiB. A tool keeps no state in memory between calls. A `print` goes to
  the run's log, and not in the result that the model gets. The log's file is in the scratch folder, which the agent's shell can read
  and write, so a line of the log that starts with `[own tool]` is not proof that a tool wrote it. An exception goes to the agent as
  an error text.
- Its packages come from the Python that runs it: the agent's Environment in a Job, and the runner's Python in live chat and `dev`.
- A custom subagent gets the own tools only with `own` in its `tools` list.
- The audit log keeps the start of each result, so a tool must never return a secret.
- `@tool` gives back the function as it is, so a unit test on your laptop calls it as a plain function, with only this package
  installed. Keep the test out of `tools/`.

## Tools from tool servers

An agent has three kinds of tools, and the agent folder sets each kind in a different place:

| Kind | In the agent folder |
|---|---|
| The built-in tools | The `tools.*` fields turn each one on or off. The `access.*` fields set what the Domino tools reach. |
| The tools of tool servers | The `tool-servers` field: the tool servers, and the tools of each one, that the agent may use. |
| Own tools | The functions with `@tool` in `tools/`: see "Own tools" above. |

A tool server is an MCP server that the agent service gives to agents. A tool server admin adds it once to the tool server list (the
MCP servers page of the agent service), with its name, its URL or its code, and its secret. So the agent folder doesn't define these
tools, and it holds no URL and no secret: it names only the tools that the agent may use.

```yaml
tool-servers:
  - amlcases                # a name alone: every tool of the tool server, also a tool that it adds later
  - server: github          # a name with `tools`: only these tools of the tool server
    tools: [create_issue]
```

- `amlcases` and `github` are examples. Use the names of the tool server list.
- `deploy` and `dev` refuse a tool server that is not on the list, and the refusal names the ones that are. `check` has no sign-in,
  so it checks only the form. The names in `tools` are not checked: a name that the tool server doesn't have gives no tool.
- The agent service decides and audits each call, as it does for a Domino tool. A tool server admin can mark a tool as write, and a
  write tool can need a person's approval before it runs. The requester can never approve their own call.
- A task uses a tool server only when the identity that the agent acts as (`identity`) has access to it. A tool server admin sets
  the access. `dev` always acts as you.
- What a tool server gets comes from its kind. A Domino-hosted tool server (a Domino App on this deployment) gets a short-lived
  Domino token for the identity that the agent acts as. An outside tool server gets only its own secret, and an in-app tool server
  (Python code that the agent service runs) gets only its own secrets.
- A custom subagent gets the tools of the tool servers only with `domino` in its `tools` list, or with no `tools` list.

## Schedules and subscriptions

A schedule starts a task of the agent at fixed times, and a subscription starts a task when an event of one type comes in. Each one
is a markdown file: the settings are YAML on top, the text below them is the instruction, and the file name is its name.
`schedules/weekly-findings.md`:

```markdown
---
cron: "0 9 * * 1"               # Mondays at 09:00: minute hour day-of-month month day-of-week
timezone: America/New_York      # with none, UTC
title: "Open findings on {{schedule.scheduledFor}}"
---
List the governance findings that are still open on {{schedule.scheduledFor}}.
```

`subscriptions/failed-check.md`:

```markdown
---
event: governance.scripted_check.failed
filter:
  - field: policy.stage
    equals: Validation
title: "Failed check: {{check.name}}"
notify: [inbox]
---
The scripted check {{check.name}} failed for the bundle {{bundle.name}}. Investigate why it failed.
```

- A schedule file has `cron` (required, in double quotes: five fields, or a short form such as `"@daily"`), `timezone` (a time zone
  name, UTC by default), `project` (for an agent that can run in any project), `title` and `notify`. Its instruction is required,
  and it takes `{{schedule.scheduledFor}}`, `{{schedule.name}}`, `{{schedule.cron}}` and `{{schedule.timezone}}`.
- A subscription file has `event` (required: the event type), `filter` (a list of conditions: `field` and one of `equals` or
  `contains`), `title` and `notify`. Its instruction takes the values of the event's payload, such as `{{bundle.name}}`. With no
  instruction, the event type's default instruction is used. Write a `title` that starts with `{{` in quotes.
- The name is lowercase letters, digits and hyphens, at most 48 characters, and unique across the two folders. Each folder has at
  most 20 files.
- `deploy` makes the agent's triggers from the agent folder equal to the files: it adds, changes and removes them, with one line
  for each, and the next fire time of each schedule. `--dry-run` prints the same lines. A trigger that a person made in the browser
  stays. A changed file keeps the trigger's ID and its history, and a new file name is a remove and an add.
- On or off, a callback URL, a Slack URL and the pinned resources stay in the browser, and a deploy keeps them.
- For an agent with the identity `requester`, each task of a schedule acts as the agent's owner, and it waits until the owner
  continues it. `deploy` says so in a notice.
- A dev copy gets no schedule and no subscription. `dev --fire NAME` sends the instruction of one fire of it as a message to your
  dev copy, prints the reply and exits, as `-m` does. For a subscription, `--payload FILE` is a JSON file of the event's payload;
  with none, the event type's example payload. A payload that the filter does not permit is refused, and nothing is sent:

```
domino-agent dev --fire weekly-findings
domino-agent dev --fire failed-check --payload failed-check.json
```

## Personal memory

With personal memory, the agent keeps a few Markdown files about each person who starts a task with it directly, and reads them in
that person's next tasks: their preferences, their corrections and their decisions. Turn it on in `definition.md`:

```yaml
memory:
  personal: true
```

- `MEMORY.md` is the index: its text goes into each model call of the person's rounds. The other files are topic files, which the
  agent reads when it needs them.
- The limits: 8 KiB for `MEMORY.md`, 64 KiB for each other file, and 50 files and 512 KiB in all, for one person with one agent.
- Only a harness agent has it: `check` and `deploy` refuse `personal: true` for a framework agent.
- `chat` and `dev` ask for personal memory for each task that they start. `--no-memory` starts the task with none, for one command.
  It is for a new task: with `--task` it is a wrong command line.

```
domino-agent chat --no-memory
domino-agent dev --no-memory -m "Check the notes of release 2.4."
```

- Your dev copy has its own memory, and it is deleted with your dev copy. `dev --fire` and `eval` use no personal memory.
- A task from the API of the agent service has personal memory only when its create asks for it. A task of a schedule or of a
  subscription never has it.
- Each person reads, edits and deletes their own files on the Memory tab of the agent's page in the App. The agent's owner and its
  editors can't open them, but they can read the person's tasks, which show the memory files that the agent reads and writes.
  Nothing scans a note for secrets, and memory is not a place for data.

## Agent memory

With agent memory, the agent keeps a few Markdown files for every person who uses it: corrections of its mistakes, the places where
data is, and the rules of the team. Each task of the agent reads them. Turn it on in `definition.md`:

```yaml
memory:
  agent: true
```

- A task cannot change agent memory. The agent writes a memory proposal: the complete new text of one file. An owner or an editor of
  the agent accepts it, edits it and accepts it, or rejects it on the Memory tab of the agent's page in the App, and no task reads it
  before the accept. An owner or an editor can also write a file there directly.
- The limits: 5 open proposals for each task, and 50 for each agent. An open proposal expires after 30 days. The files have the
  limits of personal memory, for the agent.
- Only a harness agent has it: `check` and `deploy` refuse `agent: true` for a framework agent. `personal` and `agent` are
  independent, and `pull` writes `agent: true` only when it is on. The files stay in the agent service: `pull` never writes them.
- `chat` and `dev` send nothing for agent memory: each task reads it, and can propose a note. `--no-memory` is for personal memory
  only.
- The agent memory of your dev copy starts empty, and only you change it: you write its notes, and accept or reject its proposals.
  The agent memory of the registered agent does not change. An eval run reads no agent memory and makes no memory proposal.
- Nothing scans a note for secrets, and the owner and the editors get the notice of a new proposal in the Inbox of the App only.

## Task memory

Task memory is the third kind of memory, after personal memory and agent memory. With task memory, the agent keeps a few Markdown
files for each task: the state of the work, its plan and the facts that the next round needs. Each later round of the same task reads
them, and a different task can read them as an upstream task. Turn it on in `definition.md`:

```yaml
memory:
  task: true
```

- A run writes task memory directly: nobody accepts a note. `MEMORY.md` is the index: its text goes into each model call of the
  task's rounds. The other files are topic files, which the agent reads when it needs them.
- The limits: 8 KiB for `MEMORY.md`, 64 KiB for each other file, and 50 files and 512 KiB in all, for each task.
- Only a harness agent has it: `check` and `deploy` refuse `task: true` for a framework agent. The three fields of `memory` are
  independent, and `pull` writes `task: true` only when it is on. The files stay in the agent service: `pull` never writes them.
- A new task names at most 5 upstream tasks by their task keys, and each of its rounds reads their notes, read only. `chat` and `dev`
  take `--upstream-task KEY`, one time for each upstream task, for a new task. With `--task`, the flag is refused: a task keeps the
  list of its start.

```
domino-agent dev --upstream-task AGT-138 -m "Write the report from the notes of the triage."
```

- `--no-memory` does not change task memory. The task of `dev --fire` names no upstream task. Each run of an eval case is a new task,
  so its task memory starts empty, and `eval` names no upstream task.
- Each person who can read the task reads its notes, and deletes a file, on the task page in the App. So the owner and the editors of
  the agent can read what a round of it read from an upstream task. Nothing scans a note for secrets.

## Live chat needs a runner

`dev` and `chat` run the agent on Domino, on the runner of the deployment: the Domino App that runs live chat. With no runner, the
commands refuse with the agent service's reason, and no task starts. With a runner App, open `<runner URL>/authorize` one time in a
browser, so that Domino can ask for your consent. The command says so when it is needed.

## Changes

- 0.10.0: task memory. The group `memory` of `definition.md` gets a third field, `task` (default `false`). With `task: true`, a
  harness agent keeps a few Markdown files for each task: the working notes that each later round of the same task reads. A new task
  can name at most 5 upstream tasks by their task keys, and each of its rounds reads their notes, read only: see "Task memory".
  `check` and `deploy` refuse it for a framework agent, and `pull` writes `task: true` only when it is on. `chat` and `dev` take
  `--upstream-task KEY`, one time for each upstream task of a new task; they refuse it with `--task`, `dev --fire` and `dev --remove`.
  `--no-memory` does not change task memory. `eval` names no upstream task, and the task memory of each run of a case starts empty.
  An older `domino-agent` refuses `memory.task`: upgrade it with `pip install --upgrade domino-agent`. An older agent service has no
  task memory: it refuses `memory.task`, and ignores what `--upstream-task` sends.
- 0.9.0: agent memory. The group `memory` of `definition.md` gets a second field, `agent` (default `false`). With `agent: true`,
  a harness agent keeps a few Markdown files for every person who uses it, and each task reads them. A task proposes each new
  note, and an owner or an editor of the agent accepts it: see "Agent memory". `check` and `deploy` refuse it for a framework
  agent, and `pull` writes `agent: true` only when it is on. `--no-memory` of `chat` and `dev` is for personal memory only. `eval`
  starts each case with no agent memory, so a case makes no memory proposal. An older `domino-agent` refuses `memory.agent`:
  upgrade it with `pip install --upgrade domino-agent`. An older agent service has no agent memory, and ignores what `eval` sends.
- 0.8.0: personal memory. The group `memory` of `definition.md` has one field, `personal` (default `false`). With `personal: true`,
  a harness agent keeps a few Markdown files about each person who starts a task with it directly, and reads them in that
  person's next tasks: see "Personal memory". `check` and `deploy` refuse it for a framework agent, and `pull` writes the group
  only when it is on. `chat` and `dev` ask for personal memory for each task that they start, and `--no-memory` starts the task
  with none. `dev --fire` and `eval` never ask. An older `domino-agent` refuses the group `memory`: upgrade it with
  `pip install --upgrade domino-agent`. An older agent service ignores the ask, so its tasks have no personal memory.
- 0.7.0: `eval`. `domino-agent eval [PATH]` runs the eval cases of `evals/` of an agent folder on your dev copy, each as its own
  task, and checks what each case expects: a text in the reply, a tool call, how the conversation ended, a script of yours, or a
  judge model on the LLM Gateway. Its exit code 3 tells a case that could not run from a case that failed (1). `--out FILE` writes
  the results as JSON, and `--save TASK --case NAME` writes an eval case from a task of your dev copy. `check` checks each case
  file. An older `domino-agent` skips `evals/`: upgrade it with `pip install --upgrade domino-agent`. With an older agent service,
  the tasks of the cases that passed are not deleted, and a judge could not run.
- 0.6.0: two fields, and the tools of tool servers. `fast-start` (default `true`) takes a sandbox from the shared warm pool, and
  `false` starts each run cold. `allowed-domains: ["*"]` sets Network to Open to internet, any public host. It is refused with
  `access.other: read`, on your computer and by the agent service, and a custom subagent of such an agent may keep `web`. The new
  section "Tools from tool servers" says how an agent folder names the tools of the agent service's tool servers that the agent may
  use. An older `domino-agent` refuses both fields: upgrade it with `pip install --upgrade domino-agent`.
- 0.5.0: `check`. `domino-agent check [PATH ...]` checks agent folders as `deploy` checks them before it sends a folder, with no
  sign-in, no agent service and no git repo, so a pipeline runs it on each pull request with no secret. It prints each refusal as
  `deploy` does, then the count and the sentence that the checks that need Domino did not run. Its exit code is 0, 1 or 2. While
  automatic deploy of an agent is on, the agent service refuses a `deploy` of it and gives its `deploy --dry-run` a notice: the
  command prints both as it prints each refusal and notice.
- 0.4.0: schedules and subscriptions. Each file `schedules/<name>.md` is a schedule of the agent, and each file
  `subscriptions/<name>.md` is a subscription. `deploy` checks them and sends them, and the agent service adds, changes and removes
  the agent's triggers from the agent folder so that they are equal to the files; it prints a line for each, also with `--dry-run`.
  `dev` checks and sends them, and `dev --fire NAME` (with `--payload FILE` for a subscription) fires one of them one time as you.
  `pull` writes them. An older `domino-agent` refuses a folder with `schedules/`, and the agent service changes no trigger for it;
  its `pull` refuses an agent with a trigger from the agent folder: upgrade it with `pip install --upgrade domino-agent`.
- 0.3.0: own tools. Each function with `@tool` (`from domino_agent import tool`) in a Python file of `tools/` is a tool of the agent.
  `deploy` and `dev` check the files of `tools/` and send them, `pull` writes them, and a custom subagent gets the own tools with
  `own` in its `tools` list. An older `domino-agent` refuses a folder with `tools/` ("`tools/` is a name that a later phase uses"),
  and its `pull` refuses the files of `tools/`: upgrade it with `pip install --upgrade domino-agent`. When the agent service refuses
  a live reply (an older runner App, for one), `chat` and `dev` print the agent service's text.
- 0.2.0: `init`, `dev` and `chat`. `init` makes a new agent folder. `dev` tries the folder as your dev copy on Domino, in a
  conversation in the terminal. `chat` talks to an agent on Domino through live chat. `dev` and `deploy` refuse the placeholder
  that `init` writes for the model, and with a sign-in they name your aliases.
- 0.1.0: the first release. `deploy` and `pull`; the definition file; own skills, store skills and custom subagents.

## License

Apache-2.0. Copyright 2026 Domino Data Lab, Inc. The LICENSE and NOTICE files are in the package.
