Your first agent

Note: On this server, Run uses a local preview until a model key is configured for the runner. On your machine, the same example calls your model.

Create and start

Three lines create an agent and give it one task.

instructions sets who the agent is. start sends the task, which is the user prompt.

Example

from praisonai import Agent

agent = Agent(instructions="You are a helpful assistant")
print(agent.start("Hello! What can you help me with?"))

Try it Yourself

Example explained

  • instructions — The system prompt.
  • start — The user prompt, and the call that runs the agent.

Reference: documentation