Instructions
Manage agent instructions and context.
Instructions.
1"""2Instructions3=============================45Instructions.6"""78from kern.agent import Agent9from kern.models.openai import OpenAIResponses1011# ---------------------------------------------------------------------------12# Create Agent13# ---------------------------------------------------------------------------14agent = Agent(15 model=OpenAIResponses(id="gpt-5.2"),16 add_datetime_to_context=True,17 timezone_identifier="Etc/UTC",18)1920# ---------------------------------------------------------------------------21# Run Agent22# ---------------------------------------------------------------------------23if __name__ == "__main__":24 agent.print_response(25 "What is the current date and time? What is the current time in NYC?"26 )Run the Example
1# Clone and setup repo2git clone https://github.com/kern-ai/kern.git3cd kern/cookbook/02_agents/03_context_management45# Create and activate virtual environment6./scripts/demo_setup.sh7source .venvs/demo/bin/activate89python instructions.py