Building Your First Agent with Custom GPTs
You build a working agent as a Custom GPT with instructions, knowledge and actions.
Why this lesson matters
You can read about agents endlessly, but you only really learn it by building one. Custom GPTs from OpenAI are the easiest way to make your first agent: no code, no server, no technical setup. Within 30 minutes you have a working agent.
In this lesson you build, step by step, an FAQ agent for your organisation: an agent that answers questions based on your documents and can even carry out actions through API connections.
Step 1: Create a Custom GPT
- 1Go to [chat.openai.com](https://chat.openai.com)
- 2Click your profile picture → My GPTs → Create a GPT
- 3You land in the GPT Builder. Choose Configure (not Create, because we want to set things up by hand)
You need a ChatGPT Plus or Team subscription to create Custom GPTs. Plus costs $20/month.
Step 2: Write the instructions (system prompt)
This is the most important part. Your instructions determine how your agent behaves. Here's a template:
You are the customer service assistant of [Company name].
Your role:
- Answer customer questions based on the
knowledge base provided
- Use a friendly, professional tone
- Always answer in Dutch
Rules:
- ONLY give answers you can back up with
documents from your knowledge base
- If you don't know the answer, say: "I'll pass you
on to a colleague who can help you further."
- NEVER make up information
- Always name the source (which document) with your answer
Style:
- Short and to the point (max 3 paragraphs)
- Use bullet points when there are several points
- Start with the direct answer, then give contextSpend at least 50% of your build time on the instructions. Poor instructions = unreliable agent. Test your instructions with edge cases: what if someone asks a question that isn't in the documents? What if someone asks in English?
Step 3: Upload the Knowledge Base
Keep reading
Leave your name and email address and you can read the rest
You get the whole lesson right away, and every other lesson stays open after that. No password, no confirmation email.
Under Knowledge in the Configure tab you upload files:
- PDFs of manuals
- Word documents with FAQs
- Excel files with product information
- Text files with company rules
| File type | Works well for | Watch out |
|---|---|---|
| Manuals, brochures | Make sure the text is selectable (no scans) | |
| Word/DOCX | FAQ lists, procedures | Use headings for structure |
| Excel/CSV | Product lists, prices | Keep the columns clearly named |
| TXT | Rules, templates | Simple but effective |
Structure in your documents = better answers. Use clear headings, bullet lists and tables. An FAQ document in the "Question: ... Answer: ..." format works very well.
Step 4: Add Actions (optional)
Actions are API connections that let your agent do things, beyond just giving answers.
Examples of Actions:
- Create a support ticket in Zendesk
- Schedule an appointment in Calendly
- Look up an order in your order system
- Send an email through your mail server
You add an Action through the Actions section in Configure:
1. Click "Create new action"
2. Paste your OpenAPI schema (this describes the API)
3. Add authentication (API key or OAuth)
4. Test the action in the previewStep 5: Test and iterate
Now the real work starts. Test your agent thoroughly:
- 1Happy path: Ask questions whose answer is in your documents
- 2Edge cases: Ask questions that are just outside the documents
- 3Abuse: Try to make the agent step out of its role ("Pretend you're a pirate")
- 4Language test: Ask in English when the agent should answer in Dutch
- 5Failure scenarios: What happens when an Action fails?
Adjust your instructions based on what you find. This is an iterative process.
Start simple: only a Knowledge Base, no Actions. Make sure the answers are right. Only then add Actions. Every layer you add makes the agent more complex, and so harder to debug.
Example: FAQ agent for your organisation
Say you're building an FAQ agent for a web shop:
| Component | Content |
|---|---|
| Instructions | Customer service assistant, friendly, Dutch |
| Knowledge Base | Returns-policy.pdf, FAQ.docx, Product-catalogue.xlsx |
| Action 1 | Look up order status through the shop API |
| Action 2 | Generate a return label through the shipping API |
Result: customers ask questions in the Custom GPT, get answers from your documents, and can check their order status or start a return straight away.
What is the most important part of building a Custom GPT agent?
What is the best strategy when building your first agent?
What should your agent do when it doesn't know the answer?
Want to keep your progress, get the practice files and sign up for the free evening? Create a free account. All you do is click a link in your email.
Create a free account