What is an agent
Note: An agent does not run until you give it a task. The next pages install PraisonAI, then start one.
One agent, one job
An agent is one autonomous helper with a job. You tell it who it is, then you tell it what to do.
PraisonAI calls that helper an Agent. A team of helpers is a separate idea, on a later page.
Example
from praisonai import Agent
agent = Agent(instructions="You are a helpful assistant")
print(type(agent).__name__)Example explained
- Agent — The name of this kind of helper. The example writes it as Agent.
- instructions — Who the agent is. In the docs this is called the system prompt.
Named role and one job
Production agents get a name before they get tools. Run this sample, then change the task string.
Example
from praisonai import Agent
agent = Agent(
name="Greeter",
instructions="Answer in exactly one sentence.",
)
print(agent.start("What is one job an agent does?"))Example explained
- from praisonai import Agent — Imports Agent needed for named role and one job.
- Agent(…) — Instantiates the Agent configured for named role and one job.
- .start(…) — Executes the configured run for named role and one job and returns the result.
Reference: documentation