The get_context call is optimized for agent prompts. It fetches State, Memories, and Turns in a single low-latency call.
context = sb.sessions.get_context( session_id=session.id, query="What does the user like?", memory_limit=5, turn_limit=10)# context['state'] -> dict# context['memories'] -> list of dicts with scores# context['recent_turns'] -> list of turns