Back to Blog
TutorialMarch 3, 20268 min read

How to Build Your First AI Agent in 10 Minutes

AI agent visualization

AI agents are the next evolution beyond workflows. Where a workflow follows a fixed path — trigger, action, action — an agent reasons. It decides which tools to call, in what order, and adapts based on what it finds. This tutorial walks you through building one in A91I from scratch.

What We're Building

A customer support agent that monitors your Gmail inbox, identifies urgent support requests, looks up the customer in HubSpot, and posts a summary to your Slack support channel — all autonomously, without you touching a thing.

By the end of this tutorial, you'll have a fully functional agent that runs on demand (or on a schedule) and handles this entire flow without a single hardcoded rule.

Step 1: Open Agent Studio

From your A91I dashboard, navigate to Agents in the sidebar and click New Agent. You'll land in Agent Studio — a chat interface where you configure and interact with your agent.

Give your agent a name (e.g., “Support Triage Agent”) and choose a base model. For tasks that require reasoning across multiple steps, we recommend Claude Sonnet 4.6 — it strikes the right balance between speed and intelligence. For complex multi-tool orchestration, use Claude Opus 4.6.

Step 2: Write a Clear System Prompt

The system prompt is your agent's instruction manual. It defines the agent's role, how it should behave, and what it should prioritize. Here's a template that works well for support triage:

You are a customer support triage agent for [Company Name].


Your job:

1. Search Gmail for unread emails in the support inbox

2. Identify urgent issues (billing, account access, API errors)

3. Look up each customer in HubSpot to get their account tier

4. Post a formatted summary to #support-alerts in Slack


Prioritize: Enterprise customers > high MRR accounts > all others.

Be concise. Include customer name, issue type, account tier, and urgency level.

Good system prompts are specific about what to do, how to prioritize, and what the output should look like. Vague prompts produce vague results.

Step 3: Connect Your Tools

Under Tools, enable the integrations your agent needs. For this tutorial: Gmail, HubSpot, and Slack. Each integration requires a connected account — if you haven't added credentials yet, click the connection icon next to each tool to authenticate via OAuth.

A91I uses the Model Context Protocol (MCP), which means each integration exposes a set of structured tools to the agent. For Gmail, that includes search_emails, get_email, and send_email. The agent selects which tool to call based on what the task requires.

Step 4: Enable Long-Term Memory (Optional)

Toggle Long-term memory on if you want the agent to remember context across sessions. This is useful for support triage — the agent can recall that a customer was flagged as high-risk last week, or that a particular issue was already escalated.

A91I stores memory as vector embeddings using pgvector, which means the agent can retrieve semantically relevant past interactions — not just exact matches.

Step 5: Test It

Click Save, then start a new conversation thread. Type:

“Check the support inbox now and give me a summary of anything urgent.”

Watch the agent work in real time. You'll see each tool call appear as it executes — Gmail search, HubSpot lookup, Slack post — with the inputs and outputs visible at every step. If something goes wrong, you can see exactly where and why.

Step 6: Schedule It

Agents don't have to wait for manual triggers. From the agent settings, enable a Scheduled run — for example, every 30 minutes during business hours. A91I will automatically invoke the agent and post results to Slack without any human intervention.

You can also integrate agents into workflows as nodes. This lets you chain agent output into downstream actions — for instance, using an agent to classify a ticket and then automatically routing it to the right Jira board.

What's Next

You've built a functional AI agent in under 10 minutes. From here, you can:

  • Add human-in-the-loop approval for escalated tickets
  • Connect additional tools (Stripe for billing, Jira for ticket creation)
  • Build a supervisor agent that delegates to specialist sub-agents
  • Use agent templates to start faster on common use cases

Start building at app.a91i.com — free tier included, no credit card required.