agent-framework-core 1.17.0__tar.gz → 1.18.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/PKG-INFO +2 -3
  2. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/__init__.py +58 -1
  3. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/__init__.pyi +49 -1
  4. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_compaction.py +113 -2
  5. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_evaluation.py +133 -169
  6. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_feature_stage.py +1 -0
  7. agent_framework_core-1.18.0/agent_framework/_filesystem.py +138 -0
  8. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_harness/_agent.py +2 -2
  9. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_harness/_file_access.py +474 -76
  10. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_harness/_file_memory.py +61 -7
  11. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_harness/_memory.py +58 -13
  12. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_harness/_todo.py +13 -40
  13. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_harness/_tool_approval.py +2 -1
  14. agent_framework_core-1.18.0/agent_framework/_in_memory.py +604 -0
  15. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_mcp.py +543 -52
  16. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_middleware.py +28 -1
  17. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_serialization.py +144 -60
  18. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_sessions.py +49 -59
  19. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_settings.py +79 -17
  20. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_skills.py +149 -38
  21. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_telemetry.py +1 -0
  22. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_tools.py +509 -104
  23. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_types.py +31 -3
  24. agent_framework_core-1.18.0/agent_framework/_vector_filters.py +874 -0
  25. agent_framework_core-1.18.0/agent_framework/_vectors.py +2065 -0
  26. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_agent.py +34 -16
  27. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_agent_executor.py +15 -11
  28. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_checkpoint.py +5 -4
  29. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_const.py +7 -0
  30. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_edge_runner.py +111 -6
  31. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_events.py +28 -5
  32. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_functional.py +97 -86
  33. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_runner.py +51 -5
  34. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_workflow.py +88 -50
  35. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_workflow_executor.py +45 -28
  36. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/ag_ui/__init__.py +4 -0
  37. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/ag_ui/__init__.pyi +4 -0
  38. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/azure/__init__.py +2 -0
  39. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/azure/__init__.pyi +4 -0
  40. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/observability.py +37 -6
  41. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/redis/__init__.py +4 -1
  42. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/redis/__init__.pyi +6 -0
  43. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/security.py +1274 -683
  44. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/pyproject.toml +5 -4
  45. agent_framework_core-1.17.0/agent_framework/_filesystem.py +0 -23
  46. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/LICENSE +0 -0
  47. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/README.md +0 -0
  48. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_agent_hooks.py +0 -0
  49. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_agents.py +0 -0
  50. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_clients.py +0 -0
  51. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_docstrings.py +0 -0
  52. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_harness/__init__.py +0 -0
  53. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_harness/_agent.pyi +0 -0
  54. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_harness/_background_agents.py +0 -0
  55. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_harness/_loop.py +0 -0
  56. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_harness/_mode.py +0 -0
  57. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/__init__.py +0 -0
  58. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_agent_utils.py +0 -0
  59. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_checkpoint_encoding.py +0 -0
  60. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_conversation_history.py +0 -0
  61. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_edge.py +0 -0
  62. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_executor.py +0 -0
  63. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_function_executor.py +0 -0
  64. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_message_utils.py +0 -0
  65. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_model_utils.py +0 -0
  66. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_request_info_mixin.py +0 -0
  67. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_runner_context.py +0 -0
  68. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_state.py +0 -0
  69. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_typing_utils.py +0 -0
  70. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_validation.py +0 -0
  71. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_viz.py +0 -0
  72. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_workflow_builder.py +0 -0
  73. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/_workflows/_workflow_context.py +0 -0
  74. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/a2a/__init__.py +0 -0
  75. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/a2a/__init__.pyi +0 -0
  76. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/amazon/__init__.py +0 -0
  77. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/amazon/__init__.pyi +0 -0
  78. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/anthropic/__init__.py +0 -0
  79. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/anthropic/__init__.pyi +0 -0
  80. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/chatkit/__init__.py +0 -0
  81. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/chatkit/__init__.pyi +0 -0
  82. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/declarative/__init__.py +0 -0
  83. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/declarative/__init__.pyi +0 -0
  84. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/devui/__init__.py +0 -0
  85. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/devui/__init__.pyi +0 -0
  86. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/exceptions.py +0 -0
  87. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/foundry/__init__.py +0 -0
  88. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/foundry/__init__.pyi +0 -0
  89. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/gemini/__init__.py +0 -0
  90. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/gemini/__init__.pyi +0 -0
  91. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/github/__init__.py +0 -0
  92. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/github/__init__.pyi +0 -0
  93. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/google/__init__.py +0 -0
  94. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/google/__init__.pyi +0 -0
  95. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/hyperlight/__init__.py +0 -0
  96. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/lab/__init__.py +0 -0
  97. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/mem0/__init__.py +0 -0
  98. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/mem0/__init__.pyi +0 -0
  99. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/microsoft/__init__.py +0 -0
  100. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/microsoft/__init__.pyi +0 -0
  101. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/mistral/__init__.py +0 -0
  102. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/mistral/__init__.pyi +0 -0
  103. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/monty/__init__.py +0 -0
  104. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/monty/__init__.pyi +0 -0
  105. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/ollama/__init__.py +0 -0
  106. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/ollama/__init__.pyi +0 -0
  107. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/openai/__init__.py +0 -0
  108. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/openai/__init__.pyi +0 -0
  109. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/orchestrations/__init__.py +0 -0
  110. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/orchestrations/__init__.pyi +0 -0
  111. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/py.typed +0 -0
  112. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/tools/__init__.py +0 -0
  113. {agent_framework_core-1.17.0 → agent_framework_core-1.18.0}/agent_framework/tools/__init__.pyi +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-framework-core
