Chat, not a script

Who starts the conversation

In Agents you called start with a question. The run ended when the answer printed.

In a bot the user writes first in Telegram or Slack. The process keeps running and answers each message.

Agents page vs Bot page

Developers who import Agent in their own program use the Agents story.

Teams who want replies inside an existing chat use Bot. The instructions can be the same.

User speaks first

Practise a user-first message in Try it Yourself — you play the user in start().

Example

from praisonai import Agent

agent = Agent(instructions="You are a chat bot waiting for the user.")
print(agent.start("User message: What is your refund policy?"))

Try it Yourself

Reference: documentation