System Prompts
Set default behavior and personality for your agents.
Basic Usage
final agent = Agent('openai');
// Use default assistant
final result1 = await agent.send(
'Hello!',
history: [ChatMessage.system('You are a helpful assistant.')],
);
// Response: "Hello! How can I help you today?"
// Use pirate personality
final result2 = await agent.send(
'Hello!',
history: [ChatMessage.system('You are a pirate. Speak like one.')],
);
// Response: "Ahoy, matey!"
Next Steps
- Tool Calling - Combine prompts with tools
- Agentic Behavior - Complex agent workflows