|
| 1 | +--- |
| 2 | +title: ACP Registry Agents |
| 3 | +description: Run agents published in the Agent Client Protocol registry |
| 4 | +--- |
| 5 | + |
| 6 | +Harbor can run agents from the [ACP registry](https://github.com/agentclientprotocol/registry) through the built-in generic `acp` runner. |
| 7 | + |
| 8 | +## CLI |
| 9 | + |
| 10 | +Use the `acp:<id>[@version]` shorthand anywhere `--agent` is accepted: |
| 11 | + |
| 12 | +```bash |
| 13 | +harbor run \ |
| 14 | + --path examples/tasks/hello-world \ |
| 15 | + |
| 16 | + --model openai/gpt-5.4 \ |
| 17 | + --ae OPENAI_API_KEY=$OPENAI_API_KEY |
| 18 | +``` |
| 19 | + |
| 20 | +If the version is omitted, Harbor resolves the latest `agent.json` from the registry's `main` branch during agent setup. |
| 21 | + |
| 22 | +## Config Files |
| 23 | + |
| 24 | +The same shorthand works in YAML or JSON configs and is preserved in the persisted `config.json`: |
| 25 | + |
| 26 | +```yaml |
| 27 | +agents: |
| 28 | + |
| 29 | + model_name: openai/gpt-5.4 |
| 30 | + kwargs: |
| 31 | + auth_policy: auto |
| 32 | + permission_mode: allow |
| 33 | +``` |
| 34 | +
|
| 35 | +## SDK |
| 36 | +
|
| 37 | +SDK users can use the same declarative agent name: |
| 38 | +
|
| 39 | +```python |
| 40 | +from harbor.models.trial.config import AgentConfig |
| 41 | + |
| 42 | +agent = AgentConfig( |
| 43 | + |
| 44 | + model_name="openai/gpt-5.4", |
| 45 | + env={"OPENAI_API_KEY": "${OPENAI_API_KEY}"}, |
| 46 | +) |
| 47 | +``` |
| 48 | + |
| 49 | +Registry resolution happens asynchronously in `AcpAgent.setup()`, so creating configs and agents does not perform network I/O. |
| 50 | + |
| 51 | +## Options |
| 52 | + |
| 53 | +Common ACP kwargs: |
| 54 | + |
| 55 | +- `auth_policy`: `auto`, `explicit`, or `disabled` |
| 56 | +- `permission_mode`: `allow` or `deny` |
| 57 | +- `distribution_preference`: comma-separated preference among `binary`, `npx`, and `uvx` |
| 58 | +- `registry_ref`: ACP registry git ref for latest-version resolution |
| 59 | +- `registry_cache_dir`: local cache directory for fetched registry entries |
| 60 | + |
| 61 | +You can also run the generic ACP agent with an explicit registry entry: |
| 62 | + |
| 63 | +```yaml |
| 64 | +agents: |
| 65 | + - name: acp |
| 66 | + kwargs: |
| 67 | + registry_entry_path: /path/to/agent.json |
| 68 | +``` |
| 69 | +
|
| 70 | +## Outputs |
| 71 | +
|
| 72 | +ACP runs write these files under the agent log directory: |
| 73 | +
|
| 74 | +- `acp.txt` |
| 75 | +- `acp-events.jsonl` |
| 76 | +- `acp-summary.json` |
| 77 | +- `trajectory.json` |
| 78 | + |
| 79 | +Because Harbor generates `trajectory.json`, standard trace export works: |
| 80 | + |
| 81 | +```bash |
| 82 | +harbor traces export -p jobs/<job-name> --recursive |
| 83 | +``` |
0 commit comments