@@ -488,18 +488,18 @@ def __init__(
488488 reflection : Optional [Union [bool , str , 'ReflectionConfig' ]] = None ,
489489 guardrails : Optional [Union [bool , str , Callable , 'GuardrailConfig' ]] = None ,
490490 web : Optional [Union [bool , str , 'WebConfig' ]] = None ,
491- context : Optional [Union [bool , str , Dict [ str , Any ], 'ContextConfig' , 'ContextManager' ]] = None ,
492- autonomy : Optional [Union [bool , str , Dict [str , Any ], 'AutonomyConfig' ]] = None ,
491+ context : Optional [Union [bool , 'ContextConfig' , 'ContextManager' ]] = None ,
492+ autonomy : Optional [Union [bool , Dict [str , Any ], 'AutonomyConfig' ]] = None ,
493493 verification_hooks : Optional [List [Any ]] = None , # Deprecated: use autonomy=AutonomyConfig(verification_hooks=[...])
494494 output : Optional [Union [bool , str , Dict [str , Any ], 'OutputConfig' ]] = None ,
495495 execution : Optional [Union [bool , str , Dict [str , Any ], 'ExecutionConfig' ]] = None ,
496- templates : Optional [Union [str , Dict [str , Any ], 'TemplateConfig' ]] = None ,
496+ templates : Optional [Union [Dict [str , Any ], 'TemplateConfig' ]] = None ,
497497 caching : Optional [Union [bool , str , Dict [str , Any ], 'CachingConfig' ]] = None ,
498498 hooks : Optional [Union [List [Any ], Dict [str , Any ], 'HooksConfig' ]] = None ,
499499 skills : Optional [Union [List [str ], str , Dict [str , Any ], 'SkillsConfig' ]] = None ,
500- approval : Optional [Union [bool , str , Dict [ str , Any ], 'ApprovalConfig' , 'ApprovalProtocol' ]] = None ,
500+ approval : Optional [Union [bool , str , 'ApprovalConfig' , 'ApprovalProtocol' ]] = None ,
501501 tool_timeout : Optional [int ] = None , # P8/G11: Timeout in seconds for each tool call
502- learn : Optional [Union [bool , str , Dict [str , Any ], 'LearnConfig' ]] = None , # Continuous learning (peer to memory)
502+ learn : Optional [Union [bool , Dict [str , Any ], 'LearnConfig' ]] = None , # Continuous learning (peer to memory)
503503 ):
504504 """Initialize an Agent instance.
505505
@@ -552,14 +552,20 @@ def __init__(
552552 verification_hooks: **Deprecated** — use ``autonomy=AutonomyConfig(verification_hooks=[...])``.
553553 Still works for backward compatibility.
554554 output: Output configuration. Accepts:
555+ - bool: True=default OutputConfig, False=disabled
555556 - str: Preset name ("silent", "actions", "verbose", "json", "stream")
557+ - Dict[str, Any]: Config overrides (e.g. {"verbose": 2, "stream": True})
556558 - OutputConfig: Custom configuration
557559 Controls: verbose, markdown, stream, metrics, reasoning_steps
558560 execution: Execution configuration. Accepts:
561+ - bool: True=default ExecutionConfig, False=disabled
559562 - str: Preset name ("fast", "balanced", "thorough")
563+ - Dict[str, Any]: Config overrides (e.g. {"max_iter": 10, "max_rpm": 60})
560564 - ExecutionConfig: Custom configuration
561565 Controls: max_iter, max_rpm, max_execution_time, max_retry_limit
562- templates: Template configuration (TemplateConfig).
566+ templates: Template configuration. Accepts:
567+ - Dict[str, Any]: Template fields (e.g. {"system": "...", "prompt": "..."})
568+ - TemplateConfig: Custom configuration
563569 Controls: system_template, prompt_template, response_template
564570 caching: Caching configuration. Accepts:
565571 - bool: True enables with defaults
@@ -571,7 +577,8 @@ def __init__(
571577 - List[str]: Skill directory paths
572578 - SkillsConfig: Custom configuration
573579 learn: Continuous learning configuration. Accepts:
574- - bool: True enables with defaults, False disables
580+ - bool: True enables with defaults (AGENTIC mode), False disables
581+ - Dict[str, Any]: Config fields (e.g. {"mode": "agentic", "backend": "sqlite"})
575582 - LearnConfig: Custom configuration
576583 Learning is a first-class citizen, peer to memory. It captures patterns,
577584 preferences, and insights from interactions to improve future responses.
@@ -1089,7 +1096,11 @@ def __init__(
10891096 # Unknown string mode, disable learning
10901097 _learn_config = None
10911098 else :
1092- _learn_config = learn # Pass through
1099+ logging .warning (
1100+ "Unsupported learn= value %r; expected bool, dict, or LearnConfig. "
1101+ "Learning disabled." , learn
1102+ )
1103+ _learn_config = None
10931104 elif _memory_config is not None and isinstance (_memory_config , MemoryConfig ):
10941105 # Fallback to memory.learn for backward compatibility
10951106 if _memory_config .learn :
0 commit comments