Prompting
How Daydreams structures prompts to guide LLM reasoning and actions.
What is a Prompt?
A prompt is the text you send to an AI model to tell it what to do. Think of it like giving instructions to a smart assistant.
Simple Prompts vs Agent Prompts
Simple Prompt (ChatGPT style)
Agent Prompt (what Daydreams creates)
The Problem: LLMs Need Structure
Without structure, LLMs can't:
- Know what tools they have available
- Remember previous conversations
- Follow consistent output formats
- Handle complex multi-step tasks
Example of what goes wrong:
The Solution: Structured Prompts
Daydreams automatically creates structured prompts that include:
- Available Tools - What the agent can do
- Current State - What's happening right now
- Response Format - How to respond properly
- Context Memory - What happened before
How Daydreams Builds Prompts
Every time your agent thinks, Daydreams automatically builds a prompt like this:
1. Instructions
2. Available Tools
3. Current Context State
4. What Just Happened
5. Expected Response Format
What the LLM Sees (Complete Example)
Here's what a complete prompt looks like:
LLM Response Example
The LLM responds with structured XML:
Daydreams automatically:
- Parses the
<action_call>
and runs the weather API - Parses the
<output>
and sends the Discord message - Saves the
<reasoning>
for debugging
Advanced Features
Template References
LLMs can reference previous action results within the same response:
The {{calls[0].temperature}}
gets replaced with the actual weather data.
Multi-Context Prompts
When multiple contexts are active:
Key Benefits
- Consistency - All agents use the same reliable prompt structure
- Clarity - LLMs always know what tools they have and how to use them
- Memory - Context and conversation history included automatically
- Debugging - You can see exactly what the LLM was told
- Extensibility - Easy to add new actions and outputs
Customizing Prompts
You can customize prompts in your contexts:
Key Takeaways
- Prompts are automatically generated - You don't write them manually
- Structure enables capabilities - Tools, memory, and context included automatically
- LLMs respond with XML - Parsed automatically into actions and outputs
- Templates enable complex flows - Reference previous results within responses
- Customizable per context - Add specific instructions and state rendering
The prompting system is what makes your agent intelligent - it provides the LLM with everything needed to understand the situation and respond appropriately.