> ## Documentation Index
> Fetch the complete documentation index at: https://vida.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Cookbook: Build and Launch an Agent

> Create or select an Agent account, configure staging, test it, publish it, and verify the live result.

Use this workflow when an API client or external AI agent builds or extends a Vida Agent. The
[Vida skill](https://vida.io/docs/api-reference/vida-api-skill.md) contains the complete build and operation guidance.
Apply only the steps needed for the requested capability and launch state.

For Computer work, use **Task → Skill → Helpers**. The Task supplies run inputs and the requested
outcome, the owning skill defines the procedure and recovery, and registered helpers perform the
Computer operations. Ordinary voice and platform functions continue to use their documented APIs.

## Required inputs

* an authorized Vida API token
* the organization account ID
* the intended Agent account, or approval to create one
* the business workflow and acceptance criteria
* required access, authoritative state, output destination/retention, and per-run limits
* approval for writes that can affect billing or production behavior

Keep `targetAccountId`, Agent-account IDs, and `agentConfigId` values distinct. Read IDs from Vida;
do not reconstruct them from names.

## 1. Resolve the account

1. [Read the authenticated or selected account](https://vida.io/docs/api-reference/accounts/get-account-details.md).
2. Confirm its type, parent organization, enabled capabilities, and intended customer.
3. [List Agent accounts](https://vida.io/docs/api-reference/accounts/list-agent-accounts.md) under the organization.
4. Reuse the intended Agent account, or create one only after confirming the account and billing
   impact.

Establish the intended parent organization before creation. The token's default organization proves
access, not ownership intent. Infer already stated decisions rather than requesting them again.

Save the returned Agent account ID. Use it as `targetAccountId` for Agent-scoped operations.

## 2. Discover available capabilities

Do not copy model, voice, function, or app identifiers from another account.

* [List supported models](https://vida.io/docs/api-reference/models/list-supported-ai-models.md).
* [List Agent voices](https://vida.io/docs/api-reference/agents/list-agent-voices.md).
* [List Agent functions](https://vida.io/docs/api-reference/agents/list-agent-functions.md).
* [List Agent apps](https://vida.io/docs/api-reference/apps/list-agent-apps.md).

Read the detail for every app or function that has setup requirements.

## 3. Read and update staging

1. [Read staging](https://vida.io/docs/api-reference/agents/fetch-staging-agent.md).
   Compare with live to identify unrelated unpublished changes before editing.
2. Preserve writable values the user did not ask to change, especially authored arrays.
3. [Update staging](https://vida.io/docs/api-reference/agents/update-staging-agent-configuration.md) with only approved
   writable settings.
4. Read staging again and compare the complete persisted result with the intended configuration.

Agent instructions establish the role, boundaries, and routing. A Computer workflow's detailed
procedure and helper sequence belong in its owning skill, rather than a second copy in the prompt.

Do not send calculated response fields, effective inherited values, or IDs from the live
configuration back as authored staging settings.

## 4. Resolve dependencies

Before testing:

* install and verify required apps
* configure functions and their destinations
* connect phone, SMS, SIP, email, or web channels as needed
* provision and verify a Computer Agent before adding Computer-only capabilities
* create reporting fields with stable keys

If a connection requires credentials, use its supported setup flow rather than adding credentials
to Agent instructions.

For Computer workflows, complete the
[owning skill and registered helpers](https://vida.io/docs/api-reference/agent-guides/computer-agent-workspaces-and-helpers.md).
Keep required resources and retained file outputs with that skill. Declare authentication,
callbacks, state, retention, and delivery dependencies. Prove runtime skill discovery separately
from helper registration, then test representative helper execution and the destination effect.

Use Browser exploration or recording only when needed to establish an operation. API and file
helpers do not require a Browser recording. New workflows should not depend on heartbeats,
conversational memory, workspace searching, or loose scripts.

## 5. Test the prepared Agent

Test the successful path, missing information, refusal or unsupported work, escalation, and every
external side effect. Use a real representative channel when possible.

Run the intended Task or request in a fresh execution without the builder's prior conversation or
temporary files. A caller that only needs one known helper can invoke it directly without creating
an unnecessary Task. Preserve declared source-system state and authenticated Browser profiles.

If recurring work is requested, create a repeating Task paused with instructions naming the owning
skill and supplying its business inputs, scope, limits, and requested result. Inspect one controlled
run and verify a second run skips or reconciles prior work. Activate only within the user's
authorization. See [Tasks and automation](https://vida.io/docs/api-reference/platform-guides/tasks-and-automation.md).

For an authorized outbound test, create a Task for the selected Agent and inspect its terminal
result, attempt history, log, and conversation. Verify any external action in the destination
system.

Optionally [review the Agent configuration](https://vida.io/docs/api-reference/agents/review-an-agent-configuration.md),
but do not treat automated review as a substitute for a representative test.

## 6. Save and publish

1. Optionally [save a named version](https://vida.io/docs/api-reference/agents/save-agent-version.md) for recovery or an
   experiment.
2. Confirm the authorized release includes every staging/live difference. Publishing includes
   unrelated staged work too; preserve it and resolve release scope before proceeding.
3. [Publish staging](https://vida.io/docs/api-reference/agents/publish-an-agent.md).
4. [Read the live Agent](https://vida.io/docs/api-reference/agents/fetch-live-agent.md) independently.

## 7. Verify production

Run one production-path interaction and confirm:

* the request reached the intended Agent and channel
* the live configuration matches the approved staging result
* functions, apps, and transfers worked in their destination systems
* the log and complete conversation are available
* reporting fields contain defensible values

## Completion evidence

Report the organization and Agent account IDs, staging and live `agentConfigId` values, saved
version ID when created, actual launch state, representative Task or conversation reference, and
external verification. For Computer work, include the owning skill, registered helpers, state/output
locations, and schedule state when applicable. Identify any unresolved dependency. Do not report
completion from the publish response alone, or imply a staged delivery is live.
