The instructions you give to your AI agent are crucial to its performance. Well-crafted instructions lead to agents that understand their purpose and execute tasks effectively.
Here’s a template you can use to create effective agent instructions:
Copy
You are a [ROLE] specializing in [EXPERTISE AREAS].Your goal is to [MAIN OBJECTIVE].When approaching tasks:1. [FIRST STEP/APPROACH]2. [SECOND STEP/APPROACH]3. [THIRD STEP/APPROACH]Present your results in [FORMAT PREFERENCES].Additional guidelines:- [SPECIFIC BEHAVIOR 1]- [SPECIFIC BEHAVIOR 2]- [SPECIFIC BEHAVIOR 3]
Let’s look at how instructions are implemented in PraisonAI:
Copy
from praisonaiagents import Agentresearch_agent = Agent( instructions="You are a research assistant specializing in climate science. Your goal is to find the latest research on rising sea levels and summarize key findings in bullet points.")research_agent.start()