Create an agent
create_agentRegister a new build agent to obtain the authentication token needed to connect a machine to Woodpecker CI and receive pipeline workloads.
Instructions
Registers a new build agent and returns its token. THE TOKEN IS A CREDENTIAL: whoever holds it can attach a machine to this server, receive pipeline workloads and read every secret those pipelines use. It is part of this answer because it is the only way to get it — put it straight into the agent's configuration and do not paste it anywhere else.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Display name of the agent. | |
| org_id | No | Create an organization-scoped agent, which only runs that organization's pipelines. Without it the agent serves the whole instance. | |
| no_schedule | No | When true the agent finishes what it has and accepts no new work — how you drain an agent before taking its host down. | |
| custom_labels | No | Labels this agent advertises, as a flat string map. A pipeline selects agents with a matching "labels" block. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| truncated | No | Present only when the answer was shortened to fit the budget. |