> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/artificial-intelligence/ai-agents/ai-agents-early-completion.md).

# AI Agents - Early Completion

Using the AI agent to end a conversation early and send a farewell message.

## Skill Configuration

To use the Early Termination feature, it is necessary to enable this option in the agent. The condition defined in the settings for "**Termination Condition**" will be evaluated with each new message from the contact; if the condition is met, then the agent will be terminated.

In the settings, in the "**Termination Message**", you can define a message to be sent when the conversation is ended by early exit. It is also possible to keep the option "**End service?**", if you also want to close the service in SAC 360º.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FNzCvzIeVKbWHO9Uaj8WB%2Fimage.png?alt=media&amp;token=003673f3-ea9a-483f-849f-a9396c457238" alt=""><figcaption></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2Fyr31XQnl3ewHIF4qhSHD%2Fimage.png?alt=media&amp;token=d24ab758-feb5-4d72-9c81-5e0dd03022c7" alt=""><figcaption></figcaption></figure>

## Testing the Skill

As the following example shows, after the customer sends a message that matches the configuration of "**Termination Condition**", he received the termination message and the service was resolved.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FaxJE29fXUbLKxOwGYT0b%2Fimage.png?alt=media&amp;token=ad88a486-96d8-4c37-8a07-04174f40d43f" alt=""><figcaption></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FP48D88U5Q5U3sL10vGGr%2Fimage.png?alt=media&amp;token=57b36ec7-640f-4bf3-b003-9734950faaf3" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sprinthub.com/en/topics/artificial-intelligence/ai-agents/ai-agents-early-completion.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
