Metadata-Version: 2.4
Name: domino-agent
Version: 0.1.0
Summary: Register an agent folder in git with the Domino agent service: domino-agent deploy, and domino-agent pull.
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 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 pull` writes the agent folder of an agent that
exists.

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. Each command has its help:

```
domino-agent --version
domino-agent deploy --help
domino-agent pull --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
```

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>/`, and
  `subagents/<file>.md`. Other files, such as a README, stay in git. The folders `tools/` and `schedules/` are refused: they are
  kept for later.
- 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.

## 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.
- `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://<domino host>/apps/<app id>
```

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

```
export AGENT_SERVICE_URL=https://<domino host>/apps/<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.

## 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
  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` 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) 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.

## Changes

- 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.
