cookbook/02_agents/03_context_management/README.md
Examples for instructions, system messages, introduction messages, and context shaping.
few_shot_learning.py - Demonstrates few-shot learning with example messages.filter_tool_calls_from_history.py - Filter tool calls from conversation history.instructions.py - Set agent instructions.instructions_with_state.py - Dynamic instructions using session state.introduction_message.py - Set an initial greeting message for the agent.system_message.py - Customize the agent's system message and role.datetime_format.py - Customize the datetime format injected into agent context.direnv allow (including OPENAI_API_KEY)../scripts/demo_setup.sh, then run cookbooks with .venvs/demo/bin/python..venvs/demo/bin/python cookbook/02_agents/03_context_management/<file>.py