Customize
System Prompt
Customize the system prompt to control agent behavior and capabilities
Overview
You can customize the system prompt by extending the SystemPrompt
class. Internally, this adds extra instructions to the default system prompt (which is general and quite optimized at this point).
Custom system prompts allow you to modify the agent’s behavior at a fundamental level. Use this feature carefully as it can significantly impact the agent’s performance and reliability.
Basic Customization
Create a custom system prompt by inheriting from the base class.
The important_rules()
are written in format like this. Keeping the format
consistent helps with redundancy and readability.
Try not to override other methods unless you have a specific need.
Using Custom System Prompt
Apply your custom system prompt when creating an agent:
Was this page helpful?