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

# Goal and operating procedure

> Give each Agent a goal that defines a good conversation and success criteria you can observe, plus numbered steps it follows to reach that goal.

The goal says what a good conversation with this Agent achieves. The operating procedure says how the Agent gets there, as numbered steps it follows in order. Together they turn a general assistant into one with a clear job.

## Goal and success criteria

The goal is one sentence about the shopper, written from their side of the conversation. The success criteria say how you know the goal was met, as something you can observe in the conversation or the store.

| Part | What it holds | Example |
| - | - | - |
| Goal | What a good conversation achieves for the shopper | An undecided shopper finds the right product and adds it to cart |
| Success criteria | The observable signal that the goal was met | The shopper views or adds a recommended product |

Keep the goal narrow. An Agent with one clear goal makes better choices than an Agent asked to sell, support, and educate at once. When a conversation drifts outside the goal, the Agent hands it on. Read [Escalation and handoff](https://crossword.ai/docs/agents/escalation-and-handoff.md).

## Agent goals and Journey goals

A [Journey](https://crossword.ai/docs/orchestration/journeys.md) also has goals, and the two do different jobs.

* **The Journey goal is the business outcome.** It is what you measure across every shopper in that situation, such as add to cart or ticket deflection.
* **The Agent goal is what a good conversation achieves.** It is what the Agent works toward, turn by turn, with one shopper.

The Product Q\&A Journey's primary goal is add to cart. The Product Q\&A Agent's goal is that the shopper gets their doubts answered and buys with confidence. A good conversation serves the Journey goal, but the Agent is judged on the conversation.

## Operating procedure

The operating procedure is a short list of numbered steps. Each step names a situation and what the Agent does in it. The Agent follows the steps in order and moves to the next one when the conversation calls for it.

Write the steps as you would brief a new member of staff.

* Start with the first thing the Agent does, such as asking one or two questions.
* Give each fork a step of its own, such as what to do when the shopper is still unsure.
* End with the step that closes the conversation well, such as pointing to the best-value pack.
* Keep each step to one action. Four steps is typical.

The operating procedure also shapes the [follow-up suggestions](https://crossword.ai/docs/components/conversation/follow-up-suggestion.md) under each reply. The Agent writes them from the step it is on, so they point to the next useful move. Read [Rich responses and actions](https://crossword.ai/docs/agents/rich-responses-and-actions.md).

Anything the Agent must never do belongs in [Guardrails](https://crossword.ai/docs/agents/guardrails-and-fallback.md), not in the operating procedure. A step can never override a guardrail.

## Example

The Product Discovery Agent helps an undecided shopper pick a gummy. Its goal and four steps look like this.

```yaml theme={null}
goal_and_success_criteria:
  goal: An undecided shopper finds the right product and adds it to cart.
  success: The shopper views or adds a recommended product.
operating_procedure:
  - Ask one or two quick questions, such as what they want to feel, and gummy or spray.
  - Recommend one best pick and one alternative, bestsellers first.
  - If the shopper is still unsure, open the Quiz, then explain the result in plain words.
  - At the pick, mention Subscribe & Save once.
```

This Agent answers in the Default Journey, whose primary goal is Interacted and secondary goal is View product page.

## Related

> [card] [Agents](https://crossword.ai/docs/agents/overview.md)

> [card] [Journeys](https://crossword.ai/docs/orchestration/journeys.md)

> [card] [Rich responses and actions](https://crossword.ai/docs/agents/rich-responses-and-actions.md)

> [card] [Guardrails and fallback](https://crossword.ai/docs/agents/guardrails-and-fallback.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.