basic_context.py
1 """ 2 Basic Context Example - Agent-Centric API 3 4 Demonstrates context management with consolidated params. 5 Presets: sliding_window, summarize, truncate 6 """ 7 8 from praisonaiagents import Agent 9 10 # Basic: Enable context management with preset 11 agent = Agent( 12 instructions="You are a helpful assistant with context management.", 13 context="sliding_window", # Presets: sliding_window, summarize, truncate 14 ) 15 16 if __name__ == "__main__": 17 response = agent.start("Tell me a long story about a dragon.") 18 print(response)