Adopt discovered trace source
adopt_discovered_agentAdopt a discovered trace source to count its traces under an agent from now on: create a new agent or merge into an existing one.
Instructions
Requires the write scope or higher. Counts a discovered trace source's traces under an agent from now on. Without agent_id, a new agent named after the source is created (409 AGENT_EXISTS when its slug is taken). With agent_id (e.g. a suggested_agent_id), the source merges into that agent. Earlier traces stay where they are (backfilled is false). Re-adopting into the same agent changes nothing; into a different one is 409 ALREADY_ADOPTED. untrusted_fields names the data fields LastPing did not write (job output, exporter data or user-supplied names).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Discovered source UUID (from list_discovered_agents). | |
| agent_id | No | Optional agent UUID (from list_agents) to merge the source into. Omitted: a new agent is created. |