To create an AI agent on Gemini as a custom assistant, you can start with a Gem: define its task, write instructions for handling it, add documents, then test before saving. This guide is for anyone who wants to standardize tasks such as summarizing documents, drafting content or assisting with programming without starting with code.
Be clear about the scope: the process below explains how to configure a Gem, not how to set up a system that independently calls APIs or performs tasks across multiple applications. The guide describes six steps for creating a Gem, but does not include steps for granting tool permissions or configuring an execution mechanism to demonstrate those automation capabilities.
1. Choose a task before opening Gemini
Do not start by asking for “an assistant that does everything.” Define the input and the results you need. According to the recommendations for preparing a Gem, the three elements to clarify are the primary task, scope of knowledge and response style.
The example used throughout this guide is a document-summarizing Gem for an internal team. Before configuring it, define the following:
Users: staff who need to quickly understand a document's contents.
Task: summarize and extract key points.
Source: documents provided by the user.
Output: a brief overview paragraph and a list of key points.
Limits: do not independently fill in information missing from the document.
This scenario illustrates how to design instructions; it is not a guarantee that every response will be accurate. The more specific the task, the easier it is to check the results during testing.
2. Create a Gem and name it after its function
Sign in to Gemini on the web, open Explore Gems or Gem manager, then select New Gem.
Choose a name tied to the task, such as “Document Summarization Assistant,” rather than something too generic like “My AI.” Naming Gems by function helps you distinguish between them when you have several.
The next steps focus on instructions and reference data. This guide does not specify a subscription plan requirement because that information has not been verified against the provided source.
3. Write instructions as a task specification
The instructions need to define whom the Gem serves, what it is allowed to do and how it must present its results. The source guide to writing instructions recommends specifying the role, audience, scope, language, response structure and how to handle missing data.
You can organize them into six sections:
Role: the type of assistant and its target users.
Tasks: the work to be performed.
Content sources: the documents or context to prioritize.
Limits: content that must not be inferred or invented.
Format: the structure and level of detail of the output.
Missing information: when to ask follow-up questions or explicitly state assumptions.
Template for a document-summarizing Gem
The template below was developed for this article based on the principles in the source; it is not an official Google template:
You are a document summarization assistant for internal staff. Your task is to condense content and list the key points from documents provided by the user. Prioritize the document's content; do not independently add facts or infer sensitive information. Respond in Vietnamese with a brief overview paragraph and a bulleted list of key points. If no document has been provided or the request is unclear, ask the user to supply what is missing before continuing.
Avoid instructions that are difficult to test, such as “always give excellent answers.” Instead, clearly specify the structure and limits so you have a basis for evaluating responses.
4. Add documents and examples with a clear purpose
During setup, you can add examples of desired questions and answers, along with documents such as PDFs, text or images.
These two types of data serve different purposes:
Reference documents provide content and context for the work.
Question-and-answer examples demonstrate the desired structure, tone and level of detail.
For a summarizing Gem, use a relevant document together with a sample summary you have evaluated. Also make it clear in the instructions that the Gem must stick to the document. Adding files does not replace rules about content sources and limits on inference.
5. Test both typical requests and exceptions
Do not judge it solely on one answer that seems reasonable. The guide recommends testing in preview, comparing the results with your expectations, revising the instructions and testing again.
Based on the rules you have written, you can develop three groups of tests:
On-task: submit a document and ask for a summary; check the key points, level of detail and format.
Missing data: ask for a summary without providing a document; check whether the Gem asks you to supply one.
Out of scope: ask it to add facts that are not in the document; check whether the response respects the source limits.
If the result is too long, clarify the level of detail. If the answer adds information that was not provided, revise the rules about sources and inference. If the structure is inconsistent, add output examples. Each revision should address one clear issue so its effect is easier to evaluate.
6. Save and maintain the configuration based on actual needs
According to the guide to saving and editing Gems, after you click Save, the Gem appears in Your Gems. You can return to Gem manager to edit its name, instructions and configuration without having to recreate it.
Before using it regularly, check the following:
Are the role and task specific enough?
Have the preferred content sources been clearly stated?
Do the rules for handling missing data work during testing?
Does the output follow the required structure and stick to the document?
Have the identified errors been corrected and retested?
If your needs differ significantly, consider creating separate Gems for different tasks, such as summarizing documents and assisting with code. For internal tools used in an organization, the perspective on employees building their own AI applications and the governance challenge is also relevant when considering data and access permissions.
Completion means not just saving the Gem, but having a configuration tested with real requests. If the goal shifts to calling APIs or updating systems, treat that as a separate integration problem, not a capability automatically available after these setup steps.
Frequently asked questions
Do you need programming skills to create a Gem?
Not necessarily. You can create a Gem using instructions written in natural language. Programming knowledge is useful when your needs expand to integrating internal systems or custom APIs.
What tasks can you choose for a Gem besides document summarization?
The source suggests categories of work such as programming assistance and debugging, brainstorming content ideas, drafting emails and planning. For each category, define its task scope and output structure separately so you can test it.
