# How to Build an AI Agent with Gemini

- Tool: Gemini
- Difficulty: Beginner
- Time required: 20-30 min
- Compatibility: Gemini app (personal or Google Workspace), Connected Apps enabled for Gmail/Drive, browser or mobile app, no API key
- Last updated: November 2026

## TL;DR

Skills are the current no-code way to build a repeatable agent inside the Gemini app, replacing Gems, which are being retired through 2026 and 2027. This guide builds a renewal-prep agent: typing /renewal-prep and an account name pulls recent Gmail threads and Drive notes through Connected Apps and drafts a risk score and talking points, draft only, nothing sent. No code, 20-30 minutes, any Gemini app plan with Connected Apps enabled.

## What you'll build

You'll build a renewal-prep agent for an account manager. Before a renewal call, typing /renewal-prep and the account name pulls that customer's recent Gmail threads and the account notes stored in Drive, and drafts a risk score (low, medium, high) with three talking points for the call. It never drafts or sends an email itself; the output is for the account manager to read before picking up the phone.

In the Gemini app, this is a Skill, the feature replacing the older Gems. You create one from Customize > Skills in the sidebar, either by describing it to Gemini in chat, starting from a template, writing it manually, or uploading a SKILL.md file. A Skill's instructions tell Gemini when to apply it and what to do, and it can use Connected Apps, Gmail, Calendar, Drive, and others, as tools to pull real data instead of relying on what's already in the conversation. Once saved, you invoke it with a slash command and the account name, instead of re-explaining the task every time.

If you already built custom Gems, start migrating now: Gems go read-only for personal accounts on November 17, 2026 and are removed entirely on December 17, 2026, with Workspace accounts on a later timeline. Choose Skills over Gemini Enterprise Agent Platform's Agent Studio when the people using this are the same people chatting in Gemini day to day and the task is a repeatable prompt with a couple of data sources, not a multi-tool production workflow.

## Before you start

- A Gemini app account, personal or Google Workspace
- Gmail and Drive connected under Connected Apps in Gemini's settings
- An account renewal playbook or notes template as a file to attach
- No API key and no code required

## Step-by-step guide

### 1. Confirm Connected Apps are enabled

Before building the Skill, check that Gmail and Drive show as connected in Gemini's settings; a Skill can only use the apps your account has already connected. If you've never connected them, do it here first, since adding the Skill won't prompt you to connect anything mid-conversation.

```
Gemini settings -> Connected apps
Gmail: Connected
Drive: Connected
Calendar: Connected (optional, for scheduling context)
```

**Expected result:** Gmail and Drive both show as Connected in the Connected apps list.

### 2. Open Skills and start a new one

In the sidebar, click More if Customize isn't already visible, then open Customize > Skills > Create. Choose Create manually rather than a template, since this Skill's instructions are specific enough that starting blank is faster than editing a generic template down to size.

```
Sidebar -> More -> Customize -> Skills -> Create -> Create manually
```

**Expected result:** A blank Skill editor opens with fields for name, description, and instructions.

### 3. Name it and write the instructions

Give it a lowercase, hyphenated name, since that's what you'll type after the slash to invoke it. The description is what Gemini reads to decide when to apply the Skill automatically; the instructions are the actual task. State the no-send rule explicitly, the same boundary this series uses everywhere an agent touches a real communication channel.

```
Name: renewal-prep
Description: Use when preparing for a customer renewal call. Pulls recent email and notes and drafts talking points.
Instructions:
"Given an account name, search recent Gmail threads with that customer and any Drive notes about their account. Draft a risk score (low/medium/high) and 3 talking points for the renewal call. Never draft or send an email; this is for the account manager to read before the call."
```

**Expected result:** The Skill saves with its name, description, and instructions visible in the Skills manager.

### 4. Attach the renewal playbook as a file

Add your renewal playbook or scoring criteria as a file, either uploaded from your device or pulled in from Drive. This gives the Skill a consistent scoring standard to apply instead of inventing its own risk criteria differently on every account.

```
Skill editor -> Add files -> From Drive
renewal-risk-playbook.pdf
```

**Expected result:** renewal-risk-playbook.pdf appears attached to the Skill, under the 100MB total file cap.

### 5. Test it with a real account name

In a regular chat, invoke the Skill with the slash command and a real customer name, and check the draft against what you actually know about that account. Confirm two things: that it actually pulled real Gmail and Drive content rather than generalizing, and that it never drafted anything resembling an outgoing email.

```
In chat:
/renewal-prep Acme Corp
```

**Expected result:** A risk score and 3 specific talking points referencing real recent emails or notes about Acme Corp, with no drafted email in the response.

### 6. Refine the instructions based on what it got wrong

If the first test pulled stale email threads or missed a relevant Drive note, tighten the instructions rather than accepting a rough first pass. A common fix is being explicit about recency, like 'only consider emails from the last 90 days,' since without that the model may weigh an old thread as heavily as a current one.

```
Instructions addition:
"Only consider Gmail threads from the last 90 days. If no recent thread exists, say so instead of relying on older history."
```

**Expected result:** A re-run on the same test account reflects only recent activity, and explicitly flags accounts with no recent contact.

## Complete code example

File: `renewal-prep/skill.md`