3
- Version: 1.17.0
3
+ Version: 1.18.0
4
4
  Summary: Microsoft Agent Framework for building AI Agents with Python. This is the core package that has all the core abstractions and implementations.
5
5
  Author-email: Microsoft <af-support@microsoft.com>
6
6
  Requires-Python: >=3.10
@@ -41,8 +41,7 @@ Requires-Dist: agent-framework-foundry-hosting ; extra == "all"
41
41
  Requires-Dist: agent-framework-foundry-local ; extra == "all"
42
42
  Requires-Dist: agent-framework-gemini ; extra == "all"
43
43
  Requires-Dist: agent-framework-github-copilot ; extra == "all" and ( python_version >= '3.11')
44
- Requires-Dist: agent-framework-hyperlight ; extra == "all" and ( ((sys_platform == 'linux' and platform_machine == 'x86_64') or (sys_platform == 'win32' and platform_machine == 'AMD64')) and python_version < '3.14')
45
- Requires-Dist: agent-framework-lab ; extra == "all"
44
+ Requires-Dist: agent-framework-hyperlight ; extra == "all" and ( (sys_platform == 'linux' and platform_machine == 'x86_64') or (sys_platform == 'win32' and platform_machine == 'AMD64'))
46
45
  Requires-Dist: agent-framework-mem0 ; extra == "all"
47
46
  Requires-Dist: agent-framework-mistral ; extra == "all"
48
47
  Requires-Dist: agent-framework-monty ; extra == "all"
@@ -284,6 +284,37 @@ _LAZY_MODULE_EXPORTS: Final[Mapping[str, tuple[str, ...]]] = {
284
284
  "validate_tool_mode",
285
285
  "validate_tools",
286
286
  ),
287
+ "._in_memory": (
288
+ "InMemoryCollection",
289
+ "InMemoryStore",
290
+ ),
291
+ "._vector_filters": (
292
+ "Filter",
293
+ "FilterGroup",
294
+ "FilterGroupOperator",
295
+ "FilterOperator",
296
+ "Param",
297
+ ),
298
+ "._vectors": (
299
+ "DISTANCE_FUNCTION_DIRECTION_HELPER",
300
+ "BaseVectorCollection",
301
+ "BaseVectorSearch",
302
+ "BaseVectorStore",
303
+ "DistanceFunction",
304
+ "FieldTypes",
305
+ "GenerateVectors",
306
+ "IndexKind",
307
+ "SearchResponse",
308
+ "SearchResults",
309
+ "SearchType",
310
+ "SupportsVectorSearch",
311
+ "SupportsVectorUpsert",
312
+ "VectorStoreCollectionDefinition",
313
+ "VectorStoreField",
314
+ "create_vector_search_tool",
315
+ "register_vectorstoremodel",
316
+ "vectorstoremodel",
317
+ ),
287
318
  "._workflows._agent": ("WorkflowAgent",),
