agent-framework-lib 0.8.2__tar.gz → 0.8.2.post2__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.
- {agent_framework_lib-0.8.2/agent_framework_lib.egg-info → agent_framework_lib-0.8.2.post2}/PKG-INFO +1 -1
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/__init__.py +47 -66
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/a2a/base.py +4 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/a2a/endpoints/agent_card_builder.py +0 -1
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/a2a/endpoints/agent_card_skill_builder.py +62 -30
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/a2a/endpoints/jsonrpc_dispatcher.py +18 -6
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/a2a/endpoints/sse_wrapper.py +6 -14
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/a2a/endpoints/translation_layer.py +17 -8
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/a2a/models.py +10 -6
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/a2a/providers/__init__.py +2 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/a2a/providers/elasticsearch_provider.py +11 -10
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/a2a/providers/postgres_provider.py +2 -5
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/capabilities/resolver.py +2 -6
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/activity_formatter.py +1 -3
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/agent_interface.py +0 -1
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/agent_provider.py +3 -8
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/base_agent.py +17 -15
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/context_budget.py +67 -58
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/context_summarizer.py +31 -24
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/implementation_validator.py +135 -118
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/knowledge_state.py +2 -6
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/loop_detector.py +8 -20
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/model_clients.py +325 -294
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/model_config.py +221 -202
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/model_router.py +4 -4
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/scratchpad_compressor.py +55 -39
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/state_manager.py +104 -83
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/step_display_config.py +3 -5
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/implementations/budget_aware_agent.py +10 -16
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/implementations/llamaindex_agent.py +64 -33
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/implementations/llamaindex_memory_adapter.py +177 -155
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/implementations/microsoft_agent.py +78 -73
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/memory/__init__.py +4 -10
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/memory/agent_mixin.py +43 -45
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/memory/base.py +36 -43
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/memory/manager.py +86 -117
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/memory/personalization.py +4 -12
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/memory/providers/__init__.py +2 -2
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/memory/providers/graphiti_provider.py +8 -8
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/memory/providers/memori_provider.py +45 -62
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/memory/tools.py +11 -20
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/elasticsearch_circuit_breaker.py +41 -48
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/elasticsearch_logging.py +105 -96
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/error_handling.py +268 -222
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/error_logging.py +184 -179
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/llm_auto_instrumentor.py +2 -6
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/observability_manager.py +1 -2
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/otel_logging_handler.py +10 -15
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/otel_metrics_recorder.py +13 -1
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/performance_monitor.py +251 -213
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/progress_tracker.py +128 -111
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/resource_manager.py +143 -91
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/streaming_latency_tracer.py +5 -6
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/token_counter.py +4 -3
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/processing/ai_content_management.py +402 -381
- agent_framework_lib-0.8.2.post2/agent_framework/processing/markdown_converter.py +1165 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/processing/multimodal_integration.py +183 -161
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/session/elasticsearch_session_storage.py +1 -3
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/agent_mixin.py +1 -3
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/base.py +1 -1
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/scripts/create_and_register.py +1 -3
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/scripts/register_to_storage.py +24 -5
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/chart/chart_to_image.py +2 -6
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/code_format/format_python.py +3 -5
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/csv/create_csv.py +1 -5
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/csv/read_csv.py +3 -7
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/csv/transform_csv.py +7 -17
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/data_format/json_to_yaml.py +2 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/data_format/yaml_to_json.py +2 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/drawio/create_drawio.py +1 -3
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/excel/create_excel.py +4 -1
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/file/create_file.py +1 -3
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/file/list_files.py +8 -6
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/file/read_file.py +4 -10
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/file_access/download_to_local.py +9 -5
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/image_gen/create_image.py +33 -49
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/image_gen/generate_image.py +25 -15
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/mermaid/mermaid_to_image.py +5 -12
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/powerpoint/create_powerpoint.py +30 -52
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/table/table_to_image.py +2 -6
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/unified_pdf/create_pdf.py +1 -3
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/word/create_word.py +20 -17
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/custom_skill_manager.py +5 -4
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/discovery_prompt.py +19 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/markdown_loader.py +11 -11
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/storage/__init__.py +16 -16
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/storage/file_storages.py +21 -10
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/storage/file_system_management.py +1146 -940
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/storage/storage_optimizer.py +158 -151
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/subagents/executor.py +55 -43
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/subagents/retrigger.py +12 -12
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/subagents/spawn_tool.py +2 -6
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/tools/base.py +24 -23
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/tools/html_content_analyzer.py +3 -5
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/tools/multimodal_tools.py +212 -165
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/tools/shell_tool.py +2 -6
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/tools/web_search_tool.py +6 -4
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/utils/__init__.py +12 -12
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/utils/path_utils.py +83 -73
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/utils/session_title_generator.py +1 -1
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/utils/special_blocks.py +31 -27
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/admin_models.py +1 -3
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/admin_services.py +1 -3
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/examples/agent_example_multi_skills.py +2 -3
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/examples/agent_with_file_storage.py +30 -35
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2/agent_framework/web/docs}/examples/agent_with_mcp.py +42 -52
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/examples/agent_with_memory.py +70 -85
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/examples/agent_with_memory_hybrid.py +2 -4
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2/agent_framework/web/docs}/examples/custom_framework_agent.py +315 -320
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/documentation_generator.py +129 -139
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/gitnexus_client.py +39 -63
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/helper_agent.py +53 -43
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/otel_tracing_middleware.py +20 -14
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/server.py +35 -30
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/skills_router.py +2 -6
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/workspace/artefacts.py +7 -5
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/workspace/client.py +45 -9
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/workspace/context.py +3 -9
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/workspace/cursor.py +4 -4
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/workspace/poller.py +16 -5
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/workspace/router.py +76 -29
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/workspace/session.py +15 -12
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2/agent_framework_lib.egg-info}/PKG-INFO +1 -1
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework_lib.egg-info/SOURCES.txt +0 -1
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/examples/agent_example_multi_skills.py +2 -3
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/examples/agent_exemple_test.py +5 -7
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/examples/agent_training_with_apo.py +67 -75
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/examples/agent_with_file_storage.py +30 -35
- {agent_framework_lib-0.8.2/agent_framework/web/docs → agent_framework_lib-0.8.2.post2}/examples/agent_with_mcp.py +42 -52
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/examples/agent_with_memory_hybrid.py +2 -4
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/examples/biagenttest.py +55 -45
- {agent_framework_lib-0.8.2/agent_framework/web/docs → agent_framework_lib-0.8.2.post2}/examples/custom_framework_agent.py +315 -320
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/examples/workspace_test_agent.py +1 -1
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/pyproject.toml +1 -1
- agent_framework_lib-0.8.2/agent_framework/chart_generation/llm_refinement_loop.py +0 -425
- agent_framework_lib-0.8.2/agent_framework/processing/markdown_converter.py +0 -978
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/ARCHITECTURE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/LICENSE +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/MANIFEST.in +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/README.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/a2a/__init__.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/a2a/endpoints/__init__.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/a2a/endpoints/a2a_router.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/a2a/endpoints/models_jsonrpc.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/capabilities/__init__.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/__init__.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/elasticsearch_config_provider.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/models.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/provider_calibration.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/core/streaming_parts_accumulator.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/implementations/__init__.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/memory/config.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/__init__.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/api_timing_tracker.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/llm_metrics.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/llm_metrics_collector.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/llm_metrics_extractor.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/metrics_aggregator.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/metrics_config.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/otel_instrumentor.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/otel_setup.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/resource_metrics_collector.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/timing_tracker.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/monitoring/tracing_context.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/notifications/__init__.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/notifications/hub.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/processing/__init__.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/processing/rich_content_validation.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/py.typed +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/session/__init__.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/session/session_storage.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/__init__.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/__init__.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/scripts/__init__.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/chart/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/code_format/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/csv/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/data_format/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/drawio/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/email_template/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/excel/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/file/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/file_access/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/file_access/get_file_path.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/form/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/image_display/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/image_gen/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/mermaid/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/multimodal/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/optionsblock/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/powerpoint/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/skill_creator/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/table/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/unified_pdf/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/web_news_search/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/web_news_search/web_news_search.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/builtin/skills/word/SKILL.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/skills/tools.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/subagents/__init__.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/subagents/message_injector.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/subagents/message_queue.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/tools/__init__.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/tools/activity_callback.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/tools/adaptive_pdf_css.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/tools/pdf_image_scaler.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/tools/sizing_config.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/tools/web_fetch_tool.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/utils/post_install.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/utils/source_detector.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/__init__.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/admin_auth.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/admin_router.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/api_timing_middleware.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/A2A_GUIDE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/BUILTIN_SKILLS_REFERENCE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/CREATING_AGENTS.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/CUSTOM_SKILLS_GUIDE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/DOCKER_SETUP.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/Dockerfile +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/GETTING_STARTED.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/GITNEXUS_USER_GUIDE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/MEMORY_INSTALLATION.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/README.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/TOOLS_AND_MCP_GUIDE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/WORKSPACE_INTEGRATION.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/api-reference.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/configuration.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/docker-compose.yml +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/examples/agent_with_memory_graphiti.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/examples/agent_with_memory_simple.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/examples/simple_agent.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/examples/skills_demo_agent.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/docs/installation-guide.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/helper_ui.html +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/modern_ui.html +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/observability/kibana-llm-dashboard-setup.json +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/observability/kibana-resource-metrics-dashboard.json +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/web/test_app.html +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/workspace/__init__.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/workspace/config.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/workspace/memory.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/workspace/models.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/workspace/preferences.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework/workspace/subscription.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework_lib.egg-info/dependency_links.txt +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework_lib.egg-info/entry_points.txt +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework_lib.egg-info/requires.txt +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/agent_framework_lib.egg-info/top_level.txt +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/A2A_GUIDE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/ACTIVITY_OUTPUT_PART.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/ARCHITECTURE_DIAGRAM.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/BUILTIN_SKILLS_REFERENCE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/CONCURRENCE_VS_PARALLELISME_GUIDE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/CREATING_AGENTS.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/CUSTOM_SKILLS_GUIDE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/DOCKER_SETUP.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/ELASTICSEARCH_DATA_STRUCTURES.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/FILE_DOWNLOAD_LINKS.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/FILE_STORAGE_GUIDE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/GETTING_STARTED.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/GITNEXUS_USER_GUIDE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/HISTORY_MESSAGE_FORMAT.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/IMPLEMENTATION_GUIDE_NEW_AGENT.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/MEMORY_INSTALLATION.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/MODIFICATIONS_CONCURRENCE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/MULTIMODAL_TOOLS_GUIDE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/OBSERVABILITY_GUIDE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/PYPI_PUBLISHING.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/QA_STREAMING_LATENCY.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/SCREENSHOTS_GUIDE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/SPEC_CROSS_MODEL_HISTORY_CONVERSION.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/SSE_NOTIFICATIONS_GUIDE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/STREAMING_EVENTS_FRONTEND.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/TOOLS_AND_MCP_GUIDE.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/WORKSPACE_INTEGRATION.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/api-reference.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/configuration.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/framework_audit_remarques.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/index.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/docs/installation-guide.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/examples/README.md +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/examples/agent_context_budget_test.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/examples/agent_with_custom_tools_file_storage.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/examples/agent_with_memory_graphiti.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/examples/agent_with_memory_simple.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/examples/agent_with_personalization.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/examples/dependencies/docker-compose.yaml +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/examples/pyproject.toml +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/examples/simple_agent.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/examples/skills_demo_agent.py +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/setup.cfg +0 -0
- {agent_framework_lib-0.8.2 → agent_framework_lib-0.8.2.post2}/setup.py +0 -0
{agent_framework_lib-0.8.2/agent_framework_lib.egg-info → agent_framework_lib-0.8.2.post2}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agent-framework-lib
|
|
3
|
-
Version: 0.8.2
|
|
3
|
+
Version: 0.8.2.post2
|
|
4
4
|
Summary: A comprehensive Python framework for building and serving conversational AI agents with FastAPI
|
|
5
5
|
Author-email: Sebastian Pavel <sebastian@cinco.ai>, Elliott Girard <elliott.girard@icloud.com>
|
|
6
6
|
Maintainer-email: Sebastian Pavel <sebastian@cinco.ai>
|
|
@@ -23,11 +23,11 @@ Key Components:
|
|
|
23
23
|
Example Usage:
|
|
24
24
|
```python
|
|
25
25
|
from agent_framework import AgentInterface, create_basic_agent_server
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
class MyAgent(AgentInterface):
|
|
28
28
|
async def handle_message(self, session_id: str, agent_input):
|
|
29
29
|
return StructuredAgentOutput(response_text="Hello!")
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
# Start server
|
|
32
32
|
create_basic_agent_server(MyAgent, port=8000)
|
|
33
33
|
```
|
|
@@ -48,29 +48,29 @@ logger = logging.getLogger(__name__)
|
|
|
48
48
|
def _auto_setup_dependencies() -> None:
|
|
49
49
|
"""
|
|
50
50
|
Automatically check and install required dependencies at import time.
|
|
51
|
-
|
|
51
|
+
|
|
52
52
|
This runs synchronously when the package is first imported, ensuring
|
|
53
53
|
Playwright browsers and Deno are available before any async tools try to use them.
|
|
54
|
-
|
|
54
|
+
|
|
55
55
|
Set AGENT_FRAMEWORK_SKIP_AUTO_SETUP=1 to disable this behavior.
|
|
56
56
|
"""
|
|
57
57
|
if os.environ.get("AGENT_FRAMEWORK_SKIP_AUTO_SETUP", "").lower() in ("1", "true", "yes"):
|
|
58
58
|
return
|
|
59
|
-
|
|
59
|
+
|
|
60
60
|
# Only run once per process
|
|
61
61
|
global _AUTO_SETUP_DONE
|
|
62
62
|
if "_AUTO_SETUP_DONE" in globals() and _AUTO_SETUP_DONE:
|
|
63
63
|
return
|
|
64
64
|
_AUTO_SETUP_DONE = True
|
|
65
|
-
|
|
65
|
+
|
|
66
66
|
try:
|
|
67
67
|
from .utils.post_install import ensure_playwright_browsers, ensure_deno
|
|
68
|
-
|
|
68
|
+
|
|
69
69
|
# Check/install Playwright (silent if already installed)
|
|
70
70
|
success, error = ensure_playwright_browsers()
|
|
71
71
|
if not success and error:
|
|
72
72
|
logger.warning(f"Playwright setup: {error}")
|
|
73
|
-
|
|
73
|
+
|
|
74
74
|
# Check/install Deno (silent if already installed)
|
|
75
75
|
success, message, deno_path = ensure_deno()
|
|
76
76
|
if not success and message:
|
|
@@ -79,7 +79,7 @@ def _auto_setup_dependencies() -> None:
|
|
|
79
79
|
# Success but with PATH instructions
|
|
80
80
|
logger.info(f"Deno: {message}")
|
|
81
81
|
logger.info(f"Deno will be available via: {deno_path}")
|
|
82
|
-
|
|
82
|
+
|
|
83
83
|
except Exception as e:
|
|
84
84
|
# Don't fail the import if setup fails - tools will show errors when used
|
|
85
85
|
logger.debug(f"Auto-setup skipped: {e}")
|
|
@@ -157,19 +157,19 @@ from .session.session_storage import (
|
|
|
157
157
|
|
|
158
158
|
# File system management (consolidated)
|
|
159
159
|
from .storage.file_system_management import (
|
|
160
|
-
FileStorageManager,
|
|
161
|
-
FileStorageFactory,
|
|
160
|
+
FileStorageManager,
|
|
161
|
+
FileStorageFactory,
|
|
162
162
|
process_file_inputs,
|
|
163
163
|
process_response_file_links,
|
|
164
164
|
get_download_url,
|
|
165
|
-
get_file_processing_summary,
|
|
166
|
-
FileInputMixin
|
|
165
|
+
get_file_processing_summary,
|
|
166
|
+
FileInputMixin,
|
|
167
167
|
)
|
|
168
168
|
from .storage.file_storages import (
|
|
169
169
|
FileStorageInterface,
|
|
170
170
|
MetadataStorageInterface,
|
|
171
|
-
FileMetadata,
|
|
172
|
-
LocalFileStorage
|
|
171
|
+
FileMetadata,
|
|
172
|
+
LocalFileStorage,
|
|
173
173
|
)
|
|
174
174
|
|
|
175
175
|
# Optional file storage backends (only available if dependencies are installed)
|
|
@@ -196,13 +196,11 @@ __all__ = [
|
|
|
196
196
|
# Version info
|
|
197
197
|
"__version__",
|
|
198
198
|
"__author__",
|
|
199
|
-
|
|
200
199
|
# Core interfaces
|
|
201
200
|
"AgentInterface",
|
|
202
|
-
"StructuredAgentInput",
|
|
201
|
+
"StructuredAgentInput",
|
|
203
202
|
"StructuredAgentOutput",
|
|
204
203
|
"AgentConfig",
|
|
205
|
-
|
|
206
204
|
# Base implementations
|
|
207
205
|
"BaseAgent",
|
|
208
206
|
"LlamaIndexAgent",
|
|
@@ -210,16 +208,15 @@ __all__ = [
|
|
|
210
208
|
"StateManager",
|
|
211
209
|
"AgentIdentity",
|
|
212
210
|
"AgentManager",
|
|
213
|
-
|
|
214
211
|
# Input/Output types
|
|
215
212
|
"TextInputPart",
|
|
216
|
-
"ImageUrlInputPart",
|
|
213
|
+
"ImageUrlInputPart",
|
|
217
214
|
"FileDataInputPart",
|
|
218
215
|
"AgentInputPartUnion",
|
|
219
216
|
"TextOutputPart",
|
|
220
217
|
"TextOutputStreamPart",
|
|
221
218
|
"JsonOutputPart",
|
|
222
|
-
"YamlOutputPart",
|
|
219
|
+
"YamlOutputPart",
|
|
223
220
|
"FileContentOutputPart",
|
|
224
221
|
"FileReferenceInputPart",
|
|
225
222
|
"FileReferenceOutputPart",
|
|
@@ -231,87 +228,77 @@ __all__ = [
|
|
|
231
228
|
"FileDownloadLinkOutputPart",
|
|
232
229
|
"ImageOutputPart",
|
|
233
230
|
"AgentOutputPartUnion",
|
|
234
|
-
|
|
235
231
|
# Utility functions
|
|
236
232
|
"consolidate_text_parts",
|
|
237
233
|
"strip_technical_details",
|
|
238
|
-
|
|
239
234
|
# Model configuration
|
|
240
235
|
"ModelConfigManager",
|
|
241
|
-
"ModelProvider",
|
|
236
|
+
"ModelProvider",
|
|
242
237
|
"model_config",
|
|
243
238
|
"ModelClientFactory",
|
|
244
239
|
"client_factory",
|
|
245
|
-
|
|
246
240
|
# Session storage
|
|
247
241
|
"SessionStorageInterface",
|
|
248
242
|
"SessionStorageFactory",
|
|
249
243
|
"SessionData",
|
|
250
244
|
"MessageData",
|
|
251
|
-
"MessageInsight",
|
|
245
|
+
"MessageInsight",
|
|
252
246
|
"MessageMetadata",
|
|
253
247
|
"AgentLifecycleData",
|
|
254
248
|
"MemorySessionStorage",
|
|
255
249
|
"MongoDBSessionStorage",
|
|
256
250
|
"history_message_to_message_data",
|
|
257
251
|
"message_data_to_history_message",
|
|
258
|
-
|
|
259
252
|
# File storage implementations (consolidated)
|
|
260
253
|
"FileStorageInterface",
|
|
261
254
|
"MetadataStorageInterface",
|
|
262
|
-
"FileMetadata",
|
|
255
|
+
"FileMetadata",
|
|
263
256
|
"LocalFileStorage",
|
|
264
257
|
"S3FileStorage",
|
|
265
258
|
"MinIOFileStorage",
|
|
266
259
|
"S3_AVAILABLE",
|
|
267
260
|
"MINIO_AVAILABLE",
|
|
268
|
-
|
|
269
261
|
# File system management (consolidated)
|
|
270
262
|
"FileStorageManager",
|
|
271
|
-
"FileStorageFactory",
|
|
263
|
+
"FileStorageFactory",
|
|
272
264
|
"process_file_inputs",
|
|
273
265
|
"get_file_processing_summary",
|
|
274
266
|
"FileInputMixin",
|
|
275
|
-
|
|
276
267
|
# Server
|
|
277
268
|
"app",
|
|
278
269
|
"start_server",
|
|
279
|
-
|
|
280
270
|
# Utilities
|
|
281
271
|
"get_deno_command",
|
|
282
|
-
|
|
283
272
|
# Convenience functions
|
|
284
273
|
"create_basic_agent_server",
|
|
285
274
|
]
|
|
286
275
|
|
|
276
|
+
|
|
287
277
|
# Quick start function for convenience
|
|
288
278
|
def create_basic_agent_server(
|
|
289
|
-
agent_class: type[AgentInterface],
|
|
290
|
-
host: str = "0.0.0.0",
|
|
291
|
-
port: int = 8000,
|
|
292
|
-
reload: bool = False
|
|
279
|
+
agent_class: type[AgentInterface], host: str = "0.0.0.0", port: int = 8000, reload: bool = False
|
|
293
280
|
) -> None:
|
|
294
281
|
"""
|
|
295
282
|
Quick start function to create and run an agent server.
|
|
296
|
-
|
|
283
|
+
|
|
297
284
|
This function allows external projects to quickly start an agent server
|
|
298
285
|
without needing to create their own server.py file or set environment variables.
|
|
299
|
-
|
|
286
|
+
|
|
300
287
|
Args:
|
|
301
288
|
agent_class: The agent class that implements AgentInterface
|
|
302
289
|
host: Host to bind the server to (default: "0.0.0.0")
|
|
303
290
|
port: Port to run the server on (default: 8000)
|
|
304
291
|
reload: Whether to enable auto-reload for development (default: False)
|
|
305
|
-
Note: When reload=True, the agent class is temporarily stored in an
|
|
292
|
+
Note: When reload=True, the agent class is temporarily stored in an
|
|
306
293
|
environment variable to survive module reloads.
|
|
307
|
-
|
|
294
|
+
|
|
308
295
|
Returns:
|
|
309
296
|
None (starts the server and blocks)
|
|
310
|
-
|
|
297
|
+
|
|
311
298
|
Raises:
|
|
312
299
|
ImportError: If uvicorn is not available
|
|
313
300
|
ValueError: If agent_class does not implement AgentInterface
|
|
314
|
-
|
|
301
|
+
|
|
315
302
|
Example:
|
|
316
303
|
>>> from agent_framework import create_basic_agent_server, AgentInterface
|
|
317
304
|
>>> from my_agent import MyAgent
|
|
@@ -323,17 +310,16 @@ def create_basic_agent_server(
|
|
|
323
310
|
raise ImportError(
|
|
324
311
|
"uvicorn is required to run the server. Install it with: uv add uvicorn"
|
|
325
312
|
) from e
|
|
326
|
-
|
|
313
|
+
|
|
327
314
|
# Validate that agent_class implements AgentInterface
|
|
328
315
|
if not issubclass(agent_class, AgentInterface):
|
|
329
|
-
raise ValueError(
|
|
330
|
-
|
|
331
|
-
)
|
|
332
|
-
|
|
316
|
+
raise ValueError(f"agent_class must implement AgentInterface, got {agent_class.__name__}")
|
|
317
|
+
|
|
333
318
|
# Store the agent class globally for immediate use
|
|
334
319
|
from .web import server
|
|
320
|
+
|
|
335
321
|
server._GLOBAL_AGENT_CLASS = agent_class
|
|
336
|
-
|
|
322
|
+
|
|
337
323
|
# If reload is enabled, also store in environment variable to survive reloads
|
|
338
324
|
# We use the class's module and name to recreate the import path
|
|
339
325
|
if reload:
|
|
@@ -341,37 +327,32 @@ def create_basic_agent_server(
|
|
|
341
327
|
class_name = agent_class.__name__
|
|
342
328
|
agent_class_path = f"{module_name}:{class_name}"
|
|
343
329
|
os.environ["AGENT_CLASS_PATH"] = agent_class_path
|
|
344
|
-
logger.info(
|
|
345
|
-
|
|
346
|
-
|
|
330
|
+
logger.info(
|
|
331
|
+
f"[create_basic_agent_server] Reload enabled. Set AGENT_CLASS_PATH={agent_class_path}"
|
|
332
|
+
)
|
|
333
|
+
|
|
334
|
+
logger.info(
|
|
335
|
+
f"[create_basic_agent_server] Starting server for {agent_class.__name__} on {host}:{port}"
|
|
336
|
+
)
|
|
347
337
|
logger.info(f"[create_basic_agent_server] Reload: {reload}")
|
|
348
338
|
|
|
349
339
|
# Ensure AGENT_HOST and AGENT_PORT are in the environment so that
|
|
350
340
|
# subprocesses (e.g. skill scripts via ShellTool) can reach this server.
|
|
351
341
|
os.environ["AGENT_HOST"] = host
|
|
352
342
|
os.environ["AGENT_PORT"] = str(port)
|
|
353
|
-
|
|
343
|
+
|
|
354
344
|
# When reload=True, uvicorn requires an import string, not the app object directly
|
|
355
345
|
if reload:
|
|
356
346
|
# Use the agent_framework.web.server:app import string for reload mode
|
|
357
|
-
uvicorn.run(
|
|
358
|
-
"agent_framework.web.server:app",
|
|
359
|
-
host=host,
|
|
360
|
-
port=port,
|
|
361
|
-
reload=reload
|
|
362
|
-
)
|
|
347
|
+
uvicorn.run("agent_framework.web.server:app", host=host, port=port, reload=reload)
|
|
363
348
|
else:
|
|
364
349
|
# Import the app after setting the global variable for non-reload mode
|
|
365
350
|
from .web.server import app
|
|
351
|
+
|
|
366
352
|
# For non-reload mode, we can pass the app object directly
|
|
367
|
-
uvicorn.run(
|
|
368
|
-
app,
|
|
369
|
-
host=host,
|
|
370
|
-
port=port,
|
|
371
|
-
reload=reload
|
|
372
|
-
)
|
|
353
|
+
uvicorn.run(app, host=host, port=port, reload=reload)
|
|
373
354
|
|
|
374
355
|
|
|
375
356
|
# Run auto-setup when package is imported
|
|
376
357
|
# This ensures Playwright browsers and Deno are installed before any async tools need them
|
|
377
|
-
_auto_setup_dependencies()
|
|
358
|
+
_auto_setup_dependencies()
|
|
@@ -11,6 +11,7 @@ logger = logging.getLogger(__name__)
|
|
|
11
11
|
|
|
12
12
|
class A2ATaskProviderError(Exception):
|
|
13
13
|
"""Base exception for task provider errors."""
|
|
14
|
+
|
|
14
15
|
def __init__(self, message: str, code: int = -32603):
|
|
15
16
|
super().__init__(message)
|
|
16
17
|
self.code = code
|
|
@@ -18,6 +19,7 @@ class A2ATaskProviderError(Exception):
|
|
|
18
19
|
|
|
19
20
|
class TaskNotFoundError(A2ATaskProviderError):
|
|
20
21
|
"""Raised when a task ID is not found."""
|
|
22
|
+
|
|
21
23
|
def __init__(self, task_id: str):
|
|
22
24
|
super().__init__(f"Task not found: {task_id}", code=-32001)
|
|
23
25
|
self.task_id = task_id
|
|
@@ -25,6 +27,7 @@ class TaskNotFoundError(A2ATaskProviderError):
|
|
|
25
27
|
|
|
26
28
|
class TaskNotCancelableError(A2ATaskProviderError):
|
|
27
29
|
"""Raised when trying to cancel a task in a terminal state."""
|
|
30
|
+
|
|
28
31
|
def __init__(self, task_id: str, current_state: str):
|
|
29
32
|
super().__init__(
|
|
30
33
|
f"Task {task_id} is in terminal state '{current_state}' and cannot be canceled",
|
|
@@ -36,6 +39,7 @@ class TaskNotCancelableError(A2ATaskProviderError):
|
|
|
36
39
|
|
|
37
40
|
class TaskTerminalStateError(A2ATaskProviderError):
|
|
38
41
|
"""Raised when trying to update a task already in a terminal state."""
|
|
42
|
+
|
|
39
43
|
def __init__(self, task_id: str, current_state: str):
|
|
40
44
|
super().__init__(
|
|
41
45
|
f"Task {task_id} is in terminal state '{current_state}' and cannot be modified",
|
|
@@ -9,12 +9,42 @@ from typing import Any
|
|
|
9
9
|
|
|
10
10
|
logger = logging.getLogger(__name__)
|
|
11
11
|
|
|
12
|
-
_STOP_WORDS = frozenset(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
_STOP_WORDS = frozenset(
|
|
13
|
+
{
|
|
14
|
+
"the",
|
|
15
|
+
"and",
|
|
16
|
+
"for",
|
|
17
|
+
"with",
|
|
18
|
+
"from",
|
|
19
|
+
"that",
|
|
20
|
+
"this",
|
|
21
|
+
"are",
|
|
22
|
+
"was",
|
|
23
|
+
"will",
|
|
24
|
+
"can",
|
|
25
|
+
"has",
|
|
26
|
+
"have",
|
|
27
|
+
"been",
|
|
28
|
+
"not",
|
|
29
|
+
"but",
|
|
30
|
+
"all",
|
|
31
|
+
"any",
|
|
32
|
+
"each",
|
|
33
|
+
"more",
|
|
34
|
+
"also",
|
|
35
|
+
"into",
|
|
36
|
+
"over",
|
|
37
|
+
"such",
|
|
38
|
+
"than",
|
|
39
|
+
"its",
|
|
40
|
+
"about",
|
|
41
|
+
"between",
|
|
42
|
+
"through",
|
|
43
|
+
"during",
|
|
44
|
+
"before",
|
|
45
|
+
"after",
|
|
46
|
+
}
|
|
47
|
+
)
|
|
18
48
|
|
|
19
49
|
|
|
20
50
|
class AgentCardSkillBuilder:
|
|
@@ -85,12 +115,14 @@ class AgentCardSkillBuilder:
|
|
|
85
115
|
joined = "; ".join(descriptions)
|
|
86
116
|
description = self._truncate_description(joined, len(framework_skills))
|
|
87
117
|
|
|
88
|
-
return [
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
118
|
+
return [
|
|
119
|
+
{
|
|
120
|
+
"id": "framework-capabilities",
|
|
121
|
+
"name": "Framework Capabilities",
|
|
122
|
+
"description": description,
|
|
123
|
+
"tags": names,
|
|
124
|
+
}
|
|
125
|
+
]
|
|
94
126
|
except Exception:
|
|
95
127
|
logger.warning("Failed to build framework skill from registry")
|
|
96
128
|
return [self._make_default_framework_skill()]
|
|
@@ -108,12 +140,14 @@ class AgentCardSkillBuilder:
|
|
|
108
140
|
|
|
109
141
|
result = []
|
|
110
142
|
for server_key in mcp_params:
|
|
111
|
-
result.append(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
143
|
+
result.append(
|
|
144
|
+
{
|
|
145
|
+
"id": f"mcp-{server_key}",
|
|
146
|
+
"name": f"MCP: {server_key}",
|
|
147
|
+
"description": f"MCP server: {server_key}",
|
|
148
|
+
"tags": ["mcp", server_key],
|
|
149
|
+
}
|
|
150
|
+
)
|
|
117
151
|
return result
|
|
118
152
|
|
|
119
153
|
def _build_tool_skills(self, agent_instance: Any) -> list[dict]:
|
|
@@ -128,16 +162,16 @@ class AgentCardSkillBuilder:
|
|
|
128
162
|
for tool in agent_tools:
|
|
129
163
|
try:
|
|
130
164
|
tool_name = (
|
|
131
|
-
getattr(tool, "__name__", None)
|
|
132
|
-
|
|
133
|
-
|
|
165
|
+
getattr(tool, "__name__", None) or getattr(tool, "name", None) or str(tool)
|
|
166
|
+
)
|
|
167
|
+
result.append(
|
|
168
|
+
{
|
|
169
|
+
"id": f"tool-{tool_name}",
|
|
170
|
+
"name": tool_name,
|
|
171
|
+
"description": f"Tool: {tool_name}",
|
|
172
|
+
"tags": ["tool", tool_name],
|
|
173
|
+
}
|
|
134
174
|
)
|
|
135
|
-
result.append({
|
|
136
|
-
"id": f"tool-{tool_name}",
|
|
137
|
-
"name": tool_name,
|
|
138
|
-
"description": f"Tool: {tool_name}",
|
|
139
|
-
"tags": ["tool", tool_name],
|
|
140
|
-
})
|
|
141
175
|
except Exception:
|
|
142
176
|
logger.warning("Failed to build skill for tool %s", tool)
|
|
143
177
|
return result
|
|
@@ -192,9 +226,7 @@ class AgentCardSkillBuilder:
|
|
|
192
226
|
break
|
|
193
227
|
return tags
|
|
194
228
|
|
|
195
|
-
def _truncate_description(
|
|
196
|
-
self, description: str, total_skills: int = 0
|
|
197
|
-
) -> str:
|
|
229
|
+
def _truncate_description(self, description: str, total_skills: int = 0) -> str:
|
|
198
230
|
"""Truncates description to MAX_FRAMEWORK_DESC_LENGTH with suffix.
|
|
199
231
|
|
|
200
232
|
Args:
|
|
@@ -79,7 +79,9 @@ class JSONRPCDispatcher:
|
|
|
79
79
|
try:
|
|
80
80
|
send_params = MessageSendParams(**params)
|
|
81
81
|
except ValidationError as e:
|
|
82
|
-
return self._error_response(
|
|
82
|
+
return self._error_response(
|
|
83
|
+
request_id, INVALID_PARAMS, "Invalid params", {"details": str(e)}
|
|
84
|
+
)
|
|
83
85
|
result = await self._translation_layer.handle_message_send(send_params, request_id)
|
|
84
86
|
return self._success_response(request_id, result)
|
|
85
87
|
|
|
@@ -87,15 +89,21 @@ class JSONRPCDispatcher:
|
|
|
87
89
|
try:
|
|
88
90
|
stream_params = MessageSendParams(**params)
|
|
89
91
|
except ValidationError as e:
|
|
90
|
-
return self._error_response(
|
|
91
|
-
|
|
92
|
+
return self._error_response(
|
|
93
|
+
request_id, INVALID_PARAMS, "Invalid params", {"details": str(e)}
|
|
94
|
+
)
|
|
95
|
+
generator = await self._translation_layer.handle_message_stream(
|
|
96
|
+
stream_params, request_id
|
|
97
|
+
)
|
|
92
98
|
return StreamingResponse(generator, media_type="text/event-stream")
|
|
93
99
|
|
|
94
100
|
elif method == "tasks/get":
|
|
95
101
|
try:
|
|
96
102
|
get_params = TaskGetParams(**params)
|
|
97
103
|
except ValidationError as e:
|
|
98
|
-
return self._error_response(
|
|
104
|
+
return self._error_response(
|
|
105
|
+
request_id, INVALID_PARAMS, "Invalid params", {"details": str(e)}
|
|
106
|
+
)
|
|
99
107
|
result = await self._translation_layer.handle_tasks_get(get_params, request_id)
|
|
100
108
|
return self._success_response(request_id, result)
|
|
101
109
|
|
|
@@ -103,8 +111,12 @@ class JSONRPCDispatcher:
|
|
|
103
111
|
try:
|
|
104
112
|
cancel_params = TaskCancelParams(**params)
|
|
105
113
|
except ValidationError as e:
|
|
106
|
-
return self._error_response(
|
|
107
|
-
|
|
114
|
+
return self._error_response(
|
|
115
|
+
request_id, INVALID_PARAMS, "Invalid params", {"details": str(e)}
|
|
116
|
+
)
|
|
117
|
+
result = await self._translation_layer.handle_tasks_cancel(
|
|
118
|
+
cancel_params, request_id
|
|
119
|
+
)
|
|
108
120
|
return self._success_response(request_id, result)
|
|
109
121
|
|
|
110
122
|
else:
|
|
@@ -42,9 +42,7 @@ class SSEWrapperA2A:
|
|
|
42
42
|
"""
|
|
43
43
|
is_first_chunk = True
|
|
44
44
|
|
|
45
|
-
yield self._format_sse(
|
|
46
|
-
request_id, self._status_event(task_id, context_id, "working")
|
|
47
|
-
)
|
|
45
|
+
yield self._format_sse(request_id, self._status_event(task_id, context_id, "working"))
|
|
48
46
|
|
|
49
47
|
try:
|
|
50
48
|
async for output in internal_stream:
|
|
@@ -57,7 +55,7 @@ class SSEWrapperA2A:
|
|
|
57
55
|
|
|
58
56
|
# Skip activity markers and emit status event
|
|
59
57
|
if text.startswith("__STREAM_ACTIVITY__"):
|
|
60
|
-
activity_text = text[len("__STREAM_ACTIVITY__"):]
|
|
58
|
+
activity_text = text[len("__STREAM_ACTIVITY__") :]
|
|
61
59
|
yield self._format_sse(
|
|
62
60
|
request_id,
|
|
63
61
|
self._status_event(
|
|
@@ -68,15 +66,13 @@ class SSEWrapperA2A:
|
|
|
68
66
|
|
|
69
67
|
# Strip chunk marker prefix
|
|
70
68
|
if text.startswith("__STREAM_CHUNK__"):
|
|
71
|
-
text = text[len("__STREAM_CHUNK__"):]
|
|
69
|
+
text = text[len("__STREAM_CHUNK__") :]
|
|
72
70
|
|
|
73
71
|
if text:
|
|
74
72
|
append = not is_first_chunk
|
|
75
73
|
yield self._format_sse(
|
|
76
74
|
request_id,
|
|
77
|
-
self._artifact_event(
|
|
78
|
-
task_id, context_id, text, append
|
|
79
|
-
),
|
|
75
|
+
self._artifact_event(task_id, context_id, text, append),
|
|
80
76
|
)
|
|
81
77
|
is_first_chunk = False
|
|
82
78
|
|
|
@@ -85,14 +81,10 @@ class SSEWrapperA2A:
|
|
|
85
81
|
content = getattr(part, "content", "") or activity_type
|
|
86
82
|
yield self._format_sse(
|
|
87
83
|
request_id,
|
|
88
|
-
self._status_event(
|
|
89
|
-
task_id, context_id, "working", content
|
|
90
|
-
),
|
|
84
|
+
self._status_event(task_id, context_id, "working", content),
|
|
91
85
|
)
|
|
92
86
|
|
|
93
|
-
yield self._format_sse(
|
|
94
|
-
request_id, self._status_event(task_id, context_id, "completed")
|
|
95
|
-
)
|
|
87
|
+
yield self._format_sse(request_id, self._status_event(task_id, context_id, "completed"))
|
|
96
88
|
|
|
97
89
|
except Exception as e:
|
|
98
90
|
logger.exception("Error during SSE streaming")
|
|
@@ -104,7 +104,9 @@ class A2ATranslationLayer:
|
|
|
104
104
|
from ...core.agent_interface import StructuredAgentInput, TextInputPart
|
|
105
105
|
|
|
106
106
|
text = self.extract_text(params.message.parts)
|
|
107
|
-
context_id_param =
|
|
107
|
+
context_id_param = (
|
|
108
|
+
getattr(params.configuration, "contextId", None) if params.configuration else None
|
|
109
|
+
)
|
|
108
110
|
session_id, _is_new = self._resolve_context(context_id_param)
|
|
109
111
|
context_id = session_id
|
|
110
112
|
|
|
@@ -183,7 +185,7 @@ class A2ATranslationLayer:
|
|
|
183
185
|
text = getattr(part, "text", "") or ""
|
|
184
186
|
# Strip the streaming marker prefix
|
|
185
187
|
if text.startswith("__STREAM_CHUNK__"):
|
|
186
|
-
text = text[len("__STREAM_CHUNK__"):]
|
|
188
|
+
text = text[len("__STREAM_CHUNK__") :]
|
|
187
189
|
if text:
|
|
188
190
|
chunks.append(text)
|
|
189
191
|
if output.response_text:
|
|
@@ -208,7 +210,9 @@ class A2ATranslationLayer:
|
|
|
208
210
|
from ...core.agent_interface import StructuredAgentInput, TextInputPart
|
|
209
211
|
|
|
210
212
|
text = self.extract_text(params.message.parts)
|
|
211
|
-
context_id_param =
|
|
213
|
+
context_id_param = (
|
|
214
|
+
getattr(params.configuration, "contextId", None) if params.configuration else None
|
|
215
|
+
)
|
|
212
216
|
session_id, _is_new = self._resolve_context(context_id_param)
|
|
213
217
|
context_id = session_id
|
|
214
218
|
|
|
@@ -256,6 +260,7 @@ class A2ATranslationLayer:
|
|
|
256
260
|
],
|
|
257
261
|
)
|
|
258
262
|
import json
|
|
263
|
+
|
|
259
264
|
yield f"data: {json.dumps(result.model_dump())}\n\n"
|
|
260
265
|
|
|
261
266
|
async def _consume_stream_from_generator(self, stream: AsyncGenerator) -> str:
|
|
@@ -275,7 +280,7 @@ class A2ATranslationLayer:
|
|
|
275
280
|
if part_type in ("text_output_stream", "text_output"):
|
|
276
281
|
text = getattr(part, "text", "") or ""
|
|
277
282
|
if text.startswith("__STREAM_CHUNK__"):
|
|
278
|
-
text = text[len("__STREAM_CHUNK__"):]
|
|
283
|
+
text = text[len("__STREAM_CHUNK__") :]
|
|
279
284
|
if text:
|
|
280
285
|
chunks.append(text)
|
|
281
286
|
if output.response_text:
|
|
@@ -311,10 +316,14 @@ class A2ATranslationLayer:
|
|
|
311
316
|
status=A2ATaskStatus(
|
|
312
317
|
state=task.status.value,
|
|
313
318
|
timestamp=task.updated_at.isoformat() if task.updated_at else None,
|
|
314
|
-
message=
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
319
|
+
message=(
|
|
320
|
+
A2AMessage(
|
|
321
|
+
role="agent",
|
|
322
|
+
parts=[A2APart(kind="text", text=task.status_message.get("text", ""))],
|
|
323
|
+
)
|
|
324
|
+
if task.status_message and task.status_message.get("text")
|
|
325
|
+
else None
|
|
326
|
+
),
|
|
318
327
|
),
|
|
319
328
|
artifacts=artifacts if artifacts else None,
|
|
320
329
|
history=history,
|
|
@@ -12,6 +12,7 @@ logger = logging.getLogger(__name__)
|
|
|
12
12
|
|
|
13
13
|
class TaskStatus(str, Enum):
|
|
14
14
|
"""A2A task lifecycle states."""
|
|
15
|
+
|
|
15
16
|
SUBMITTED = "submitted"
|
|
16
17
|
WORKING = "working"
|
|
17
18
|
INPUT_REQUIRED = "input-required"
|
|
@@ -25,12 +26,14 @@ class TaskStatus(str, Enum):
|
|
|
25
26
|
return self in _TERMINAL_STATES
|
|
26
27
|
|
|
27
28
|
|
|
28
|
-
_TERMINAL_STATES = frozenset(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
_TERMINAL_STATES = frozenset(
|
|
30
|
+
{
|
|
31
|
+
TaskStatus.COMPLETED,
|
|
32
|
+
TaskStatus.FAILED,
|
|
33
|
+
TaskStatus.CANCELED,
|
|
34
|
+
TaskStatus.REJECTED,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
34
37
|
|
|
35
38
|
|
|
36
39
|
@dataclass
|
|
@@ -40,6 +43,7 @@ class A2ATask:
|
|
|
40
43
|
Links an A2A task_id to a framework session_id + message_id.
|
|
41
44
|
The actual conversational content lives in the session store.
|
|
42
45
|
"""
|
|
46
|
+
|
|
43
47
|
id: str
|
|
44
48
|
context_id: str
|
|
45
49
|
session_id: str
|