Get Learn Context • AI Agent SDK
get_learn_context: Get learning context for injection into system prompt.
get_learn_context
Method
</div>
Get learning context for injection into system prompt.
Returns learned preferences, insights, and patterns when memory=”learn” is enabled. Returns empty string when learn is not enabled (zero overhead).
Signature
def get_learn_context() -> strReturns
ResponseField
strFormatted learning context string, or empty string if learn not enabled
Uses
get_learn_context
Used By
Source
View on GitHubpraisonaiagents/agent/agent.py at line 6483