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

> ## Agent Instructions
> To search or read these docs, connect the Ringg docs MCP server at https://docs.ringg.ai/mcp (no key needed; tools search_ringg_ai and query_docs_filesystem_ringg_ai) instead of browsing pages one by one. Setup for each client: https://docs.ringg.ai/resources/mcp-server/docs-mcp-server/mcp-for-ai-assistants.md
> The dashboard labels agents "Assistants"; these docs say "agent". Both mean the same object, identified by agent_id.
> API base URL: https://prod-api.ringg.ai/ca/api/v0. Send the workspace API key in the X-API-KEY header, from server-side code only.
> Placing a call dials a real phone number and spends credits. Confirm the number with the user before calling.
> To act on a Ringg workspace (place calls, edit agents, read transcripts), use the separate Ringg workspace MCP server at https://mcp.ringg.ai/mcp: https://docs.ringg.ai/resources/mcp-server/workspace-mcp-server/overview.md

# Lesson: Write the prompt

> Rewrite the EMI reminder agent's first message and prompt sections to confirm the customer, state the amount and date, and ask for a payment date, then save.

export const Quiz = ({question, answers, correctFeedback, incorrectFeedback}) => {
  const [selected, setSelected] = React.useState(null);
  const [checked, setChecked] = React.useState(false);
  const quizId = React.useId();
  const isCorrect = checked && answers[selected]?.correct;
  const reset = () => {
    setSelected(null);
    setChecked(false);
  };
  const optionStyle = (answer, i) => {
    const base = {
      display: "flex",
      alignItems: "flex-start",
      gap: "0.6rem",
      padding: "0.6rem 0.8rem",
      marginTop: "0.5rem",
      borderRadius: "0.6rem",
      border: "1px solid rgba(128, 128, 128, 0.35)",
      cursor: checked ? "default" : "pointer",
      lineHeight: 1.45
    };
    if (checked && answer.correct) {
      return {
        ...base,
        borderColor: "rgba(22, 163, 74, 0.8)",
        background: "rgba(22, 163, 74, 0.12)"
      };
    }
    if (checked && selected === i && !answer.correct) {
      return {
        ...base,
        borderColor: "rgba(220, 38, 38, 0.8)",
        background: "rgba(220, 38, 38, 0.1)"
      };
    }
    if (!checked && selected === i) {
      return {
        ...base,
        borderColor: "currentColor",
        background: "rgba(128, 128, 128, 0.12)"
      };
    }
    return base;
  };
  const buttonStyle = disabled => ({
    marginTop: "0.9rem",
    padding: "0.45rem 0.9rem",
    borderRadius: "0.5rem",
    border: "1px solid rgba(128, 128, 128, 0.5)",
    background: "rgba(128, 128, 128, 0.1)",
    color: "inherit",
    font: "inherit",
    fontSize: "0.9em",
    cursor: disabled ? "not-allowed" : "pointer",
    opacity: disabled ? 0.5 : 1
  });
  return <div style={{
    marginTop: "1.5rem",
    padding: "1rem 1.1rem",
    borderRadius: "0.8rem",
    border: "1px solid rgba(128, 128, 128, 0.35)"
  }}>
      <Badge color="green">Quiz</Badge>
      <p id={quizId + "-question"} style={{
    fontWeight: 600,
    margin: "0.6rem 0 0.2rem"
  }}>
        {question}
      </p>
      <div role="radiogroup" aria-labelledby={quizId + "-question"} aria-disabled={checked}>
        {answers.map((answer, i) => <label key={i} style={optionStyle(answer, i)}>
            <input type="radio" name={"quiz-" + quizId} checked={selected === i} onChange={() => !checked && setSelected(i)} disabled={checked} style={{
    marginTop: "0.3rem",
    flexShrink: 0
  }} />
            <span>{answer.text}</span>
          </label>)}
      </div>
      {checked && <div role="status" aria-live="polite" aria-atomic="true" style={{
    marginTop: "0.9rem",
    padding: "0.7rem 0.9rem",
    borderRadius: "0.6rem",
    lineHeight: 1.5,
    background: isCorrect ? "rgba(22, 163, 74, 0.12)" : "rgba(220, 38, 38, 0.1)"
  }}>
          <strong style={{
    marginRight: "0.4rem"
  }}>{isCorrect ? "✓" : "✗"}</strong>
          {isCorrect ? correctFeedback : incorrectFeedback}
        </div>}
      {!checked ? <button type="button" onClick={() => selected !== null && setChecked(true)} disabled={selected === null} style={buttonStyle(selected === null)}>
          Check answer
        </button> : <button type="button" onClick={reset} style={buttonStyle(false)}>
          Try again
        </button>}
    </div>;
};

export const RelatedTopics = ({items}) => <div className="not-prose mt-12">
    <div className="text-sm font-medium text-gray-500 dark:text-zinc-400 mb-3">Related topics</div>
    <div className="flex flex-col gap-2.5">
      {items.map(([title, href]) => <a key={href} href={href} className="flex items-center gap-2.5 text-sm text-gray-700 hover:text-gray-950 dark:text-zinc-300 dark:hover:text-white">
          <Icon icon="file-text" size={16} color="currentColor" />
          {title}
        </a>)}
    </div>
  </div>;

