Productos AI

Create your first agent

From an idea to a saved version, step by step and by chatting.

This guide builds a support agent for an online store. You can ask the chatbot for all of it in one message, but going step by step lets you review each part.

How an agent works#

Three ideas before you start:

  • The draft is the configuration you're editing. Your customers don't see it.
  • Saving a version freezes the draft. Versions never change.
  • Publishing chooses which version serves your customers, on every channel.

1. Write the instructions#

"Create instructions called 'Store support'. The agent serves customers of a clothing store in Colombia, answers in Spanish in a friendly tone, asks for the order number before giving shipping information, and never promises refunds: it refers them to support@mystore.com."

The chatbot uses create_instruction_set and creates version 1. If you want to change something later, ask, and it's saved as version 2 without losing the previous one.

Tip

Good instructions say who the agent is, whom it serves, which tone it uses, and what it must never do. Ask the chatbot to propose a structure before writing them.

2. Create the agent#

"Create an agent called 'Store support' and give it those instructions."

The chatbot creates the agent (create_agent) and points its draft at the instructions (update_agent_draft). If your plan already reached its agent limit, it will tell you.

3. Tune the configuration#

Some examples of what you can ask:

  • "Use a cheaper model." The chatbot checks list_models and suggests options.
  • "Make it remember what each customer told it during the conversation."
  • "Limit each answer to 20 steps and 2 minutes."
  • "Make it aware of the time in Bogotá."

Each change touches only what you asked for: the rest of the draft stays the same.

4. Validate and save a version#

"Validate the draft and, if there are no errors, save a version."

validate_agent_draft checks that everything the agent uses exists and that your plan allows it. Errors block saving; warnings don't. Then save_agent_version creates version 1.

Note

If you ask to save without changing anything, the chatbot will tell you: identical versions aren't created.

5. Review before publishing#

"Show me the final prompt of version 1 and how much context it takes."

With get_system_prompt and get_context_usage you see exactly what the model receives and how much room is left for the conversation.

Next step#

Before publishing, test it with quality cases.