Skip to main content
A skill is an action the agent can take in the middle of a conversation: record a qualification answer, book an appointment, notify the team, stop contact or call your own system. On each reply, the AI decides whether to use one, from the conversation and the skill’s description, and writes the values it sends. Skills are set up in the dashboard, in the agent’s settings. The API reads agents but does not configure them, so it never turns a skill on or changes it. What it gives you is what skills produce: webhook events, the lead’s variables and qualification, and a trace of each run in the conversation.
To copy leads into your CRM, use webhooks, as in Sync leads to a CRM: they are signed and retried. Use an advanced skill only when the agent needs an answer from your system before it replies, such as stock, a price or a free slot. Its requests are not signed or retried, and the AI writes the values in them.

The skills

Team notifications and web search are on in every text agent, and Do not contact is on until the customer turns it off in Finish conversation. The rest are switched on per agent.

In calls

A voice agent has its own skills: it can end the call, check and book in Google Calendar, notify the team, search properties, mark the caller as Do not contact and call advanced skills. It does not qualify leads or close conversations, and it does not move or cancel appointments. Lead events fire for a call only when the call’s lead belongs to a text agent, as in a web call from a text agent’s widget: they go to that agent’s endpoints. A lead of a voice agent with no text agent has text_agent_id: null.

In test conversations

In Test your agent, notices to the team and calendar writes are simulated, and no webhook event fires. Advanced skills are the exception: they call your URL for real, from Test your agent and from the agent’s demo link, and nothing in the request marks it as a test.

How the agent gets the data

The AI writes every value a skill sends. On each reply it has: In a call, the voice agent has the caller’s number, the lead’s name, summary and variables, and the recent messages of the lead’s chat.

Variables

variables is the same object in GET /v1/leads/{lead_id} and in the lead object of every event. Each value comes from one of these: A variable called caller_name, lead_name, contact_name, name or nombre sets the lead’s name if it has none. email on the lead is the first valid address among the variables email, correo, correo_electronico, e_mail and mail.

Custom fields

The customer declares, in the agent’s Custom fields, the data the AI looks for in its conversations. GET /v1/text_agents/{text_agent_id}/lead_fields lists them:
  • key is the key in variables. description is what the AI looks for: a field without one is never filled by the AI. category is data for an attribute of the lead and tag for a label used to filter.
  • In a chat on WhatsApp, Instagram or the web chat, the AI reads the messages written since its last pass, about 5 minutes after the lead’s last message. It does so even while the AI is paused.
  • In a call, it reads the whole transcript once the call ends. call.analyzed carries what it found, with a confidence for each value.
  • It keeps a value only when its confidence is 0.75 or more. A new value replaces the old one, and a field the lead does not mention again keeps its value. A correction the team makes by hand stays until the lead says something new.
  • It does not run when the agent is switched off, the account is stopped or the wallet has no balance.
  • It does not read the email that brought a lead in or a Lead Ads form: their data is stored as it came. Test leads are not read either.
No event fires when the AI fills a custom field in a chat. The value arrives with the next event that carries the lead, or read it with GET /v1/leads/{lead_id}. A lead.handoff sent right after a message can come before the fields of that message.

Qualification answers

GET /v1/text_agents/{text_agent_id}/qualification returns the agent’s questions in the order it asks them. Each answer lands in qualification.answers, not in variables, with the question_id of its question.
  • The agent records an answer as soon as the lead gives one it is confident about, 0.75 or more. If the answer is vague, it asks again.
  • The value must fit the question: true or false, a number, a date such as 2026-12-02, the value of one of the choices, or text. Otherwise the answer is rejected and the agent asks again.
  • A question can be answered in advance from the lead’s phone or from one of its variables, such as a form field. The agent then does not ask it.
  • value is null when the lead declined to answer.

What each skill sends

The events below are described in full in Webhook events. Here, for each skill: when the agent uses it, what it fills in and where each value comes from.

Qualification

The agent asks the questions in Qualification questions and records each answer. Every lead event carries the result:
What fires:
  • lead.qualified when status becomes completed.
  • lead.handoff with reason: qualified at the same moment, unless the agent does not notify the team about qualified leads.
  • lead.handoff with reason: disqualified when an answer disqualifies the lead, and with qualification_declined when the lead refuses a required question twice.

Google Calendar

The agent offers free slots from the connected calendar, the lead picks one, and the agent books it. The calendar is checked again before booking, so a busy slot is never booked. The appointment goes to the Google Calendar of the connected account, to the team by email if they set it up, and to you in lead.appointment_booked:
The agent can also move or cancel the appointment later in the conversation. Neither fires an event.

Team notifications

