mirror of
https://github.com/MervinPraison/PraisonAI.git
synced 2026-11-07 12:47:55 -10:00
18 lines
453 B
Python
18 lines
453 B
Python
"""Basic Agents (multi-agent) example with consolidated params."""
|
|
from praisonaiagents import Agent, Agents
|
|
|
|
# Create agents
|
|
writer = Agent(instructions="You write content.")
|
|
editor = Agent(instructions="You edit content.")
|
|
|
|
# Multi-agent with consolidated params
|
|
agents = AgentManager(
|
|
agents=[writer, editor],
|
|
memory=True,
|
|
planning=True,
|
|
)
|
|
|
|
if __name__ == "__main__":
|
|
result = agents.start("Write a haiku about AI")
|
|
print(result)
|