# Build and operate an AI agent

> Create, configure, test, launch, and improve a Spacebrain conversational agent.

Canonical: https://help.spacebrain.ai/chat-and-voice/agents/

## Create an agent

Open **Chat & Voice → Agents** and choose **New agent**. Use the guided creation flow or the available manual path. Give the agent a specific name and one primary job. If onboarding or website analysis proposes configuration, review every detected detail before saving.

## Write effective instructions

Structure instructions around:

* **Identity:** what the agent represents and who it serves.
* **Objective:** the outcome it should pursue.
* **Source boundary:** which information it may rely on and what it must not guess.
* **Conversation behavior:** questions, confirmation, tone, language, and interruption handling.
* **Actions:** what it may execute and what must be confirmed first.
* **Handoff:** when and how a person takes over.
* **Prohibitions:** claims, decisions, topics, or data the agent must avoid.

Avoid one enormous prompt with contradictory rules. Put factual material in Knowledge and keep behavioral rules in configuration.

## Configure voice and conversation behavior

Choose a voice and language appropriate to the audience, then test pronunciation of the business name, people, products, addresses, numbers, and industry terms. Keep the opening concise and identify the business or automated nature of the interaction when required.

Tune response length and pacing for the channel. Spoken responses generally need shorter sentences and explicit confirmation of critical details.

## Add actions safely

Actions can connect conversation intent to external work such as calendar or messaging behavior supported by the workspace. Grant the minimum capability. Define required inputs, confirm irreversible or customer-impacting actions, and specify failure behavior.

Test each action with valid data, missing data, invalid data, provider rejection, repeated requests, and cancellation. Verify the downstream system—not just the agent’s spoken confirmation.

## Test the agent

Use a repeatable test set:

1. Normal request with complete information.
2. Ambiguous request requiring clarification.
3. Request outside the knowledge base.
4. Attempt to override instructions or extract private information.
5. Mid-sentence interruption and topic change.
6. Opt-out or demand for a person.
7. Action success, failure, and duplicate attempt.
8. Noisy audio, silence, and wrong recipient for voice.

Record expected outcomes before testing. Review conversation artifacts, action output, CRM updates, tasks, recordings, and usage.

## Launch and improve

Attach only the intended widget, campaign, or number. Start with limited traffic and a live monitoring owner. Change one major variable at a time, version the reason for the change, and retest affected scenarios. Remove obsolete knowledge rather than allowing conflicting sources to accumulate.