By default, the agent notifies the team when the lead asks for a person, is angry, distrusts it, needs information it does not have, or cancels or changes something. The customer can change those cases in Team notifications. The notice always reaches the dashboard, by email or WhatsApp if the team set them up, and reaches you in lead.handoff:
  • A second notice for the same lead within the cooldown, 15 minutes by default, is not saved and fires nothing. Notices that ask for a person (requires_human: true) share one cooldown, and the informative ones (qualified, disqualified, appointment) share another. A notice over the daily limit, 5 per lead by default, fires nothing either.
  • After the agent books, moves or cancels an appointment, it is told not to notify the team in the same reply: the calendar skill already notifies them.
  • The property reference and link the agent writes in a notice go only to the team’s email. When the agent found the property with Properties, read it from lead.variables.property_reference.

Do not contact

The agent uses it when the lead asks clearly to stop, for example «stop writing to me» or «unsubscribe». Saying they are not interested is not enough. Every live lead of the same person in the same subaccount changes, and each one fires lead.do_not_contact_changed:
do_not_contact_reason is the reason the agent gives, often a short code such as user_requested_stop. origin is ai in a chat and in a call. What changes for the lead is in When a lead asks not to be contacted.

Close the conversation

The agent does not close conversations on its own: a person does, from Conversations or Funnels. What Finish conversation sets is the Farewell message, under Close the conversation once it is resolved. When someone on the team closes a conversation, the agent sends that message to the lead. Closing fires no webhook event. The lead keeps its id, messages and variables, and its status becomes closed. If the lead writes again on WhatsApp or Instagram, the conversation opens again and status goes back to active.

Properties

When the lead mentions a property or describes what they want, the agent searches your listings: the ones on Idealista and the ones you send with PUT /v1/properties/{reference}. When exactly one property fits, it saves it in the lead’s variables. property_reference is null if that listing has no code:
A later match replaces the three values. A search that finds several properties, or none, changes nothing, and neither do the suggestions the agent makes when the customer turned on Suggest properties in Properties.

Advanced skills

An advanced skill connects the agent to your system. When the AI decides to use it, NewLead sends a POST to your URL with the values the AI wrote, waits for your response and gives it to the AI, which then replies to the lead.

Set it up

In the dashboard, open the agent and go to Advanced skills, or Skills in a voice agent:
The description of each parameter is what the AI follows to fill it: say where the value comes from and its format.

The request from a text agent

The body is the values the AI wrote, and nothing else:
The request does not say which lead or agent it is about. To get the lead, declare a parameter for it, as lead_id above: the agent knows the lead’s ID, name and phone, and its variables. The AI copies the value into the request, and NewLead does not check it.

The request from a voice agent

A voice agent wraps the values in args, and adds the lead of the call, set by NewLead:
lead_id is null when the call has no lead, for example when the number is hidden.

Respond

Respond with a 2xx and a short JSON body. The AI replies to the lead from it, so name the fields clearly. A text agent cuts a longer body at 8,000 characters, even in the middle of the JSON. A text agent also reads these 2xx responses as a failure:
Keep internal details out of error and message: the agent may repeat them to the lead.

Security

NewLead does not sign these requests and sends no secret, so anyone who knows the URL can call it.
  • Use https and a URL that is hard to guess, with a long random token in the path or the query string. Check the token on every request.
  • Treat every value as user input. A lead can try to steer what the agent sends.
  • Check the IDs you receive. GET /v1/leads/{lead_id} with your key returns 404 for a lead outside your subaccount.
  • The URL must resolve to a public address. A redirect is not followed and counts as a failure.

Retries

NewLead does not retry a request that fails or times out. The AI is told, and it tells the lead. Within one reply, the same call with the same values runs once. In a later reply, the agent can call your skill again with the same values, and the request carries no idempotency key. Make the operation safe to repeat, for example by keying it on the lead and the values.

See each run

In a text conversation, each skill run, platform or advanced, adds a message to GET /v1/leads/{lead_id}/messages. Web search does not: Read text as a log line: its wording can change. These messages are never sent to the lead.

Follow it from outside

Not available yet

  • Turning skills on or setting them up through the API, or listing which ones an agent has.
  • An event when the agent moves or cancels an appointment, or when it fills a custom field in a chat.
  • Reading a lead’s appointments through the API: they only travel in lead.appointment_booked.
  • Signing the requests of advanced skills, or telling a test conversation apart in them.

Webhook events

The full payload of each event a skill fires.

Sync leads to a CRM

Keep a CRM up to date from lead events.

Send messages and place calls

Write to leads and read the conversation, skill runs included.

Show your properties on your website

The listings the Properties skill searches.