**Part 2: Building your first agent · Lesson 2 of 4 · 15 minutes**

## Objective

Turn the template's prompt into Ananya's: a first message that greets the customer by name, and a script that confirms who she is speaking to, states the amount and due date, and asks when they will pay.

## The scenario

The template's prompt knows Acme Lending and the purpose of the call, but not how Ananya should open, what to do when Rahul says "call me later", or how to read out ₹4,500. For now the amount and date are written into the script; part 3 turns them into variables.

## Hands-on

<Frame caption="Editing and saving a prompt in the dashboard">
  <video alt="Editing and saving a prompt in the dashboard" aria-label="Editing and saving a prompt in the dashboard" controls muted playsInline className="w-full rounded-xl" style={{ aspectRatio: "16 / 10" }} preload="metadata" controlsList="nodownload noremoteplayback" poster="/media/agents-prompt/poster.webp">
    <source src="https://mintcdn.com/ringgai-0da73d20/zhzhS2waLZvF8qXk/media/agents-prompt/video.webm?fit=max&auto=format&n=zhzhS2waLZvF8qXk&q=85&s=40f18edd3d85e12ca46c137c4599d661" type="video/webm; codecs=&#x22;av01.0.09M.08&#x22;" data-path="media/agents-prompt/video.webm" />
  </video>
</Frame>

<Steps>
  <Step title="Open the Prompt section">
    Under **Assistants**, open **EMI reminder - Hindi**, then **Prompt**. The top editor is **First message**; below it is one editor per section the template supplied, typically **Objective**, **Conversation Script**, **FAQs** and a section such as Response Guidelines. Sections cannot be added or renamed.
  </Step>

  <Step title="Rewrite the first message">
    Replace it with a greeting the customer can interrupt, that names Ananya and asks a question within about ten seconds:

    `Hello @{{callee_name}}, this is Ananya from Acme Lending. Is this a good time to talk?`

    To insert the name, type `@` and pick **Callee Name** under **Custom Variables**; it becomes a chip. Keep **Interruptible** on, so a customer who starts talking is heard.
  </Step>

  <Step title="Set the objective">
    In **Objective**, say who Ananya is and the goal: a polite reminder assistant for Acme Lending who confirms the customer's identity, states the EMI, and gets a payment date.
  </Step>

  <Step title="Script the conversation">
    In **Conversation Script**, number the steps and say what to do on each answer:

    1. Confirm you are speaking to `@{{callee_name}}`. If it is the wrong person, apologise and end the call.
    2. State that the EMI of ₹4,500 is due on 15 October.
    3. Ask when they will pay. If they say "call me later", ask for a day and time and end the call.
    4. Once a date is confirmed, thank them and end the call.
  </Step>

  <Step title="Say how to speak">
    In the guidelines section, add length and number rules: "Reply in at most two short sentences. Ask one question at a time. Say amounts in words, in rupees: ₹4,500 is 'four thousand five hundred rupees'. Say dates as '15 October', never '15/10'."
  </Step>

  <Step title="Save">
    While you have unsaved edits, **Test assistant** in the top bar is replaced by **Discard** and **Save**. Click **Save**, or press Cmd+S (macOS) or Ctrl+S (Windows).
  </Step>
</Steps>

## Checkpoint

<Check>
  "Changes saved successfully" appears, **Test assistant** is back in the top bar, and no token in any section is red with a wavy underline.
</Check>

## Exercise

In **Conversation Script**, type `@{{calee_name}}` (one l) by hand. Expected result: the token turns red with a wavy underline, because the agent has no variable of that name. Replace it by typing `@` and picking **Callee Name**, so it becomes a chip, then save.

## What you learned

* The first message is heard, not read: greet, say who you are, and ask a question early.
* `@` inserts the agent's variables, tools and knowledge bases as chips; a red token is something the agent cannot fill.
* Edits are held until **Save**; **Test assistant** disappears until you save or discard.

<Quiz
  question="You type @{{customer_name}} by hand into the Conversation Script and it turns red with a wavy underline. What does that mean, and what fixes it?"
  answers={[
{ text: "The variable is too long; shorten the name", correct: false },
{ text: "The agent has no variable of that name; type @ and pick an existing one, or create it", correct: true },
{ text: "Hand-typed tokens are never allowed; delete it and use plain text", correct: false },
{ text: "The prompt has unsaved changes; click Save", correct: false },
]}
  correctFeedback="Right. A red token names something the agent cannot fill. The @ menu inserts only variables, tools and knowledge bases the agent has, so pick Callee Name from it, or create the variable, and the token becomes a chip."
  incorrectFeedback="Not quite. Red with a wavy underline means the agent has no variable of that name. Saving does not fix it, and hand-typed tokens are fine once they match a real variable: type @ and pick it, or create it."
/>

<RelatedTopics items={[["Write the prompt", "/documentation/build-agents/customize-agent-behaviour/agent-prompt"], ["Write prompts for voice", "/documentation/build-agents/customize-agent-behaviour/agent-prompt#write-prompts-for-voice"]]} />


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