288
319
  "._workflows._agent_executor": ("AgentExecutor", "AgentExecutorRequest", "AgentExecutorResponse"),
289
320
  "._workflows._agent_utils": ("resolve_agent_id",),
@@ -343,7 +374,7 @@ _LAZY_MODULE_EXPORTS: Final[Mapping[str, tuple[str, ...]]] = {
343
374
  "validate_workflow_graph",
344
375
  ),
345
376
  "._workflows._viz": ("WorkflowViz",),
346
- "._workflows._workflow": ("Workflow", "WorkflowRunResult"),
377
+ "._workflows._workflow": ("Workflow", "WorkflowInvocationKwargs", "WorkflowRunResult"),
347
378
  "._workflows._workflow_builder": ("WorkflowBuilder",),
348
379
  "._workflows._workflow_context": ("WorkflowContext",),
349
380
  "._workflows._workflow_executor": (
@@ -371,6 +402,7 @@ __all__ = [
371
402
  "DEFAULT_MODE_SOURCE_ID",
372
403
  "DEFAULT_TODO_SOURCE_ID",
373
404
  "DEFAULT_TOOL_APPROVAL_SOURCE_ID",
405
+ "DISTANCE_FUNCTION_DIRECTION_HELPER",
374
406
  "EXCLUDED_KEY",
375
407
  "EXCLUDE_REASON_KEY",
376
408
  "GROUP_ANNOTATION_KEY",
@@ -412,6 +444,9 @@ __all__ = [
412
444
  "BaseAgent",
413
445
  "BaseChatClient",
414
446
  "BaseEmbeddingClient",
447
+ "BaseVectorCollection",
448
+ "BaseVectorSearch",
449
+ "BaseVectorStore",
415
450
  "CachingSkillsSource",
416
451
  "Case",
417
452
  "CharacterEstimatorTokenizer",
@@ -438,6 +473,7 @@ __all__ = [
438
473
  "DeduplicatingSkillsSource",
439
474
  "Default",
440
475
  "DelegatingSkillsSource",
476
+ "DistanceFunction",
441
477
  "Edge",
442
478
  "EdgeCondition",
443
479
  "EdgeDuplicationError",
@@ -456,6 +492,7 @@ __all__ = [
456
492
  "ExperimentalFeature",
457
493
  "FanInEdgeGroup",
458
494
  "FanOutEdgeGroup",
495
+ "FieldTypes",
459
496
  "FileAccessProvider",
460
497
  "FileCheckpointStorage",
461
498
  "FileHistoryProvider",
@@ -468,6 +505,10 @@ __all__ = [
468
505
  "FileSkillsSource",
469
506
  "FileStoreEntry",
470
507
  "FileSystemAgentFileStore",
508
+ "Filter",
509
+ "FilterGroup",
510
+ "FilterGroupOperator",
511
+ "FilterOperator",
471
512
  "FilteringSkillsSource",
472
513
  "FinalT",
473
514
  "FinishReason",
@@ -482,14 +523,18 @@ __all__ = [
482
523
  "FunctionalWorkflow",
483
524
  "FunctionalWorkflowAgent",
484
525
  "FunctionalWorkflowDefinition",
526
+ "GenerateVectors",
485
527
  "GeneratedEmbeddings",
486
528
  "GraphConnectivityError",
487
529
  "HistoryProvider",
488
530
  "InMemoryAgentFileStore",
489
531
  "InMemoryCheckpointStorage",
532
+ "InMemoryCollection",
490
533
  "InMemoryHistoryProvider",
491
534
  "InMemorySkillsSource",
535
+ "InMemoryStore",
492
536
  "InProcRunnerContext",
537
+ "IndexKind",
493
538
  "InlineSkill",
494
539
  "InlineSkillResource",
495
540
  "InlineSkillScript",
@@ -517,6 +562,7 @@ __all__ = [
517
562
  "MiddlewareTypes",
518
563
  "OuterFinalT",
519
564
  "OuterUpdateT",
565
+ "Param",
520
566
  "RawAgent",
521
567
  "ReleaseCandidateFeature",
522
568
  "ResponseStream",
@@ -527,6 +573,9 @@ __all__ = [
527
573
  "Runner",
528
574
  "RunnerContext",
529
575
  "SamplingApprovalCallback",
576
+ "SearchResponse",
577
+ "SearchResults",
578
+ "SearchType",
530
579
  "SecretString",
531
580
  "SelectiveToolCallCompactionStrategy",
532
581
  "ServiceSessionId",
@@ -555,6 +604,8 @@ __all__ = [
555
604
  "SupportsImageGenerationTool",
556
605
  "SupportsMCPTool",
557
606
  "SupportsShellTool",
607
+ "SupportsVectorSearch",
608
+ "SupportsVectorUpsert",
558
609
  "SupportsWebSearchTool",
559
610
  "SwitchCaseEdgeGroup",
560
611
  "SwitchCaseEdgeGroupCase",
@@ -580,6 +631,8 @@ __all__ = [
580
631
  "UsageDetails",
581
632
  "UserInputRequiredException",
582
633
  "ValidationTypeEnum",
634
+ "VectorStoreCollectionDefinition",
635
+ "VectorStoreField",
583
636
  "Workflow",
584
637
  "WorkflowAgent",
585
638
  "WorkflowBuilder",
@@ -593,6 +646,7 @@ __all__ = [
593
646
  "WorkflowEventType",
594
647
  "WorkflowException",
595
648
  "WorkflowExecutor",
649
+ "WorkflowInvocationKwargs",
596
650
  "WorkflowMessage",
597
651
  "WorkflowRunResult",
598
652
  "WorkflowRunState",
@@ -613,6 +667,7 @@ __all__ = [
613
667
  "create_always_approve_tool_with_arguments_response",
614
668
  "create_edge_runner",
615
669
  "create_harness_agent",
670
+ "create_vector_search_tool",
616
671
  "detect_media_type_from_base64",
617
672
  "enqueue_messages",
618
673
  "evaluate_agent",
@@ -636,6 +691,7 @@ __all__ = [
636
691
  "prepend_instructions_to_messages",
637
692
  "register_checkpoint_type",
638
693
  "register_state_type",
694
+ "register_vectorstoremodel",
639
695
  "resolve_agent_id",
640
696
  "response_handler",
641
697
  "set_agent_mode",
@@ -650,6 +706,7 @@ __all__ = [
650
706
  "validate_tool_mode",
651
707
  "validate_tools",
652
708
  "validate_workflow_graph",
709
+ "vectorstoremodel",
653
710
  "workflow",
654
711
  ]
655
712
 
@@ -123,6 +123,7 @@ from ._harness._tool_approval import (
123
123
  create_always_approve_tool_response,
124
124
  create_always_approve_tool_with_arguments_response,
125
125
  )
126
+ from ._in_memory import InMemoryCollection, InMemoryStore
126
127
  from ._mcp import (
127
128
  MCPStdioTool,
128
129
  MCPStreamableHTTPTool,
@@ -250,6 +251,27 @@ from ._types import (
250
251
  validate_tool_mode,
251
252
  validate_tools,
252
253
  )
254
+ from ._vector_filters import Filter, FilterGroup, FilterGroupOperator, FilterOperator, Param
255
+ from ._vectors import (
256
+ DISTANCE_FUNCTION_DIRECTION_HELPER,
257
+ BaseVectorCollection,
258
+ BaseVectorSearch,
259
+ BaseVectorStore,
260
+ DistanceFunction,
261
+ FieldTypes,
262
+ GenerateVectors,
263
+ IndexKind,
264
+ SearchResponse,
265
+ SearchResults,
266
+ SearchType,
267
+ SupportsVectorSearch,
268
+ SupportsVectorUpsert,
269
+ VectorStoreCollectionDefinition,
270
+ VectorStoreField,
271
+ create_vector_search_tool,
272
+ register_vectorstoremodel,
273
+ vectorstoremodel,
274
+ )
253
275
  from ._workflows._agent import WorkflowAgent
254
276
  from ._workflows._agent_executor import AgentExecutor, AgentExecutorRequest, AgentExecutorResponse
255
277
  from ._workflows._agent_utils import resolve_agent_id
@@ -306,7 +328,7 @@ from ._workflows._validation import (
306
328
  validate_workflow_graph,
307
329
  )
308
330
  from ._workflows._viz import WorkflowViz
309
- from ._workflows._workflow import Workflow, WorkflowRunResult
331
+ from ._workflows._workflow import Workflow, WorkflowInvocationKwargs, WorkflowRunResult
310
332
  from ._workflows._workflow_builder import WorkflowBuilder
311
333
  from ._workflows._workflow_context import WorkflowContext
312
334
  from ._workflows._workflow_executor import SubWorkflowRequestMessage, SubWorkflowResponseMessage, WorkflowExecutor
@@ -335,6 +357,7 @@ __all__ = [
335
357
  "DEFAULT_MODE_SOURCE_ID",
336
358
  "DEFAULT_TODO_SOURCE_ID",
337
359
  "DEFAULT_TOOL_APPROVAL_SOURCE_ID",
360
+ "DISTANCE_FUNCTION_DIRECTION_HELPER",
338
361
  "EXCLUDED_KEY",
339
362
  "EXCLUDE_REASON_KEY",
340
363
  "GROUP_ANNOTATION_KEY",
@@ -376,6 +399,9 @@ __all__ = [
376
399
  "BaseAgent",
377
400
  "BaseChatClient",
378
401
  "BaseEmbeddingClient",
402
+ "BaseVectorCollection",
403
+ "BaseVectorSearch",
404
+ "BaseVectorStore",
379
405
  "CachingSkillsSource",
380
406
  "Case",
381
407
  "CharacterEstimatorTokenizer",
@@ -402,6 +428,7 @@ __all__ = [
402
428
  "DeduplicatingSkillsSource",
403
429
  "Default",
404
430
  "DelegatingSkillsSource",
431
+ "DistanceFunction",
405
432
  "Edge",
406
433
  "EdgeCondition",
407
434
  "EdgeDuplicationError",
@@ -420,6 +447,7 @@ __all__ = [
420
447
  "ExperimentalFeature",
421
448
  "FanInEdgeGroup",
422
449
  "FanOutEdgeGroup",
450
+ "FieldTypes",
423
451
  "FileAccessProvider",
424
452
  "FileCheckpointStorage",
425
453
  "FileHistoryProvider",
@@ -432,6 +460,10 @@ __all__ = [
432
460
  "FileSkillsSource",
433
461
  "FileStoreEntry",
434
462
  "FileSystemAgentFileStore",
463
+ "Filter",
464
+ "FilterGroup",
465
+ "FilterGroupOperator",
466
+ "FilterOperator",
435
467
  "FilteringSkillsSource",
436
468
  "FinalT",
437
469
  "FinishReason",
@@ -446,14 +478,18 @@ __all__ = [
446
478
  "FunctionalWorkflow",
447
479
  "FunctionalWorkflowAgent",
448
480
  "FunctionalWorkflowDefinition",
481
+ "GenerateVectors",
449
482
  "GeneratedEmbeddings",
450
483
  "GraphConnectivityError",
451
484
  "HistoryProvider",
452
485
  "InMemoryAgentFileStore",
453
486
  "InMemoryCheckpointStorage",
487
+ "InMemoryCollection",
454
488
  "InMemoryHistoryProvider",
455
489
  "InMemorySkillsSource",
490
+ "InMemoryStore",
456
491
  "InProcRunnerContext",
492
+ "IndexKind",
457
493
  "InlineSkill",
458
494
  "InlineSkillResource",
459
495
  "InlineSkillScript",
@@ -481,6 +517,7 @@ __all__ = [
481
517
  "MiddlewareTypes",
482
518
  "OuterFinalT",
483
519
  "OuterUpdateT",
520
+ "Param",
484
521
  "RawAgent",
485
522
  "ReleaseCandidateFeature",
486
523
  "ResponseStream",
@@ -491,6 +528,9 @@ __all__ = [
491
528
  "Runner",
492
529
  "RunnerContext",
493
530
  "SamplingApprovalCallback",
531
+ "SearchResponse",
532
+ "SearchResults",
533
+ "SearchType",
494
534
  "SecretString",
495
535
  "SelectiveToolCallCompactionStrategy",
496
536
  "ServiceSessionId",
@@ -519,6 +559,8 @@ __all__ = [
519
559
  "SupportsImageGenerationTool",
520
560
  "SupportsMCPTool",
521
561
  "SupportsShellTool",
562
+ "SupportsVectorSearch",
563
+ "SupportsVectorUpsert",
522
564
  "SupportsWebSearchTool",
523
565
  "SwitchCaseEdgeGroup",
524
566
  "SwitchCaseEdgeGroupCase",
@@ -544,6 +586,8 @@ __all__ = [
544
586
  "UsageDetails",
545
587
  "UserInputRequiredException",
546
588
  "ValidationTypeEnum",
589
+ "VectorStoreCollectionDefinition",
590
+ "VectorStoreField",
547
591
  "Workflow",
548
592
  "WorkflowAgent",
549
593
  "WorkflowBuilder",
@@ -557,6 +601,7 @@ __all__ = [
557
601
  "WorkflowEventType",
558
602
  "WorkflowException",
559
603
  "WorkflowExecutor",
604
+ "WorkflowInvocationKwargs",
560
605
  "WorkflowMessage",
561
606
  "WorkflowRunResult",
562
607
  "WorkflowRunState",
@@ -577,6 +622,7 @@ __all__ = [
577
622
  "create_always_approve_tool_with_arguments_response",
578
623
  "create_edge_runner",
579
624
  "create_harness_agent",
625
+ "create_vector_search_tool",
580
626
  "detect_media_type_from_base64",
581
627
  "enqueue_messages",
582
628
  "evaluate_agent",
@@ -600,6 +646,7 @@ __all__ = [
600
646
  "prepend_instructions_to_messages",
601
647
  "register_checkpoint_type",
602
648
  "register_state_type",
649
+ "register_vectorstoremodel",
603
650
  "resolve_agent_id",
604
651
  "response_handler",
605
652
  "set_agent_mode",
@@ -614,5 +661,6 @@ __all__ = [
614
661
  "validate_tool_mode",
615
662
  "validate_tools",
616
663
  "validate_workflow_graph",
664
+ "vectorstoremodel",
617
665
  "workflow",
618
666
  ]
@@ -1198,12 +1198,123 @@ def _tool_result_text(value: Any) -> str:
1198
1198
  if text_parts:
1199
1199
  return "\n".join(text_parts)
1200
1200
  if isinstance(value, Mapping):
1201
- return json.dumps(cast(Mapping[str, object], value), ensure_ascii=False)
1201
+ try:
1202
+ return json.dumps(cast(Mapping[str, object], value), ensure_ascii=False, default=str)
1203
+ except (TypeError, ValueError):
1204
+ return str(cast(object, value))
1202
1205
  return str(cast(object, value))
1203
1206
 
1204
1207
 
1208
+ def _format_summary_item_metadata(item: Content) -> str:
1209
+ """Render safe metadata for non-text rich result items.
1210
+
1211
+ Never embeds binary payloads: data contents carry their bytes as a
1212
+ base64 data URI and are represented by media type and path only.
1213
+ """
1214
+ details: list[str] = []
1215
+ if item.media_type:
1216
+ details.append(f"media_type={item.media_type}")
1217
+ if item.type == "uri" and item.uri:
1218
+ details.append(f"uri={item.uri}")
1219
+ if item.type == "data":
1220
+ path = item.additional_properties.get("path")
1221
+ if isinstance(path, str) and path:
1222
+ details.append(f"path={path}")
1223
+ if item.file_id:
1224
+ details.append(f"file_id={item.file_id}")
1225
+ if item.name:
1226
+ details.append(f"name={item.name}")
1227
+ return f"{item.type} content" + (f" ({', '.join(details)})" if details else "")
1228
+
1229
+
1230
+ def _format_summary_result_items(items: Sequence[Content]) -> str:
1231
+ """Render function_result items (text and error contents) for the summarizer transcript.
1232
+
1233
+ Rich results store their payload in ``items`` (for example the error
1234
+ contents emitted by Monty and Hyperlight) while ``result`` only carries
1235
+ the concatenated text. Returns an empty string when nothing is renderable
1236
+ so callers can fall back to ``result``.
1237
+ """
1238
+ parts: list[str] = []
1239
+ for item in items:
1240
+ if item.type == "text" and item.text:
1241
+ parts.append(item.text)
1242
+ elif item.type == "error":
1243
+ label = item.message or ""
1244
+ if item.error_details:
1245
+ label = f"{label}: {item.error_details}" if label else item.error_details
1246
+ if item.error_code:
1247
+ label = f"error({item.error_code}): {label}"
1248
+ if label:
1249
+ parts.append(label)
1250
+ else:
1251
+ label = _format_summary_item_metadata(item)
1252
+ if label:
1253
+ parts.append(label)
1254
+ return "\n".join(parts)
1255
+
1256
+
1257
+ def _format_summary_content(content: Content) -> str:
1258
+ """Render one content item for the summarizer input transcript.
1259
+
1260
+ Tool calls and results are rendered with their name, arguments, result
1261
+ text, and call id so the summarizer sees the tool trajectory instead of a
1262
+ bare content type. Text contents are aggregated via ``Message.text``
1263
+ instead. Returns an empty string when the item has no structured rendering
1264
+ of its own, so callers can fall back to the legacy rendering.
1265
+ """
1266
+ if content.type == "function_call":
1267
+ arguments = _tool_result_text(content.arguments) if content.arguments is not None else ""
1268
+ call = f"function_call {content.name or ''}({arguments})"
1269
+ if content.call_id:
1270
+ call += f" [call_id={content.call_id}]"
1271
+ return call
1272
+ if content.type == "function_result":
1273
+ result_text = _format_summary_result_items(content.items) if content.items else ""
1274
+ if not result_text:
1275
+ result_text = _tool_result_text(content.result) if content.result is not None else "no result"
1276
+ if content.exception:
1277
+ result_text = f"error({content.exception}): {result_text}"
1278
+ call_id_suffix = f" [call_id={content.call_id}]" if content.call_id else ""
1279
+ return f"function_result: {result_text}{call_id_suffix}"
1280
+ if content.type == "mcp_server_tool_call":
1281
+ arguments = _tool_result_text(content.arguments) if content.arguments is not None else ""
1282
+ call = f"mcp_tool_call {content.tool_name or ''}({arguments})"
1283
+ if content.call_id:
1284
+ call += f" [call_id={content.call_id}]"
1285
+ return call
1286
+ if content.type == "mcp_server_tool_result":
1287
+ result_text = _tool_result_text(content.output)
1288
+ if content.exception:
1289
+ result_text = f"error({content.exception}): {result_text}"
1290
+ call_id_suffix = f" [call_id={content.call_id}]" if content.call_id else ""
1291
+ return f"mcp_tool_result: {result_text}{call_id_suffix}"
1292
+ if content.type in ("function_approval_request", "function_approval_response"):
1293
+ nested_call = content.function_call
1294
+ name = "" if nested_call is None else nested_call.name or nested_call.tool_name or ""
1295
+ label = "approval_request" if content.type == "function_approval_request" else "approval_response"
1296
+ rendered = f"{label}: {name} [id={content.id}]"
1297
+ if content.type == "function_approval_response":
1298
+ rendered += f" approved={content.approved}"
1299
+ return rendered
1300
+ return ""
1301
+
1302
+
1205
1303
  def _format_summary_message(index: int, message: Message) -> str:
1206
- content_text = message.text
1304
+ parts: list[str] = []
1305
+ pending_text: list[str] = []
1306
+ for content in message.contents:
1307
+ rendered = _format_summary_content(content)
1308
+ if rendered:
1309
+ if pending_text:
1310
+ parts.append(" ".join(pending_text))
1311
+ pending_text = []
1312
+ parts.append(rendered)
1313
+ elif content.type == "text" and content.text:
1314
+ pending_text.append(content.text)
1315
+ if pending_text:
1316
+ parts.append(" ".join(pending_text))
1317
+ content_text = "; ".join(parts)
1207
1318
  if not content_text:
1208
1319
  content_text = ", ".join(content.type for content in message.contents)
1209
1320
  return f"{index}. [{message.role}] {content_text}"