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

# Challenge: Build Your First Agent

> Put it all together: design and build a working agent for a real task in your work.

export const Quiz = ({question, options, correctIndex, explanation}) => {
  const [selected, setSelected] = useState(null);
  const [showResult, setShowResult] = useState(false);
  const handleSelect = index => {
    if (showResult) return;
    setSelected(index);
    setShowResult(true);
  };
  const isCorrect = selected === correctIndex;
  return <div className="my-8 p-6 rounded-2xl border border-zinc-200 dark:border-zinc-700 bg-gradient-to-br from-zinc-50 to-white dark:from-zinc-900 dark:to-zinc-800 shadow-sm">
      <div className="flex items-center gap-3 mb-4">
        <div className="flex items-center justify-center w-10 h-10 rounded-xl bg-blue-100 dark:bg-blue-900/40">
          <span className="text-xl">📝</span>
        </div>
        <div className="flex flex-col">
          <p className="font-semibold text-zinc-800 dark:text-zinc-100 m-0">Knowledge Check</p>
          <p className="text-xs text-zinc-500 dark:text-zinc-400 mt-0.5 m-0">Select the best answer</p>
      </div>
      </div>
      
      <p className="text-zinc-700 dark:text-zinc-200 font-medium mb-5 text-lg leading-relaxed">{question}</p>
      
      <div className="space-y-3">
        {options.map((option, index) => {
    const isSelected = selected === index;
    const isCorrectOption = index === correctIndex;
    let optionStyles = "border-zinc-200 dark:border-zinc-600 hover:border-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20";
    if (showResult) {
      if (isCorrectOption) {
        optionStyles = "border-green-500 bg-green-50 dark:bg-green-900/30";
      } else if (isSelected && !isCorrectOption) {
        optionStyles = "border-red-500 bg-red-50 dark:bg-red-900/30";
      } else {
        optionStyles = "border-zinc-200 dark:border-zinc-700 opacity-60";
      }
    }
    return <button key={index} onClick={() => handleSelect(index)} disabled={showResult} className={`w-full text-left p-4 rounded-xl border-2 transition-all duration-200 ${optionStyles} ${!showResult && 'cursor-pointer'} ${showResult && 'cursor-default'}`}>
              <div className="flex items-start gap-3">
                <div className={`flex-shrink-0 w-6 h-6 rounded-full border-2 flex items-center justify-center text-xs font-bold ${showResult && isCorrectOption ? 'border-green-500 bg-green-500 text-white' : showResult && isSelected && !isCorrectOption ? 'border-red-500 bg-red-500 text-white' : 'border-zinc-300 dark:border-zinc-500 text-zinc-500 dark:text-zinc-400'}`}>
                  {showResult && isCorrectOption ? '✓' : showResult && isSelected ? '✗' : String.fromCharCode(65 + index)}
                </div>
                <span className="text-sm text-zinc-700 dark:text-zinc-200 leading-relaxed">{option}</span>
              </div>
            </button>;
  })}
      </div>
      
      {showResult && <div className={`mt-5 p-4 rounded-xl ${isCorrect ? 'bg-green-100 dark:bg-green-900/40 border border-green-200 dark:border-green-800' : 'bg-amber-100 dark:bg-amber-900/40 border border-amber-200 dark:border-amber-800'}`}>
          <div className="flex items-start gap-3">
            <span className="text-xl">{isCorrect ? '🎉' : '💡'}</span>
            <div className="flex flex-col">
              <p className={`text-sm font-semibold m-0 mb-1 ${isCorrect ? 'text-green-800 dark:text-green-200' : 'text-amber-800 dark:text-amber-200'}`}>
                {isCorrect ? 'Correct!' : 'Not quite right'}
              </p>
              <p className="text-sm text-zinc-600 dark:text-zinc-300 m-0 leading-relaxed">{explanation}</p>
          </div>
          </div>
        </div>}
    </div>;
};

<img src="https://mintcdn.com/pathfindr/vxED2dxssEHZg3yn/images/yourFirstTask.webp?fit=max&auto=format&n=vxED2dxssEHZg3yn&q=85&s=379e5b03f3d583aa01db481eaf623e67" alt="challenge build your first agent" noZoom={true} width="624" height="350" data-path="images/yourFirstTask.webp" />

## Your challenge this week

You have learned what makes an agent, how to design one, and how the build process works in Relay. Now it is time to do it yourself.

Your goal: <b>build one working agent in Relay with at least one skill that runs on a trigger.</b>

This is not a hypothetical exercise. By the end, you should have an agent that can run a test workflow and produce a real output (an email, a document, a report) that you can review and improve.

***

