
An agent is either active or paused. Pausing stops the answers without losing anything; deleting removes the agent for good. The buttons are on each row of the Your agents list and at the top of each agent, on the Agents tab of All in One AI.
Pausing
|
|
|
Pausing is useful, for example, when your website chat starts getting strange requests and you want to stop the spending at once. Or when you are going to redo the knowledge and do not want answers halfway through the change.
Turning it back on
Click Activate and confirm with Yes, activate. The agent answers through the API again with the same id, so your programs do not need to change anything.
Deleting
Delete removes the agent and all its knowledge, and it cannot be undone. API requests with that id stop working. Before deleting, copy the instructions and keep the knowledge files, if you want to use them in another agent. Deleting frees a place among the account's 50 agents.
The agent_paused error in your program
With the OpenAI SDK, the error arrives as an exception with the HTTP status. In Python it is APIStatusError, with status_code equal to 409:
import os
from openai import OpenAI, APIStatusError
client = OpenAI(base_url="https://api.mozout.co.mz/v1", api_key=os.environ["MOZOUT_API_KEY"])
try:
completion = client.chat.completions.create(
model="agent/7c1e9a42-b35d8f06-a2c4e719-5d0b3f8e",
messages=[{"role": "user", "content": "What are your opening hours on Saturday?"}],
max_tokens=400,
)
print(completion.choices[0].message.content)
except APIStatusError as e:
if e.status_code == 409:
print("The assistant is paused. Please try again later.")
else:
raise
Show the customer a simple sentence, not the technical error. To know the status before you open the chat, use GET /v1/models?type=agent: the status field comes as active or paused. See listing your agents through the API.
|
Want to control when your agent answers? See All in One AI. See All in One AI |
RECOMMENDED PRODUCT Web hosting with cPanel Domain and SSL included, daily backups and the panel you already know. from $6.60/mo (3-year plan, with coupon) See plans |