```yaml
---
name: renewal-prep
description: Use when preparing for a customer renewal call. Pulls recent Gmail threads and Drive notes for the named account and drafts a risk score and talking points. Never drafts or sends an email.
---

# Renewal Prep

Apply this skill when asked to prepare for a renewal call, given an account
name.

## What to do

1. Search Gmail for threads involving the named account from the last 90
   days. If none exist, say so explicitly instead of relying on older
   history.
2. Search Drive for any notes document referencing the account.
3. Compare what you find against the attached renewal-risk-playbook.pdf
   scoring criteria.
4. Draft:
   - A risk score: low, medium, or high.
   - Exactly 3 talking points for the call, each one sentence.
   - One open question worth asking the customer directly.

## Rules

- Never draft or send an email. This output is for the account manager to
  read before their call, not to send anywhere.
- If Gmail or Drive access fails or returns nothing, say so in the output
  instead of guessing at the account's status.
- Keep the whole output under 150 words. This is call prep, not a report.
- Cite which email or note each talking point is based on, briefly, so the
  account manager can verify it before the call.
```

## Common mistakes

- **Building this as a Gem instead of a Skill in late 2026** — undefined Fix: Gems are being retired: read-only for personal accounts from November 17, 2026 and removed December 17, 2026. Build new agents as Skills; migrate existing Gems before the deadline for your account type.
- **Writing the instructions without an explicit 90-day (or similar) recency rule** — undefined Fix: Without a stated window, the model may treat a stale email thread from a year ago as equally relevant to a conversation from last week. State the window explicitly.
- **Assuming the Skill can draft and send a follow-up email since Gmail is connected** — undefined Fix: A Connected App gives the Skill access to data, not permission to act on your behalf by default. State 'never send' explicitly in the instructions rather than assuming the absence of that instruction is enough.
- **Skipping the Connected Apps check and wondering why the Skill returns generic advice** — undefined Fix: If Gmail or Drive aren't connected, the Skill has nothing real to pull from and will fall back to generic reasoning that looks plausible but isn't grounded in the actual account.
- **Expecting this Skill to work inside Canvas, Deep Research, or a scheduled task** — undefined Fix: As of late 2026, Skills work with Connected Apps and Workspace apps but not yet with Canvas, Deep Research, video/music creation, or Guided Learning. Invoke it directly in regular chat.

## Best practices

- State explicit boundaries ('never send,' 'draft only') in every Skill that touches a real communication channel, even when the action it could take isn't the one you asked for.
- Give the Skill a concrete recency or scope rule (last 90 days, this account only) instead of leaving it to infer what counts as relevant.
- Attach one focused reference file per Skill (a playbook, a rubric) rather than a folder of loosely related documents.
- Test a Skill with a real, specific input (an actual account name) before trusting its output on one you haven't manually checked.
- Keep each Skill scoped to one repeatable task; a Skill that tries to also schedule meetings and summarize contracts is harder to get consistently right.
- Revisit any existing Gems now and plan their migration to Skills ahead of the retirement dates for your account type.

## Use cases

### undefined



### undefined



### undefined



## Frequently asked questions

### Are Gems still a good way to build an AI agent in Gemini?

Not for new builds. Gems are being retired: read-only for personal accounts from November 17, 2026 and fully removed December 17, 2026, with Workspace accounts following on a later timeline. Build new agents as Skills, covered in this guide.

### Do I need to write a SKILL.md file to build a Skill in Gemini?

No. You can create one manually through the Skills editor's form fields, start from a template, or just ask Gemini in chat to create a skill for you. Uploading a SKILL.md file, shown in complete_code, is one option among several, useful when you want to version or share it.

### Can a Skill actually send an email or create a calendar event on its own?

A Skill can use Connected Apps to read data like Gmail and Drive, but whether it acts on your behalf depends entirely on what you instruct it to do. This guide's renewal-prep skill is deliberately read-only; state 'never send' explicitly if a skill of yours touches a channel where sending would matter.

### Why doesn't my Skill work inside Deep Research or Canvas?

As of late 2026, Skills are supported with Connected Apps and Workspace apps but not yet with Canvas, Deep Research, video or music creation, or Guided Learning. Invoke the Skill directly in a regular chat instead.

### Is the autonomous 'Gemini agent' announced in October 2026 the same thing as a Skill?

No. That's a separate Google Cloud and Gemini Enterprise feature for multi-step, multi-day work with its own sub-agents, still in private preview as of this writing. A Skill is a much simpler, static set of instructions you invoke directly in the consumer Gemini app.

### How much does this cost to run?

Skills themselves don't add a separate charge; you're using whatever Gemini app plan you already have. Google Workspace or Gemini subscription pricing applies the same way it would to any other chat.

### Can someone build this for me instead of setting it up myself?

Yes. RapidDev builds production agents on Gemini, Claude, and Vertex AI Agent Builder, including the data-connection and boundary-setting work most tutorials skip. A free 30-minute consultation is the fastest way to scope your version.

---

Source: https://www.rapidevelopers.com/build-ai-agent/how-to-build-an-ai-agent-with-gemini
© RapidDev — https://www.rapidevelopers.com/build-ai-agent/how-to-build-an-ai-agent-with-gemini