<AccordionGroup>
  <Accordion title="Challenge 1: Pick Your Task" icon="magnifying-glass">
    Choose a task from your actual work that fits the agent criteria. It should be:

    <CardGroup cols={4}>
      <Card title="Repeatable" icon="arrows-rotate">
        Something you do regularly: weekly, daily, or every time a specific event happens
      </Card>

      <Card title="Definable" icon="list-check">
        Something you can describe in clear steps with a specific trigger and output
      </Card>

      <Card title="Low risk to start" icon="shield-check">
        Something where a mistake does not cause real damage. You can add higher-stakes tasks later
      </Card>

      <Card title="Clear output" icon="bullseye">
        Something with a tangible deliverable (an email, a report, a filed document) that you can review
      </Card>
    </CardGroup>

    Not sure where to start? Here are some ideas based on what your cohort discussed in the session:

    <b>Competitive analysis report:</b> Scan competitor LinkedIn profiles and company pages for recent activity. Summarise product updates, customer wins, and key messaging themes into a report. Email it to yourself every Monday at 8am. Connect LinkedIn and Gmail.

    <b>Meeting preparation briefing:</b> Research upcoming meeting attendees, pull related documents and recent email threads, and compile a one-page briefing. Trigger it 24 hours before each meeting in your calendar. Connect Google Calendar, Gmail, and Google Drive.

    <b>Weekly project status digest:</b> Pull updates from email threads, Slack channels, and project tools. Compile a summary of where things stand across active projects. Run it every Friday at 3pm. Connect Slack, Gmail, and your project management tool.

    <b>Document filing and organisation:</b> When a signed contract arrives from DocuSign, automatically file it in the correct Google Drive folder and rename it to match your naming convention. Trigger it when an email from DocuSign with "Completed" in the subject lands in your inbox. Connect Gmail and Google Drive.
  </Accordion>

  <Accordion title="Challenge 2: Write Your Agent Job Description" icon="pen-to-square">
    Before you open Relay, write down:

    <b>Job title:</b> What would you call this role?

    <b>Purpose:</b> One sentence on what this agent does and why.

    <b>Responsibility (What / When / How):</b>

    |                    | Your agent                                                                         |
    | ------------------ | ---------------------------------------------------------------------------------- |
    | <b>What</b>        | What does it deliver? What does the output look like?                              |
    | <b>When</b>        | What triggers it? A schedule? An event?                                            |
    | <b>How</b>         | What tools does it use? What steps does it follow?                                 |
    | <b>Who reviews</b> | Who checks the output before it goes live? What level of oversight does this need? |

    <b>Tools needed:</b> Which apps will you connect? (Gmail, Google Drive, LinkedIn, Slack, Google Calendar, etc.)

    <Tip title="Use your Pathfindr training account">
      You have a training account with Gmail and Google Drive access. Use this to connect your agent's tools. You can build and test without touching your corporate systems, then replicate the setup with your work accounts when you are ready.
    </Tip>
  </Accordion>

  <Accordion title="Challenge 3: Build It in Relay" icon="hammer">
    Open [Relay](https://www.relay.app) and follow this sequence:

    <Steps>
      <Step title="Create a new agent">
        Give it the job title and description from your job description above. Select the tools it needs from the connection menu.
      </Step>

      <Step title="Add your first skill">
        Pick from the suggestions or write your own prompt. Be specific: include the what, when, and how. If Relay asks clarification questions, give it the most detailed answers you can.
      </Step>

      <Step title="Review the flowchart">
        Check the generated flowchart. Does the trigger look right? Are the steps in the correct order? Does the output go where you want it?
      </Step>

      <Step title="Run a test">
        Hit Test Workflow and let it run. Review the output.
      </Step>

      <Step title="Give feedback and test again">
        Tell the agent what to improve. Be specific: what was missing, what was too long, what format you prefer. Test again after it updates.
      </Step>
    </Steps>
  </Accordion>

  <Accordion title="Challenge 4: Reflect and Refine" icon="rotate">
    After your first test cycle, ask yourself:

    <b>Did the output match what you expected?</b> If not, was the issue in your brief or in the agent's execution?

    <b>What feedback did you give?</b> Was it specific enough to produce a better result?

    <b>Would you trust this to run automatically?</b> If not, what would need to change before you would?

    <b>What is the next skill you would add to this agent?</b> Think about what other responsibilities could sit under the same role.
  </Accordion>

  <Accordion title="Challenge 5: Stretch Goal" icon="rocket">
    If your first agent is running well and you have time, try one of these:

    <b>Add a second skill</b> to the same agent. Give it another responsibility that uses the same tools but runs on a different trigger or schedule.

    <b>Add a human-in-the-loop step.</b> Insert a review point in the workflow where the agent pauses and waits for your approval before taking the final action (sending an email, filing a document).

    <b>Share your agent design</b> with a colleague. Walk them through the job description and the flowchart. See if they can understand what the agent does without you explaining it. That is the test of a well-designed brief.

    <Info title="This is the start, not the finish">
      As shared in the live session, building the first flowchart is about 10 percent of the work. The real value comes from testing, refining, and expanding over time. Treat this as the foundation of an agent you will keep improving, not a one-off exercise.
    </Info>
  </Accordion>
</AccordionGroup>
