|
| 1 | +# 🔧 Template and Client Configuration |
| 2 | + |
| 3 | +This guide covers how to configure custom templates and client behaviors for your AI agent. We'll walk through all available template options and configuration settings. |
| 4 | + |
| 5 | +## Template Configuration |
| 6 | + |
| 7 | +### Overview |
| 8 | + |
| 9 | +You can customize your character's behavior by overriding default prompt templates in your character's JSON file. ai16z/eliza provides default prompts for standard behaviors, making all template fields optional. |
| 10 | + |
| 11 | +### Available Template Options |
| 12 | + |
| 13 | +Here are all the template options you can configure: |
| 14 | + |
| 15 | +```json |
| 16 | +{ |
| 17 | + "templates": { |
| 18 | + "goalsTemplate": "", // Define character goals |
| 19 | + "factsTemplate": "", // Specify character knowledge |
| 20 | + "messageHandlerTemplate": "", // Handle general messages |
| 21 | + "shouldRespondTemplate": "", // Control response triggers |
| 22 | + "continueMessageHandlerTemplate": "", // Manage conversation flow |
| 23 | + "evaluationTemplate": "", // Handle response evaluation |
| 24 | + "twitterSearchTemplate": "", // Process Twitter searches |
| 25 | + "twitterPostTemplate": "", // Format Twitter posts |
| 26 | + "twitterMessageHandlerTemplate": "", // Handle Twitter messages |
| 27 | + "twitterShouldRespondTemplate": "", // Control Twitter responses |
| 28 | + "telegramMessageHandlerTemplate": "", // Handle Telegram messages |
| 29 | + "telegramShouldRespondTemplate": "", // Control Telegram responses |
| 30 | + "discordVoiceHandlerTemplate": "", // Manage Discord voice |
| 31 | + "discordShouldRespondTemplate": "", // Control Discord responses |
| 32 | + "discordMessageHandlerTemplate": "" // Handle Discord messages |
| 33 | + } |
| 34 | +} |
| 35 | +``` |
| 36 | + |
| 37 | +### Example Usage |
| 38 | + |
| 39 | +```json |
| 40 | +{ |
| 41 | + "templates": { |
| 42 | + "discordMessageHandlerTemplate": "", |
| 43 | + "discordShouldRespondTemplate": "", |
| 44 | + "telegramShouldRespondTemplate": "", |
| 45 | + "twitterPostTemplate": "" |
| 46 | + } |
| 47 | +} |
| 48 | +``` |
| 49 | + |
| 50 | +## Client Configuration |
| 51 | + |
| 52 | +### Overview |
| 53 | + |
| 54 | +Configure platform-specific behaviors for your character, such as handling direct messages and bot interactions. |
| 55 | + |
| 56 | +### Available Options |
| 57 | + |
| 58 | +```json |
| 59 | +{ |
| 60 | + "clientConfig": { |
| 61 | + "telegram": { |
| 62 | + "shouldIgnoreDirectMessages": true, // Ignore DMs |
| 63 | + "shouldIgnoreBotMessages": true // Ignore bot messages |
| 64 | + }, |
| 65 | + "discord": { |
| 66 | + "shouldIgnoreBotMessages": true, // Ignore bot messages |
| 67 | + "shouldIgnoreDirectMessages": true // Ignore DMs |
| 68 | + } |
| 69 | + } |
| 70 | +} |
| 71 | +``` |
| 72 | + |
| 73 | +## Best Practices |
| 74 | + |
| 75 | +1. **Template Management** |
| 76 | + - Keep templates focused and specific |
| 77 | + - Use clear, consistent formatting |
| 78 | + - Document custom template behavior |
| 79 | + |
| 80 | +2. **Client Configuration** |
| 81 | + - Configure per platform as needed |
| 82 | + - Test behavior in development |
| 83 | + - Monitor interaction patterns |
| 84 | + |
| 85 | +3. **Performance Considerations** |
| 86 | + - Keep templates concise |
| 87 | + - Avoid redundant configurations |
| 88 | + - Test with expected message volumes |
0 commit comments