Step 2: Create an agent with a simple ability
Customize your AI agent with a PDF generation ability
Agent Studio is the quickest way to start building a custom AI agent. In this tutorial, you'll build on the skills you developed in step 1 of this series by creating a new agent with a PDF generation ability.
What you'll build
- An AI agent that generates business summary or status report PDFs.
What you'll need
- This tutorial builds on the skills developed in step 1 of this series, where you create your first AI agent. If you haven't completed this tutorial, please do so before continuing.
- A Squid account in the Squid Console
Create a New Agent
-
In the Squid Console, navigate to the Agent Studio tab.
-
Click Create New Agent to add an agent. A window will appear asking for an Agent ID and description.
- Agent ID:
pdf-agent
. - Description:
This is an agent for Squid AI's PDF tutorial
- Agent ID:
-
Click Create to create the agent.
After creating the agent, you will be redirected to the Overview tab of your new agent.
Give the Agent Instructions
Providing the agent with custom instructions will give it a unique persona. Because this is a business summary agent that will generate PDF reports, provide instructions that guide the agent to respond in a professional manner and focus on summarizing information effectively:
Your task is to generate a PDF that contains a business summary for a specified company.
Use both your general knowledge and any additional information given by the user to create this summary.
Use a professional tone in your reports and interactions with the user.
The PDF Generation Ability
Squid AI provides a built-in ability to generate PDFs, createPdfFromHtml
. To add this ability to your agent, follow these steps:
- In the Overview tab of your agent, click on the Add Abilities button.
- Scroll to the AI Functions section of the sidebar
- Hover on the
createPdfFromHtml
function and click the + to add it to your agent.
By following those easy steps, your agent can now generate PDFs!
Test Your Agent
After adding the PDF ability, navigate to the Test Agent tab of the agent. This tab allows you to interact with your agent and see how it responds to user input.
Test the agent by asking to generate a PDF:
Generate a summary for Google.
Create a report on Walmart. Include information about the company's history, future outlook, and the current CEO.
These two prompts will trigger the agent to generate a PDF report for each company. The agent will use its instructions to create a professional summary and then generate a PDF using the createPdfFromHtml
ability. The agent will respond with a link to download the generated PDF.
Additional Instructions
So far you have built an agent that can generate basic reports. However, there is much more you can do to customize the agent's behavior.
One idea would be to go back to the Overview tab to add additional instructions to the agent so that it always includes specific sections in the report:
Always include the following sections in the business summary:
- Company Overview
- Financial Performance
- Future Outlook
- Leadership Team
You can also provide additional instructions to customize the PDF's formatting:
Add 32px of margin around the PDF.
Use H2 headings for each section.
Set the font size to 12pt.
Make sure to test the agent after adding these instructions to see how it affects the generated PDF reports.
Next Steps
Congratulations! You've successfully created an AI agent for creating PDF reports. You now have a basic understanding of how to create and customize a helpful agent.
-
Continue with the next tutorial in the Agent Studio onboarding series: Coming soon...
-
Want to build a highly customized AI agent workflow? Build with Squid's SDKs to create a custom agent, or check out an AI tutorial for a hands-on learning experience. For technical developers only.
-
Have a question? Please reach out to us! We are happy to help you get started.