Publish an agent
publish_agentPublish source as an agent: a SOUL.md describing who it is, a valet.yaml declaring the skills, connectors, channels, and configuration it runs with, and any supporting files. Use it when the work is an agent that answers on a channel or runs on a schedule, not a website or an app. Apply the governance skill before calling.
files must include valet.yaml and SOUL.md at the root. Unlike a website's or an app's, an agent's valet.yaml is yours: Valet validates it rather than writing it, and refuses one the agent rules reject. An organization connector or channel the manifest names is attached for you. When the manifest names one the organization does not have, or a skill that does not resolve, nothing deploys and the answer lists what is pending and the tool that sets each up; do that and call again with the same files.
Publishing to a name that exists replaces its source with these files, so read get_source first when the agent is not yours. The first publish creates the agent. An agent deploy finishes before this call returns: the answer carries the release version, and get_service reports whether the agent is running and what it holds. Requires connecting a Valet account.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Required. The agent's name. Naming an agent that exists republishes it. | |
| files | Yes | Required. The agent's files, [{path, content}], including valet.yaml and SOUL.md at the root. | |
| org_name | No | The Valet organization to publish into. Omit to use the organization the account joined first. | |
| discard_draft | No | Set true to discard an open draft on this agent that another session left. Omit to be told about it instead. | |
| idempotency_key | No | An opaque key of your choosing. Repeating a call with the same key returns the first call's result instead of deploying a second release. Use a new key for new files: a repeated key returns the earlier result even when the files changed. A call that deployed nothing gives its key back. |