From 6c81b21aaa76d7218b62b4a97f433e19fa0490d8 Mon Sep 17 00:00:00 2001 From: "cristiano.hoshikawa" Date: Fri, 11 Sep 2026 00:35:05 -0300 Subject: [PATCH] new feature: Multi-Intent --- .env.example | 7 +- .../app/agents/billing_agent.py | 8 ++ .../app/agents/orders_agent.py | 8 ++ .../app/agents/product_agent.py | 8 ++ .../app/agents/support_agent.py | 8 ++ .../app/main.py | 1 + .../app/state.py | 1 + .../app/workflows/agent_graph.py | 9 +- .../app/agents/billing_agent.py | 8 ++ .../app/agents/orders_agent.py | 8 ++ .../app/agents/product_agent.py | 8 ++ .../app/agents/support_agent.py | 8 ++ .../agent_template_backend/app/main.py | 1 + .../agent_template_backend/app/state.py | 1 + .../app/workflows/agent_graph.py | 9 +- .../app/agents/billing_agent.py | 8 ++ .../app/agents/orders_agent.py | 8 ++ .../app/agents/product_agent.py | 8 ++ .../app/agents/support_agent.py | 8 ++ .../agent_template_backend/app/main.py | 1 + .../agent_template_backend/app/state.py | 1 + .../app/workflows/agent_graph.py | 9 +- .../app/agents/billing_agent.py | 8 ++ .../app/agents/orders_agent.py | 8 ++ .../app/agents/product_agent.py | 8 ++ .../app/agents/support_agent.py | 8 ++ .../agent_template_backend/app/main.py | 1 + .../agent_template_backend/app/state.py | 1 + .../app/workflows/agent_graph.py | 9 +- .../app/agents/billing_agent.py | 8 ++ .../app/agents/orders_agent.py | 8 ++ .../app/agents/product_agent.py | 8 ++ .../app/agents/support_agent.py | 8 ++ .../agent_template_backend/app/main.py | 1 + .../agent_template_backend/app/state.py | 1 + .../app/workflows/agent_graph.py | 9 +- .../app/agents/billing_agent.py | 8 ++ .../app/agents/orders_agent.py | 8 ++ .../app/agents/product_agent.py | 8 ++ .../app/agents/support_agent.py | 8 ++ .../app/main.py | 1 + .../app/state.py | 1 + .../app/workflows/agent_graph.py | 9 +- .../app/agents/billing_agent.py | 8 ++ .../app/agents/orders_agent.py | 8 ++ .../app/agents/product_agent.py | 8 ++ .../app/agents/support_agent.py | 8 ++ .../agent_template_backend/app/main.py | 1 + .../agent_template_backend/app/state.py | 1 + .../app/workflows/agent_graph.py | 9 +- .../app/agents/billing_agent.py | 8 ++ .../app/agents/orders_agent.py | 8 ++ .../app/agents/product_agent.py | 8 ++ .../app/agents/support_agent.py | 8 ++ .../app/main.py | 1 + .../app/state.py | 1 + .../app/workflows/agent_graph.py | 9 +- .../app/agents/billing_agent.py | 8 ++ .../app/agents/orders_agent.py | 8 ++ .../app/agents/product_agent.py | 8 ++ .../app/agents/support_agent.py | 8 ++ .../agent_template_backend/app/main.py | 1 + .../agent_template_backend/app/state.py | 1 + .../app/workflows/agent_graph.py | 10 +- .../app/agents/billing_agent.py | 8 ++ .../app/agents/orders_agent.py | 8 ++ .../app/agents/product_agent.py | 8 ++ .../app/agents/support_agent.py | 8 ++ .../agent_template_backend/app/main.py | 1 + .../agent_template_backend/app/state.py | 1 + .../app/workflows/agent_graph.py | 10 +- .../__pycache__/__init__.cpython-313.pyc | Bin 413 -> 413 bytes .../__pycache__/extensions.cpython-313.pyc | Bin 2141 -> 2141 bytes .../__pycache__/idempotency.cpython-313.pyc | Bin 8914 -> 8914 bytes .../__pycache__/observer.cpython-313.pyc | Bin 17557 -> 17557 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 549 -> 549 bytes .../composite_publisher.cpython-313.pyc | Bin 2504 -> 2504 bytes .../__pycache__/event_builder.cpython-313.pyc | Bin 1262 -> 1262 bytes .../__pycache__/factory.cpython-313.pyc | Bin 3998 -> 3998 bytes .../__pycache__/publisher.cpython-313.pyc | Bin 1874 -> 1874 bytes .../tim_payload_mapper.cpython-313.pyc | Bin 9288 -> 9288 bytes .../__pycache__/tim_sequence.cpython-313.pyc | Bin 17563 -> 17563 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 516 -> 516 bytes .../__pycache__/kafka.cpython-313.pyc | Bin 1814 -> 1814 bytes .../__pycache__/langfuse.cpython-313.pyc | Bin 23174 -> 23174 bytes .../__pycache__/oci_streaming.cpython-313.pyc | Bin 1823 -> 1823 bytes .../__pycache__/pubsub.cpython-313.pyc | Bin 7442 -> 7442 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 405 -> 405 bytes .../usage_repository.cpython-313.pyc | Bin 15688 -> 15688 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 215 -> 215 bytes .../cache/__pycache__/cache.cpython-313.pyc | Bin 16525 -> 16525 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 218 -> 218 bytes .../__pycache__/adapters.cpython-313.pyc | Bin 4174 -> 4174 bytes .../channels/__pycache__/base.cpython-313.pyc | Bin 1798 -> 1798 bytes .../__pycache__/gateway.cpython-313.pyc | Bin 5773 -> 5773 bytes .../__pycache__/interruption.cpython-313.pyc | Bin 6458 -> 6458 bytes .../__pycache__/transcription.cpython-313.pyc | Bin 1431 -> 1431 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 925 -> 925 bytes .../checkpoint_repository.cpython-313.pyc | Bin 27165 -> 27165 bytes .../langgraph_saver.cpython-313.pyc | Bin 33267 -> 33267 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 216 -> 216 bytes .../agent_registry.cpython-313.pyc | Bin 6949 -> 6949 bytes .../__pycache__/settings.cpython-313.pyc | Bin 13791 -> 13791 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 308 -> 308 bytes .../mcp_gateway_client.cpython-313.pyc | Bin 3334 -> 3334 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 1503 -> 1503 bytes .../__pycache__/base.cpython-313.pyc | Bin 1377 -> 1377 bytes .../__pycache__/config_loader.cpython-313.pyc | Bin 9162 -> 9162 bytes .../__pycache__/custom_rails.cpython-313.pyc | Bin 4406 -> 4406 bytes .../framework_llm_client.cpython-313.pyc | Bin 19675 -> 19675 bytes .../__pycache__/llm_rails.cpython-313.pyc | Bin 5925 -> 5925 bytes .../output_supervisor.cpython-313.pyc | Bin 24308 -> 24308 bytes .../parallel_executor.cpython-313.pyc | Bin 21864 -> 21864 bytes .../__pycache__/pipeline.cpython-313.pyc | Bin 10891 -> 10891 bytes .../__pycache__/rail_action.cpython-313.pyc | Bin 656 -> 656 bytes .../__pycache__/rail_decision.cpython-313.pyc | Bin 1607 -> 1607 bytes .../__pycache__/rail_result.cpython-313.pyc | Bin 1006 -> 1006 bytes .../__pycache__/rails.cpython-313.pyc | Bin 43326 -> 43326 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 2996 -> 2996 bytes .../__pycache__/_compat.cpython-313.pyc | Bin 2447 -> 2447 bytes .../contestation_validation.cpython-313.pyc | Bin 2179 -> 2179 bytes .../__pycache__/contracts.cpython-313.pyc | Bin 6903 -> 6903 bytes .../__pycache__/input_size.cpython-313.pyc | Bin 3651 -> 3651 bytes .../__pycache__/llm_adapter.cpython-313.pyc | Bin 3801 -> 3801 bytes .../__pycache__/llm_client.cpython-313.pyc | Bin 7456 -> 7456 bytes .../__pycache__/llm_rails.cpython-313.pyc | Bin 8896 -> 8896 bytes .../output_sanitization.cpython-313.pyc | Bin 13912 -> 13912 bytes .../__pycache__/pipeline.cpython-313.pyc | Bin 12663 -> 12663 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 475 -> 475 bytes .../__pycache__/_context.cpython-313.pyc | Bin 5873 -> 5873 bytes .../ausencia_oferta_proativa.cpython-313.pyc | Bin 12207 -> 12207 bytes .../__pycache__/coerencia.cpython-313.pyc | Bin 4159 -> 4159 bytes .../__pycache__/dlex_in.cpython-313.pyc | Bin 1306 -> 1306 bytes .../__pycache__/dlex_out.cpython-313.pyc | Bin 1817 -> 1817 bytes .../__pycache__/fallback.cpython-313.pyc | Bin 17654 -> 17654 bytes .../__pycache__/fraseologia.cpython-313.pyc | Bin 7635 -> 7635 bytes .../__pycache__/out_of_scope.cpython-313.pyc | Bin 17495 -> 17495 bytes .../prompts/__pycache__/pinj.cpython-313.pyc | Bin 8426 -> 8426 bytes .../__pycache__/ragsec.cpython-313.pyc | Bin 1122 -> 1122 bytes .../__pycache__/revprec.cpython-313.pyc | Bin 3152 -> 3152 bytes .../prompts/__pycache__/tox.cpython-313.pyc | Bin 646 -> 646 bytes .../toxicidade_output.cpython-313.pyc | Bin 930 -> 930 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 1665 -> 1665 bytes .../rails/__pycache__/alcada.cpython-313.pyc | Bin 5001 -> 5001 bytes .../rails/__pycache__/anatel.cpython-313.pyc | Bin 9150 -> 9150 bytes .../__pycache__/confirmation.cpython-313.pyc | Bin 11044 -> 11044 bytes .../rails/__pycache__/dlex_in.cpython-313.pyc | Bin 3281 -> 3281 bytes .../__pycache__/dlex_out.cpython-313.pyc | Bin 3333 -> 3333 bytes .../rails/__pycache__/ragsec.cpython-313.pyc | Bin 5464 -> 5464 bytes .../rails/__pycache__/revprec.cpython-313.pyc | Bin 5472 -> 5472 bytes .../rails/__pycache__/tox.cpython-313.pyc | Bin 8295 -> 8295 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 535 -> 535 bytes .../rules/__pycache__/alcada.cpython-313.pyc | Bin 1883 -> 1883 bytes .../__pycache__/pinj_patterns.cpython-313.pyc | Bin 3732 -> 3732 bytes .../__pycache__/tox_blocklist.cpython-313.pyc | Bin 1508 -> 1508 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 410 -> 410 bytes .../__pycache__/mcp_mapper.cpython-313.pyc | Bin 4694 -> 4694 bytes .../__pycache__/models.cpython-313.pyc | Bin 3146 -> 3146 bytes .../__pycache__/resolver.cpython-313.pyc | Bin 4715 -> 4715 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 620 -> 620 bytes .../judges/__pycache__/judge.cpython-313.pyc | Bin 43986 -> 43986 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 227 -> 227 bytes .../__pycache__/llm_client.cpython-313.pyc | Bin 5406 -> 5406 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 235 -> 235 bytes .../prompts/__pycache__/aluc.cpython-313.pyc | Bin 6531 -> 6531 bytes .../prompts/__pycache__/csi.cpython-313.pyc | Bin 1334 -> 1334 bytes .../__pycache__/fallback.cpython-313.pyc | Bin 8037 -> 8037 bytes .../prompts/__pycache__/rqlt.cpython-313.pyc | Bin 1167 -> 1167 bytes .../prompts/__pycache__/vctn.cpython-313.pyc | Bin 628 -> 628 bytes .../llm/__pycache__/__init__.cpython-313.pyc | Bin 478 -> 478 bytes .../llm/__pycache__/base.cpython-313.pyc | Bin 1625 -> 1625 bytes .../profile_resolver.cpython-313.pyc | Bin 9324 -> 9324 bytes .../llm/__pycache__/providers.cpython-313.pyc | Bin 46980 -> 46980 bytes .../structured_output.cpython-313.pyc | Bin 7461 -> 7461 bytes .../llm/__pycache__/types.cpython-313.pyc | Bin 1276 -> 1276 bytes .../mcp/__pycache__/__init__.cpython-313.pyc | Bin 475 -> 475 bytes .../mcp/__pycache__/client.cpython-313.pyc | Bin 18428 -> 18428 bytes .../mcp/__pycache__/models.cpython-313.pyc | Bin 2138 -> 2138 bytes .../mcp/__pycache__/registry.cpython-313.pyc | Bin 4742 -> 4742 bytes .../__pycache__/tool_policy.cpython-313.pyc | Bin 5687 -> 5687 bytes .../__pycache__/tool_router.cpython-313.pyc | Bin 14191 -> 14191 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 1137 -> 1137 bytes .../long_term_extractor.cpython-313.pyc | Bin 2515 -> 2515 bytes .../long_term_memory.cpython-313.pyc | Bin 6841 -> 6841 bytes .../long_term_models.cpython-313.pyc | Bin 1750 -> 1750 bytes .../long_term_store.cpython-313.pyc | Bin 29188 -> 29188 bytes .../message_history.cpython-313.pyc | Bin 8361 -> 8361 bytes .../summary_memory.cpython-313.pyc | Bin 12512 -> 12512 bytes .../__pycache__/summary_store.cpython-313.pyc | Bin 9522 -> 9522 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 216 -> 216 bytes .../__pycache__/identity.cpython-313.pyc | Bin 3467 -> 3467 bytes .../__pycache__/session.cpython-313.pyc | Bin 2710 -> 2710 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 1396 -> 1396 bytes .../__pycache__/code_mapper.cpython-313.pyc | Bin 21449 -> 21449 bytes .../__pycache__/context.cpython-313.pyc | Bin 7388 -> 7388 bytes .../__pycache__/event_bus.cpython-313.pyc | Bin 3634 -> 3634 bytes .../guardrail_events.cpython-313.pyc | Bin 2052 -> 2052 bytes .../__pycache__/ic_events.cpython-313.pyc | Bin 627 -> 627 bytes .../__pycache__/judge_events.cpython-313.pyc | Bin 1412 -> 1412 bytes .../langgraph_telemetry.cpython-313.pyc | Bin 4965 -> 4965 bytes .../__pycache__/llm_advisors.cpython-313.pyc | Bin 2939 -> 2939 bytes .../__pycache__/noc_contract.cpython-313.pyc | Bin 5076 -> 5076 bytes .../__pycache__/noc_otel.cpython-313.pyc | Bin 6323 -> 6323 bytes .../__pycache__/observer.cpython-313.pyc | Bin 5106 -> 5106 bytes .../__pycache__/otel.cpython-313.pyc | Bin 3413 -> 3413 bytes .../streaming_events.cpython-313.pyc | Bin 1836 -> 1836 bytes .../__pycache__/telemetry.cpython-313.pyc | Bin 52429 -> 52429 bytes .../__pycache__/token_cost.cpython-313.pyc | Bin 8692 -> 8692 bytes .../workflow_events.cpython-313.pyc | Bin 3331 -> 3331 bytes .../oci/__pycache__/__init__.cpython-313.pyc | Bin 213 -> 213 bytes .../oci/__pycache__/auth.cpython-313.pyc | Bin 3245 -> 3245 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 221 -> 221 bytes .../__pycache__/oracle_store.cpython-313.pyc | Bin 45933 -> 45933 bytes .../__pycache__/sqlite_store.cpython-313.pyc | Bin 15020 -> 15020 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 456 -> 456 bytes .../__pycache__/renderers.cpython-313.pyc | Bin 4319 -> 4319 bytes .../rag/__pycache__/__init__.cpython-313.pyc | Bin 711 -> 711 bytes .../embedding_provider.cpython-313.pyc | Bin 6518 -> 6518 bytes .../__pycache__/graph_store.cpython-313.pyc | Bin 5529 -> 5529 bytes .../rag/__pycache__/ingest.cpython-313.pyc | Bin 12582 -> 12582 bytes .../__pycache__/kbdb_service.cpython-313.pyc | Bin 10013 -> 10013 bytes .../__pycache__/rag_service.cpython-313.pyc | Bin 10899 -> 10899 bytes .../__pycache__/vector_store.cpython-313.pyc | Bin 18657 -> 18657 bytes .../src/agent_framework/rag/kbdb_service.py | 92 +++++++++++++++++- .../__pycache__/__init__.cpython-313.pyc | Bin 222 -> 222 bytes .../session_repository.cpython-313.pyc | Bin 8591 -> 8591 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 649 -> 649 bytes .../__pycache__/config_loader.cpython-313.pyc | Bin 2691 -> 2691 bytes .../__pycache__/continuity.cpython-313.pyc | Bin 15935 -> 15935 bytes .../enterprise_router.cpython-313.pyc | Bin 69460 -> 69460 bytes .../__pycache__/models.cpython-313.pyc | Bin 2448 -> 2448 bytes .../__pycache__/multi_intent.cpython-313.pyc | Bin 19979 -> 19986 bytes .../pending_topics.cpython-313.pyc | Bin 5814 -> 6621 bytes .../agent_framework/routing/multi_intent.py | 2 +- .../agent_framework/routing/pending_topics.py | 20 +++- .../__pycache__/__init__.cpython-313.pyc | Bin 350 -> 350 bytes .../__pycache__/agent_runtime.cpython-313.pyc | Bin 198240 -> 198240 bytes .../transaction_parameters.cpython-313.pyc | Bin 19585 -> 19585 bytes .../sse/__pycache__/__init__.cpython-313.pyc | Bin 213 -> 213 bytes .../sse/__pycache__/events.cpython-313.pyc | Bin 9589 -> 9589 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 220 -> 220 bytes .../__pycache__/supervisor.cpython-313.pyc | Bin 4945 -> 4945 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 880 -> 880 bytes .../__pycache__/graph.cpython-313.pyc | Bin 1417 -> 1417 bytes .../input_contract.cpython-313.pyc | Bin 8792 -> 8792 bytes .../__pycache__/models.cpython-313.pyc | Bin 7671 -> 7671 bytes .../__pycache__/registry.cpython-313.pyc | Bin 2363 -> 2363 bytes .../__pycache__/repository.cpython-313.pyc | Bin 2716 -> 2716 bytes .../__pycache__/runtime.cpython-313.pyc | Bin 36154 -> 36154 bytes .../__pycache__/tool_executor.cpython-313.pyc | Bin 1968 -> 1968 bytes .../scripts/sync_pending_topics_to_tuning.py | 92 +++++++++++++++--- .../app/agents/billing_agent.py | 8 ++ .../app/agents/orders_agent.py | 8 ++ .../app/agents/product_agent.py | 8 ++ .../app/agents/support_agent.py | 8 ++ .../agent_template_backend/app/main.py | 1 + .../agent_template_backend/app/state.py | 1 + .../app/workflows/agent_graph.py | 6 +- .../app/agents/billing_agent.py | 8 ++ .../app/agents/orders_agent.py | 8 ++ .../app/agents/product_agent.py | 8 ++ .../app/agents/support_agent.py | 8 ++ .../app/main.py | 1 + .../app/state.py | 1 + .../app/workflows/agent_graph.py | 5 +- .../tests/unit/test_multi_intent_planner.py | 14 +++ .../unit/test_pending_topics_isolation.py | 4 + .../tests/unit/test_rag_kbdb_provider.py | 66 +++++++++++++ .../unit/test_tuning_pending_topics_sync.py | 34 ++++++- app/__pycache__/__init__.cpython-313.pyc | Bin 152 -> 152 bytes app/__pycache__/main.cpython-313.pyc | Bin 37624 -> 37624 bytes app/__pycache__/state.cpython-313.pyc | Bin 3520 -> 3578 bytes .../contas_prompting.cpython-313.pyc | Bin 1062 -> 1062 bytes .../contestacao_agent.cpython-313.pyc | Bin 5303 -> 5717 bytes .../__pycache__/faturas_agent.cpython-313.pyc | Bin 10803 -> 11199 bytes .../__pycache__/prompting.cpython-313.pyc | Bin 1149 -> 1149 bytes .../__pycache__/runtime.cpython-313.pyc | Bin 436 -> 436 bytes .../suporte_contas_agent.cpython-313.pyc | Bin 6249 -> 6622 bytes .../__pycache__/vas_agent.cpython-313.pyc | Bin 5714 -> 6095 bytes app/agents/contestacao_agent.py | 8 ++ app/agents/faturas_agent.py | 8 ++ app/agents/suporte_contas_agent.py | 8 ++ app/agents/vas_agent.py | 8 ++ .../__pycache__/__init__.cpython-313.pyc | Bin 234 -> 234 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 330 -> 330 bytes .../contas/__pycache__/client.cpython-313.pyc | Bin 51887 -> 51887 bytes .../conversation_policy.cpython-313.pyc | Bin 17027 -> 17027 bytes .../informational_context.cpython-313.pyc | Bin 3497 -> 3497 bytes .../invoice_models.cpython-313.pyc | Bin 1805 -> 1805 bytes .../invoice_resolver.cpython-313.pyc | Bin 56050 -> 56050 bytes .../line_reference.cpython-313.pyc | Bin 3431 -> 3431 bytes .../__pycache__/service.cpython-313.pyc | Bin 21634 -> 21634 bytes .../__pycache__/vas_variation.cpython-313.pyc | Bin 42130 -> 42130 bytes .../secure_pdf_crypto.cpython-313.pyc | Bin 2476 -> 2476 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 937 -> 937 bytes .../__pycache__/bill_parser.cpython-313.pyc | Bin 23741 -> 23741 bytes .../bill_processor.cpython-313.pyc | Bin 36256 -> 36256 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 304 -> 304 bytes .../tim_guardrails.cpython-313.pyc | Bin 37476 -> 37476 bytes .../__pycache__/tim_judges.cpython-313.pyc | Bin 5863 -> 5863 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 175 -> 175 bytes .../__pycache__/aluc.cpython-313.pyc | Bin 6390 -> 6390 bytes .../ausencia_oferta_proativa.cpython-313.pyc | Bin 10752 -> 10752 bytes .../__pycache__/fraseologia.cpython-313.pyc | Bin 7529 -> 7529 bytes .../__pycache__/out_of_scope.cpython-313.pyc | Bin 17021 -> 17021 bytes .../__pycache__/revprec.cpython-313.pyc | Bin 3088 -> 3088 bytes .../__pycache__/rqlt.cpython-313.pyc | Bin 1097 -> 1097 bytes app/main.py | 1 + .../__pycache__/__init__.cpython-313.pyc | Bin 166 -> 166 bytes .../telemetry_observer.cpython-313.pyc | Bin 4989 -> 4989 bytes .../__pycache__/__init__.cpython-313.pyc | Bin 258 -> 258 bytes .../tool_renderers.cpython-313.pyc | Bin 5431 -> 5431 bytes app/state.py | 1 + .../__pycache__/agent_graph.cpython-313.pyc | Bin 74527 -> 74910 bytes app/workflows/agent_graph.py | 14 ++- 315 files changed, 855 insertions(+), 35 deletions(-) diff --git a/.env.example b/.env.example index edb33548..5d68ff9e 100644 --- a/.env.example +++ b/.env.example @@ -369,7 +369,7 @@ MCP_TOOL_CACHE_TTL_SECONDS=60 # kbdb = KBDB enterprise via PKG_KB_SERVING.SEARCH_KNOWLEDGE_BASE RAG_PROVIDER=kbdb -# Somente usados quando RAG_PROVIDER=kbdb. Se vazios, credenciais caem para ADB_*. +# Somente usados quando RAG_PROVIDER=kbdb; não há fallback para as credenciais ADB_*. KBDB_DB_USER= KBDB_DB_PASSWORD= KBDB_DB_DSN=db_dsn_high @@ -382,4 +382,7 @@ KBDB_GRAPH_CROSS_REF=false KBDB_MAX_CROSS_REF_HOPS=1 KBDB_DOCUMENT_TYPE=customer_safe KBDB_METADATA_JSON= -KBDB_MIN_SCORE=0.5 \ No newline at end of file +KBDB_MIN_SCORE=0.5 +KBDB_IDENTIFY_DOCUMENT=true +KBDB_STORE_QUERY=true +KBDB_IDENTIFY_TOP_N=3 diff --git a/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/agents/billing_agent.py b/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/agents/billing_agent.py index aa600999..e627beb9 100644 --- a/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/agents/billing_agent.py +++ b/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/agents/billing_agent.py @@ -108,6 +108,14 @@ class BillingAgent(AgentRuntimeMixin): "next_state": "BILLING_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/agents/orders_agent.py b/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/agents/orders_agent.py index f557bed4..bdb3c244 100644 --- a/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/agents/orders_agent.py +++ b/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/agents/orders_agent.py @@ -108,6 +108,14 @@ class OrdersAgent(AgentRuntimeMixin): "next_state": "ORDER_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/agents/product_agent.py b/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/agents/product_agent.py index 34433f57..3e1f0d6d 100644 --- a/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/agents/product_agent.py +++ b/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/agents/product_agent.py @@ -108,6 +108,14 @@ class ProductAgent(AgentRuntimeMixin): "next_state": "PRODUCT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/agents/support_agent.py b/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/agents/support_agent.py index b4f0244f..99562a7d 100644 --- a/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/agents/support_agent.py +++ b/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/agents/support_agent.py @@ -108,6 +108,14 @@ class SupportAgent(AgentRuntimeMixin): "next_state": "SUPPORT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/main.py b/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/main.py index c1d33544..b2d27c25 100644 --- a/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/main.py +++ b/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/main.py @@ -372,6 +372,7 @@ async def _process_gateway_message(req: GatewayRequest, emit_sse: bool = False) "domain": result.get("domain"), "mcp_tools": result.get("mcp_tools"), "mcp_results": result.get("mcp_results"), + "rag_results": result.get("rag_results"), "business_context": business_context.model_dump(), "identity_missing": missing_identity_keys, "judges": result.get("judge_results"), diff --git a/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/state.py b/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/state.py index 6ec11159..27d4f7b9 100644 --- a/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/state.py +++ b/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/state.py @@ -23,6 +23,7 @@ class AgentState(TypedDict, total=False): domain: str mcp_tools: list[str] mcp_results: list[dict[str, Any]] + rag_results: list[dict[str, Any]] available_mcp_tools: list[str] selected_tool_call: dict[str, Any] pending_tool_call: dict[str, Any] diff --git a/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/workflows/agent_graph.py b/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/workflows/agent_graph.py index d45cb7b9..197d16ec 100644 --- a/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/workflows/agent_graph.py +++ b/agent_framework_oci/Tuning-Performance/Authentication/agent_template_backend_authentication/app/workflows/agent_graph.py @@ -570,6 +570,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "output_guardrails_already_applied": False, "supervisor_action": "disabled", "supervisor_attempt": int(state.get("supervisor_attempt", 0)), @@ -577,7 +578,11 @@ class AgentWorkflow: context = { **(state.get("context") or {}), - "evidence": drained.mcp_results or (state.get("context") or {}).get("evidence"), + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), + "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), + "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), + "mcp_results": drained.mcp_results, + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), "mcp_results": drained.mcp_results, @@ -650,6 +655,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "guardrail_decisions": state.get("guardrail_decisions", []) + [item for r in decision.results for item in (r.metadata or {}).get("legacy_decisions", [])], } @@ -876,6 +882,7 @@ class AgentWorkflow: "judges": state.get("judge_results", []), "mcp_tools": state.get("mcp_tools", []), "mcp_results": state.get("mcp_results", []), + "rag_results": state.get("rag_results", []), }, ) diff --git a/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/agents/billing_agent.py b/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/agents/billing_agent.py index aa600999..e627beb9 100644 --- a/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/agents/billing_agent.py +++ b/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/agents/billing_agent.py @@ -108,6 +108,14 @@ class BillingAgent(AgentRuntimeMixin): "next_state": "BILLING_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/agents/orders_agent.py b/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/agents/orders_agent.py index f557bed4..bdb3c244 100644 --- a/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/agents/orders_agent.py +++ b/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/agents/orders_agent.py @@ -108,6 +108,14 @@ class OrdersAgent(AgentRuntimeMixin): "next_state": "ORDER_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/agents/product_agent.py b/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/agents/product_agent.py index 34433f57..3e1f0d6d 100644 --- a/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/agents/product_agent.py +++ b/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/agents/product_agent.py @@ -108,6 +108,14 @@ class ProductAgent(AgentRuntimeMixin): "next_state": "PRODUCT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/agents/support_agent.py b/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/agents/support_agent.py index b4f0244f..99562a7d 100644 --- a/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/agents/support_agent.py +++ b/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/agents/support_agent.py @@ -108,6 +108,14 @@ class SupportAgent(AgentRuntimeMixin): "next_state": "SUPPORT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/main.py b/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/main.py index d51bbc24..e8383282 100644 --- a/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/main.py +++ b/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/main.py @@ -366,6 +366,7 @@ async def _process_gateway_message(req: GatewayRequest, emit_sse: bool = False) "domain": result.get("domain"), "mcp_tools": result.get("mcp_tools"), "mcp_results": result.get("mcp_results"), + "rag_results": result.get("rag_results"), "business_context": business_context.model_dump(), "identity_missing": missing_identity_keys, "judges": result.get("judge_results"), diff --git a/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/state.py b/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/state.py index 6ec11159..27d4f7b9 100644 --- a/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/state.py +++ b/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/state.py @@ -23,6 +23,7 @@ class AgentState(TypedDict, total=False): domain: str mcp_tools: list[str] mcp_results: list[dict[str, Any]] + rag_results: list[dict[str, Any]] available_mcp_tools: list[str] selected_tool_call: dict[str, Any] pending_tool_call: dict[str, Any] diff --git a/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/workflows/agent_graph.py b/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/workflows/agent_graph.py index d45cb7b9..197d16ec 100644 --- a/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/workflows/agent_graph.py +++ b/agent_framework_oci/Tuning-Performance/Deterministic_Transactional_Workflow/agent_template_backend/app/workflows/agent_graph.py @@ -570,6 +570,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "output_guardrails_already_applied": False, "supervisor_action": "disabled", "supervisor_attempt": int(state.get("supervisor_attempt", 0)), @@ -577,7 +578,11 @@ class AgentWorkflow: context = { **(state.get("context") or {}), - "evidence": drained.mcp_results or (state.get("context") or {}).get("evidence"), + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), + "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), + "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), + "mcp_results": drained.mcp_results, + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), "mcp_results": drained.mcp_results, @@ -650,6 +655,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "guardrail_decisions": state.get("guardrail_decisions", []) + [item for r in decision.results for item in (r.metadata or {}).get("legacy_decisions", [])], } @@ -876,6 +882,7 @@ class AgentWorkflow: "judges": state.get("judge_results", []), "mcp_tools": state.get("mcp_tools", []), "mcp_results": state.get("mcp_results", []), + "rag_results": state.get("rag_results", []), }, ) diff --git a/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/agents/billing_agent.py b/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/agents/billing_agent.py index aa600999..e627beb9 100644 --- a/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/agents/billing_agent.py +++ b/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/agents/billing_agent.py @@ -108,6 +108,14 @@ class BillingAgent(AgentRuntimeMixin): "next_state": "BILLING_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/agents/orders_agent.py b/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/agents/orders_agent.py index f557bed4..bdb3c244 100644 --- a/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/agents/orders_agent.py +++ b/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/agents/orders_agent.py @@ -108,6 +108,14 @@ class OrdersAgent(AgentRuntimeMixin): "next_state": "ORDER_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/agents/product_agent.py b/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/agents/product_agent.py index 34433f57..3e1f0d6d 100644 --- a/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/agents/product_agent.py +++ b/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/agents/product_agent.py @@ -108,6 +108,14 @@ class ProductAgent(AgentRuntimeMixin): "next_state": "PRODUCT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/agents/support_agent.py b/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/agents/support_agent.py index b4f0244f..99562a7d 100644 --- a/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/agents/support_agent.py +++ b/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/agents/support_agent.py @@ -108,6 +108,14 @@ class SupportAgent(AgentRuntimeMixin): "next_state": "SUPPORT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/main.py b/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/main.py index 06d1bd14..7e9401f6 100644 --- a/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/main.py +++ b/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/main.py @@ -361,6 +361,7 @@ async def _process_gateway_message(req: GatewayRequest, emit_sse: bool = False) "domain": result.get("domain"), "mcp_tools": result.get("mcp_tools"), "mcp_results": result.get("mcp_results"), + "rag_results": result.get("rag_results"), "business_context": business_context.model_dump(), "identity_missing": missing_identity_keys, "judges": result.get("judge_results"), diff --git a/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/state.py b/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/state.py index ef4f2c70..9ec69485 100644 --- a/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/state.py +++ b/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/state.py @@ -23,6 +23,7 @@ class AgentState(TypedDict, total=False): domain: str mcp_tools: list[str] mcp_results: list[dict[str, Any]] + rag_results: list[dict[str, Any]] available_mcp_tools: list[str] selected_tool_call: dict[str, Any] pending_tool_call: dict[str, Any] diff --git a/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/workflows/agent_graph.py b/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/workflows/agent_graph.py index 1f139537..1f9954cb 100644 --- a/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/workflows/agent_graph.py +++ b/agent_framework_oci/Tuning-Performance/External_Guardrails_Judges/agent_template_backend/app/workflows/agent_graph.py @@ -568,6 +568,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "output_guardrails_already_applied": False, "supervisor_action": "disabled", "supervisor_attempt": int(state.get("supervisor_attempt", 0)), @@ -575,7 +576,11 @@ class AgentWorkflow: context = { **(state.get("context") or {}), - "evidence": drained.mcp_results or (state.get("context") or {}).get("evidence"), + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), + "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), + "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), + "mcp_results": drained.mcp_results, + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), "mcp_results": drained.mcp_results, @@ -648,6 +653,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "guardrail_decisions": state.get("guardrail_decisions", []) + [item for r in decision.results for item in (r.metadata or {}).get("legacy_decisions", [])], } @@ -805,6 +811,7 @@ class AgentWorkflow: "judges": state.get("judge_results", []), "mcp_tools": state.get("mcp_tools", []), "mcp_results": state.get("mcp_results", []), + "rag_results": state.get("rag_results", []), }, ) diff --git a/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/agents/billing_agent.py b/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/agents/billing_agent.py index aa600999..e627beb9 100644 --- a/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/agents/billing_agent.py +++ b/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/agents/billing_agent.py @@ -108,6 +108,14 @@ class BillingAgent(AgentRuntimeMixin): "next_state": "BILLING_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/agents/orders_agent.py b/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/agents/orders_agent.py index f557bed4..bdb3c244 100644 --- a/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/agents/orders_agent.py +++ b/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/agents/orders_agent.py @@ -108,6 +108,14 @@ class OrdersAgent(AgentRuntimeMixin): "next_state": "ORDER_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/agents/product_agent.py b/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/agents/product_agent.py index 34433f57..3e1f0d6d 100644 --- a/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/agents/product_agent.py +++ b/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/agents/product_agent.py @@ -108,6 +108,14 @@ class ProductAgent(AgentRuntimeMixin): "next_state": "PRODUCT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/agents/support_agent.py b/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/agents/support_agent.py index b4f0244f..99562a7d 100644 --- a/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/agents/support_agent.py +++ b/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/agents/support_agent.py @@ -108,6 +108,14 @@ class SupportAgent(AgentRuntimeMixin): "next_state": "SUPPORT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/main.py b/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/main.py index d51bbc24..e8383282 100644 --- a/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/main.py +++ b/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/main.py @@ -366,6 +366,7 @@ async def _process_gateway_message(req: GatewayRequest, emit_sse: bool = False) "domain": result.get("domain"), "mcp_tools": result.get("mcp_tools"), "mcp_results": result.get("mcp_results"), + "rag_results": result.get("rag_results"), "business_context": business_context.model_dump(), "identity_missing": missing_identity_keys, "judges": result.get("judge_results"), diff --git a/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/state.py b/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/state.py index 6ec11159..27d4f7b9 100644 --- a/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/state.py +++ b/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/state.py @@ -23,6 +23,7 @@ class AgentState(TypedDict, total=False): domain: str mcp_tools: list[str] mcp_results: list[dict[str, Any]] + rag_results: list[dict[str, Any]] available_mcp_tools: list[str] selected_tool_call: dict[str, Any] pending_tool_call: dict[str, Any] diff --git a/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/workflows/agent_graph.py b/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/workflows/agent_graph.py index d45cb7b9..197d16ec 100644 --- a/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/workflows/agent_graph.py +++ b/agent_framework_oci/Tuning-Performance/Long_Term_Memory/templates/agent_template_backend/app/workflows/agent_graph.py @@ -570,6 +570,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "output_guardrails_already_applied": False, "supervisor_action": "disabled", "supervisor_attempt": int(state.get("supervisor_attempt", 0)), @@ -577,7 +578,11 @@ class AgentWorkflow: context = { **(state.get("context") or {}), - "evidence": drained.mcp_results or (state.get("context") or {}).get("evidence"), + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), + "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), + "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), + "mcp_results": drained.mcp_results, + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), "mcp_results": drained.mcp_results, @@ -650,6 +655,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "guardrail_decisions": state.get("guardrail_decisions", []) + [item for r in decision.results for item in (r.metadata or {}).get("legacy_decisions", [])], } @@ -876,6 +882,7 @@ class AgentWorkflow: "judges": state.get("judge_results", []), "mcp_tools": state.get("mcp_tools", []), "mcp_results": state.get("mcp_results", []), + "rag_results": state.get("rag_results", []), }, ) diff --git a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/agents/billing_agent.py b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/agents/billing_agent.py index aa600999..e627beb9 100644 --- a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/agents/billing_agent.py +++ b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/agents/billing_agent.py @@ -108,6 +108,14 @@ class BillingAgent(AgentRuntimeMixin): "next_state": "BILLING_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/agents/orders_agent.py b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/agents/orders_agent.py index f557bed4..bdb3c244 100644 --- a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/agents/orders_agent.py +++ b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/agents/orders_agent.py @@ -108,6 +108,14 @@ class OrdersAgent(AgentRuntimeMixin): "next_state": "ORDER_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/agents/product_agent.py b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/agents/product_agent.py index 34433f57..3e1f0d6d 100644 --- a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/agents/product_agent.py +++ b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/agents/product_agent.py @@ -108,6 +108,14 @@ class ProductAgent(AgentRuntimeMixin): "next_state": "PRODUCT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/agents/support_agent.py b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/agents/support_agent.py index b4f0244f..99562a7d 100644 --- a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/agents/support_agent.py +++ b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/agents/support_agent.py @@ -108,6 +108,14 @@ class SupportAgent(AgentRuntimeMixin): "next_state": "SUPPORT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/main.py b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/main.py index 06d1bd14..7e9401f6 100644 --- a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/main.py +++ b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/main.py @@ -361,6 +361,7 @@ async def _process_gateway_message(req: GatewayRequest, emit_sse: bool = False) "domain": result.get("domain"), "mcp_tools": result.get("mcp_tools"), "mcp_results": result.get("mcp_results"), + "rag_results": result.get("rag_results"), "business_context": business_context.model_dump(), "identity_missing": missing_identity_keys, "judges": result.get("judge_results"), diff --git a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/state.py b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/state.py index ef4f2c70..9ec69485 100644 --- a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/state.py +++ b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/state.py @@ -23,6 +23,7 @@ class AgentState(TypedDict, total=False): domain: str mcp_tools: list[str] mcp_results: list[dict[str, Any]] + rag_results: list[dict[str, Any]] available_mcp_tools: list[str] selected_tool_call: dict[str, Any] pending_tool_call: dict[str, Any] diff --git a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/workflows/agent_graph.py b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/workflows/agent_graph.py index 1f139537..1f9954cb 100644 --- a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/workflows/agent_graph.py +++ b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend/app/workflows/agent_graph.py @@ -568,6 +568,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "output_guardrails_already_applied": False, "supervisor_action": "disabled", "supervisor_attempt": int(state.get("supervisor_attempt", 0)), @@ -575,7 +576,11 @@ class AgentWorkflow: context = { **(state.get("context") or {}), - "evidence": drained.mcp_results or (state.get("context") or {}).get("evidence"), + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), + "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), + "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), + "mcp_results": drained.mcp_results, + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), "mcp_results": drained.mcp_results, @@ -648,6 +653,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "guardrail_decisions": state.get("guardrail_decisions", []) + [item for r in decision.results for item in (r.metadata or {}).get("legacy_decisions", [])], } @@ -805,6 +811,7 @@ class AgentWorkflow: "judges": state.get("judge_results", []), "mcp_tools": state.get("mcp_tools", []), "mcp_results": state.get("mcp_results", []), + "rag_results": state.get("rag_results", []), }, ) diff --git a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/agents/billing_agent.py b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/agents/billing_agent.py index aa600999..e627beb9 100644 --- a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/agents/billing_agent.py +++ b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/agents/billing_agent.py @@ -108,6 +108,14 @@ class BillingAgent(AgentRuntimeMixin): "next_state": "BILLING_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/agents/orders_agent.py b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/agents/orders_agent.py index f557bed4..bdb3c244 100644 --- a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/agents/orders_agent.py +++ b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/agents/orders_agent.py @@ -108,6 +108,14 @@ class OrdersAgent(AgentRuntimeMixin): "next_state": "ORDER_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/agents/product_agent.py b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/agents/product_agent.py index 34433f57..3e1f0d6d 100644 --- a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/agents/product_agent.py +++ b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/agents/product_agent.py @@ -108,6 +108,14 @@ class ProductAgent(AgentRuntimeMixin): "next_state": "PRODUCT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/agents/support_agent.py b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/agents/support_agent.py index b4f0244f..99562a7d 100644 --- a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/agents/support_agent.py +++ b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/agents/support_agent.py @@ -108,6 +108,14 @@ class SupportAgent(AgentRuntimeMixin): "next_state": "SUPPORT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/main.py b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/main.py index 06d1bd14..7e9401f6 100644 --- a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/main.py +++ b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/main.py @@ -361,6 +361,7 @@ async def _process_gateway_message(req: GatewayRequest, emit_sse: bool = False) "domain": result.get("domain"), "mcp_tools": result.get("mcp_tools"), "mcp_results": result.get("mcp_results"), + "rag_results": result.get("rag_results"), "business_context": business_context.model_dump(), "identity_missing": missing_identity_keys, "judges": result.get("judge_results"), diff --git a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/state.py b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/state.py index ef4f2c70..9ec69485 100644 --- a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/state.py +++ b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/state.py @@ -23,6 +23,7 @@ class AgentState(TypedDict, total=False): domain: str mcp_tools: list[str] mcp_results: list[dict[str, Any]] + rag_results: list[dict[str, Any]] available_mcp_tools: list[str] selected_tool_call: dict[str, Any] pending_tool_call: dict[str, Any] diff --git a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/workflows/agent_graph.py b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/workflows/agent_graph.py index 1f139537..1f9954cb 100644 --- a/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/workflows/agent_graph.py +++ b/agent_framework_oci/Tuning-Performance/Normal/templates/agent_template_backend_day_zero/app/workflows/agent_graph.py @@ -568,6 +568,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "output_guardrails_already_applied": False, "supervisor_action": "disabled", "supervisor_attempt": int(state.get("supervisor_attempt", 0)), @@ -575,7 +576,11 @@ class AgentWorkflow: context = { **(state.get("context") or {}), - "evidence": drained.mcp_results or (state.get("context") or {}).get("evidence"), + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), + "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), + "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), + "mcp_results": drained.mcp_results, + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), "mcp_results": drained.mcp_results, @@ -648,6 +653,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "guardrail_decisions": state.get("guardrail_decisions", []) + [item for r in decision.results for item in (r.metadata or {}).get("legacy_decisions", [])], } @@ -805,6 +811,7 @@ class AgentWorkflow: "judges": state.get("judge_results", []), "mcp_tools": state.get("mcp_tools", []), "mcp_results": state.get("mcp_results", []), + "rag_results": state.get("rag_results", []), }, ) diff --git a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/agents/billing_agent.py b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/agents/billing_agent.py index aa600999..e627beb9 100644 --- a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/agents/billing_agent.py +++ b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/agents/billing_agent.py @@ -108,6 +108,14 @@ class BillingAgent(AgentRuntimeMixin): "next_state": "BILLING_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/agents/orders_agent.py b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/agents/orders_agent.py index f557bed4..bdb3c244 100644 --- a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/agents/orders_agent.py +++ b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/agents/orders_agent.py @@ -108,6 +108,14 @@ class OrdersAgent(AgentRuntimeMixin): "next_state": "ORDER_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/agents/product_agent.py b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/agents/product_agent.py index 34433f57..3e1f0d6d 100644 --- a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/agents/product_agent.py +++ b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/agents/product_agent.py @@ -108,6 +108,14 @@ class ProductAgent(AgentRuntimeMixin): "next_state": "PRODUCT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/agents/support_agent.py b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/agents/support_agent.py index b4f0244f..99562a7d 100644 --- a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/agents/support_agent.py +++ b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/agents/support_agent.py @@ -108,6 +108,14 @@ class SupportAgent(AgentRuntimeMixin): "next_state": "SUPPORT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/main.py b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/main.py index 06d1bd14..7e9401f6 100644 --- a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/main.py +++ b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/main.py @@ -361,6 +361,7 @@ async def _process_gateway_message(req: GatewayRequest, emit_sse: bool = False) "domain": result.get("domain"), "mcp_tools": result.get("mcp_tools"), "mcp_results": result.get("mcp_results"), + "rag_results": result.get("rag_results"), "business_context": business_context.model_dump(), "identity_missing": missing_identity_keys, "judges": result.get("judge_results"), diff --git a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/state.py b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/state.py index ef4f2c70..9ec69485 100644 --- a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/state.py +++ b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/state.py @@ -23,6 +23,7 @@ class AgentState(TypedDict, total=False): domain: str mcp_tools: list[str] mcp_results: list[dict[str, Any]] + rag_results: list[dict[str, Any]] available_mcp_tools: list[str] selected_tool_call: dict[str, Any] pending_tool_call: dict[str, Any] diff --git a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/workflows/agent_graph.py b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/workflows/agent_graph.py index 1f139537..1f9954cb 100644 --- a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/workflows/agent_graph.py +++ b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend/app/workflows/agent_graph.py @@ -568,6 +568,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "output_guardrails_already_applied": False, "supervisor_action": "disabled", "supervisor_attempt": int(state.get("supervisor_attempt", 0)), @@ -575,7 +576,11 @@ class AgentWorkflow: context = { **(state.get("context") or {}), - "evidence": drained.mcp_results or (state.get("context") or {}).get("evidence"), + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), + "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), + "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), + "mcp_results": drained.mcp_results, + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), "mcp_results": drained.mcp_results, @@ -648,6 +653,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "guardrail_decisions": state.get("guardrail_decisions", []) + [item for r in decision.results for item in (r.metadata or {}).get("legacy_decisions", [])], } @@ -805,6 +811,7 @@ class AgentWorkflow: "judges": state.get("judge_results", []), "mcp_tools": state.get("mcp_tools", []), "mcp_results": state.get("mcp_results", []), + "rag_results": state.get("rag_results", []), }, ) diff --git a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/agents/billing_agent.py b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/agents/billing_agent.py index aa600999..e627beb9 100644 --- a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/agents/billing_agent.py +++ b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/agents/billing_agent.py @@ -108,6 +108,14 @@ class BillingAgent(AgentRuntimeMixin): "next_state": "BILLING_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/agents/orders_agent.py b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/agents/orders_agent.py index f557bed4..bdb3c244 100644 --- a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/agents/orders_agent.py +++ b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/agents/orders_agent.py @@ -108,6 +108,14 @@ class OrdersAgent(AgentRuntimeMixin): "next_state": "ORDER_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/agents/product_agent.py b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/agents/product_agent.py index 34433f57..3e1f0d6d 100644 --- a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/agents/product_agent.py +++ b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/agents/product_agent.py @@ -108,6 +108,14 @@ class ProductAgent(AgentRuntimeMixin): "next_state": "PRODUCT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/agents/support_agent.py b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/agents/support_agent.py index b4f0244f..99562a7d 100644 --- a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/agents/support_agent.py +++ b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/agents/support_agent.py @@ -108,6 +108,14 @@ class SupportAgent(AgentRuntimeMixin): "next_state": "SUPPORT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/main.py b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/main.py index 06d1bd14..7e9401f6 100644 --- a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/main.py +++ b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/main.py @@ -361,6 +361,7 @@ async def _process_gateway_message(req: GatewayRequest, emit_sse: bool = False) "domain": result.get("domain"), "mcp_tools": result.get("mcp_tools"), "mcp_results": result.get("mcp_results"), + "rag_results": result.get("rag_results"), "business_context": business_context.model_dump(), "identity_missing": missing_identity_keys, "judges": result.get("judge_results"), diff --git a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/state.py b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/state.py index ef4f2c70..9ec69485 100644 --- a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/state.py +++ b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/state.py @@ -23,6 +23,7 @@ class AgentState(TypedDict, total=False): domain: str mcp_tools: list[str] mcp_results: list[dict[str, Any]] + rag_results: list[dict[str, Any]] available_mcp_tools: list[str] selected_tool_call: dict[str, Any] pending_tool_call: dict[str, Any] diff --git a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/workflows/agent_graph.py b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/workflows/agent_graph.py index 1f139537..1f9954cb 100644 --- a/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/workflows/agent_graph.py +++ b/agent_framework_oci/Tuning-Performance/Route_Stickness/templates/agent_template_backend_day_zero/app/workflows/agent_graph.py @@ -568,6 +568,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "output_guardrails_already_applied": False, "supervisor_action": "disabled", "supervisor_attempt": int(state.get("supervisor_attempt", 0)), @@ -575,7 +576,11 @@ class AgentWorkflow: context = { **(state.get("context") or {}), - "evidence": drained.mcp_results or (state.get("context") or {}).get("evidence"), + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), + "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), + "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), + "mcp_results": drained.mcp_results, + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), "mcp_results": drained.mcp_results, @@ -648,6 +653,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "guardrail_decisions": state.get("guardrail_decisions", []) + [item for r in decision.results for item in (r.metadata or {}).get("legacy_decisions", [])], } @@ -805,6 +811,7 @@ class AgentWorkflow: "judges": state.get("judge_results", []), "mcp_tools": state.get("mcp_tools", []), "mcp_results": state.get("mcp_results", []), + "rag_results": state.get("rag_results", []), }, ) diff --git a/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/agents/billing_agent.py b/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/agents/billing_agent.py index aa600999..e627beb9 100644 --- a/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/agents/billing_agent.py +++ b/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/agents/billing_agent.py @@ -108,6 +108,14 @@ class BillingAgent(AgentRuntimeMixin): "next_state": "BILLING_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/agents/orders_agent.py b/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/agents/orders_agent.py index f557bed4..bdb3c244 100644 --- a/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/agents/orders_agent.py +++ b/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/agents/orders_agent.py @@ -108,6 +108,14 @@ class OrdersAgent(AgentRuntimeMixin): "next_state": "ORDER_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/agents/product_agent.py b/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/agents/product_agent.py index 34433f57..3e1f0d6d 100644 --- a/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/agents/product_agent.py +++ b/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/agents/product_agent.py @@ -108,6 +108,14 @@ class ProductAgent(AgentRuntimeMixin): "next_state": "PRODUCT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/agents/support_agent.py b/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/agents/support_agent.py index b4f0244f..99562a7d 100644 --- a/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/agents/support_agent.py +++ b/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/agents/support_agent.py @@ -108,6 +108,14 @@ class SupportAgent(AgentRuntimeMixin): "next_state": "SUPPORT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/main.py b/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/main.py index e0363157..52585276 100644 --- a/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/main.py +++ b/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/main.py @@ -460,6 +460,7 @@ async def _process_gateway_message(req: GatewayRequest, emit_sse: bool = False) "domain": result.get("domain"), "mcp_tools": result.get("mcp_tools"), "mcp_results": result.get("mcp_results"), + "rag_results": result.get("rag_results"), "transaction_evidence": result.get("relevant_transaction_evidence", []), "business_context": business_context.model_dump(), "identity_missing": missing_identity_keys, diff --git a/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/state.py b/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/state.py index de25c1e8..fbb54b63 100644 --- a/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/state.py +++ b/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/state.py @@ -23,6 +23,7 @@ class AgentState(TypedDict, total=False): domain: str mcp_tools: list[str] mcp_results: list[dict[str, Any]] + rag_results: list[dict[str, Any]] available_mcp_tools: list[str] selected_tool_call: dict[str, Any] pending_tool_call: dict[str, Any] diff --git a/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/workflows/agent_graph.py b/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/workflows/agent_graph.py index f700f35d..87389012 100644 --- a/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/workflows/agent_graph.py +++ b/agent_framework_oci/Tuning-Performance/Transaction_Evidence/agent_template_backend/app/workflows/agent_graph.py @@ -570,6 +570,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "output_guardrails_already_applied": False, "supervisor_action": "disabled", "supervisor_attempt": int(state.get("supervisor_attempt", 0)), @@ -577,7 +578,11 @@ class AgentWorkflow: context = { **(state.get("context") or {}), - "evidence": drained.mcp_results or (state.get("context") or {}).get("evidence"), + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), + "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), + "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), + "mcp_results": drained.mcp_results, + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), "mcp_results": drained.mcp_results, @@ -650,6 +655,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "guardrail_decisions": state.get("guardrail_decisions", []) + [item for r in decision.results for item in (r.metadata or {}).get("legacy_decisions", [])], } @@ -733,6 +739,7 @@ class AgentWorkflow: relevant_transaction_evidence = list(state.get("relevant_transaction_evidence") or []) judge_context["transaction_evidence"] = relevant_transaction_evidence current_evidence = list(state.get("mcp_results", []) or []) + current_evidence.extend(state.get("rag_results", []) or []) current_evidence.extend(relevant_transaction_evidence) judge_context["evidence"] = current_evidence or judge_context.get("evidence") judge_context["route"] = state.get("route") @@ -880,6 +887,7 @@ class AgentWorkflow: "judges": state.get("judge_results", []), "mcp_tools": state.get("mcp_tools", []), "mcp_results": state.get("mcp_results", []), + "rag_results": state.get("rag_results", []), "transaction_evidence": state.get("relevant_transaction_evidence", []), }, ) diff --git a/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/agents/billing_agent.py b/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/agents/billing_agent.py index aa600999..e627beb9 100644 --- a/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/agents/billing_agent.py +++ b/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/agents/billing_agent.py @@ -108,6 +108,14 @@ class BillingAgent(AgentRuntimeMixin): "next_state": "BILLING_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/agents/orders_agent.py b/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/agents/orders_agent.py index f557bed4..bdb3c244 100644 --- a/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/agents/orders_agent.py +++ b/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/agents/orders_agent.py @@ -108,6 +108,14 @@ class OrdersAgent(AgentRuntimeMixin): "next_state": "ORDER_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/agents/product_agent.py b/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/agents/product_agent.py index 34433f57..3e1f0d6d 100644 --- a/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/agents/product_agent.py +++ b/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/agents/product_agent.py @@ -108,6 +108,14 @@ class ProductAgent(AgentRuntimeMixin): "next_state": "PRODUCT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/agents/support_agent.py b/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/agents/support_agent.py index b4f0244f..99562a7d 100644 --- a/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/agents/support_agent.py +++ b/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/agents/support_agent.py @@ -108,6 +108,14 @@ class SupportAgent(AgentRuntimeMixin): "next_state": "SUPPORT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/main.py b/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/main.py index 86530a36..891f0e06 100644 --- a/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/main.py +++ b/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/main.py @@ -460,6 +460,7 @@ async def _process_gateway_message(req: GatewayRequest, emit_sse: bool = False) "domain": result.get("domain"), "mcp_tools": result.get("mcp_tools"), "mcp_results": result.get("mcp_results"), + "rag_results": result.get("rag_results"), "transaction_evidence": result.get("relevant_transaction_evidence", []), "transaction_pre_validation": result.get("transaction_pre_validation"), "business_context": business_context.model_dump(), diff --git a/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/state.py b/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/state.py index 0b4da3e9..aee4d926 100644 --- a/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/state.py +++ b/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/state.py @@ -23,6 +23,7 @@ class AgentState(TypedDict, total=False): domain: str mcp_tools: list[str] mcp_results: list[dict[str, Any]] + rag_results: list[dict[str, Any]] available_mcp_tools: list[str] selected_tool_call: dict[str, Any] pending_tool_call: dict[str, Any] diff --git a/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/workflows/agent_graph.py b/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/workflows/agent_graph.py index f700f35d..87389012 100644 --- a/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/workflows/agent_graph.py +++ b/agent_framework_oci/Tuning-Performance/Transaction_Pre_Validation/agent_template_backend/app/workflows/agent_graph.py @@ -570,6 +570,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "output_guardrails_already_applied": False, "supervisor_action": "disabled", "supervisor_attempt": int(state.get("supervisor_attempt", 0)), @@ -577,7 +578,11 @@ class AgentWorkflow: context = { **(state.get("context") or {}), - "evidence": drained.mcp_results or (state.get("context") or {}).get("evidence"), + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), + "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), + "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), + "mcp_results": drained.mcp_results, + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), "mcp_results": drained.mcp_results, @@ -650,6 +655,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "guardrail_decisions": state.get("guardrail_decisions", []) + [item for r in decision.results for item in (r.metadata or {}).get("legacy_decisions", [])], } @@ -733,6 +739,7 @@ class AgentWorkflow: relevant_transaction_evidence = list(state.get("relevant_transaction_evidence") or []) judge_context["transaction_evidence"] = relevant_transaction_evidence current_evidence = list(state.get("mcp_results", []) or []) + current_evidence.extend(state.get("rag_results", []) or []) current_evidence.extend(relevant_transaction_evidence) judge_context["evidence"] = current_evidence or judge_context.get("evidence") judge_context["route"] = state.get("route") @@ -880,6 +887,7 @@ class AgentWorkflow: "judges": state.get("judge_results", []), "mcp_tools": state.get("mcp_tools", []), "mcp_results": state.get("mcp_results", []), + "rag_results": state.get("rag_results", []), "transaction_evidence": state.get("relevant_transaction_evidence", []), }, ) diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/__pycache__/__init__.cpython-313.pyc index 047d5216c38b3b02440d6582454b225c07bda2c2..9e6ab7b1546b373394ba976bcdb57f9efd829fc2 100644 GIT binary patch delta 19 ZcmbQsJeQg4GcPX}0}$NI*~m4S5dbk;1oi*` delta 19 ZcmbQsJeQg4GcPX}0}zBqZ{(WH2mmem1Y-aI diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/__pycache__/extensions.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/__pycache__/extensions.cpython-313.pyc index fd8778da20d4c1b2889b74d19ee2f4655ef0f900..47e059740bea2d968009a7b21be7367607ba43a6 100644 GIT binary patch delta 19 ZcmcaBa94oqGcPX}0}$NI*~k^l0RTIk1y=w7 delta 19 ZcmcaBa94oqGcPX}0}zBqZ{!N*001~U1jGOU diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/__pycache__/idempotency.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/__pycache__/idempotency.cpython-313.pyc index c608aeea175ff576e6d705c35b292042fd7b1f54..419d753a15b944a1b58a8c686234e33829a7c592 100644 GIT binary patch delta 19 ZcmccQddZdRGcPX}0}$NI*~oQ52>?PK208!$ delta 19 ZcmccQddZdRGcPX}0}zBqZ{#|m1OPt01*ZT2 diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/__pycache__/observer.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/__pycache__/observer.cpython-313.pyc index 203b5bbb052570d4b10de95f4b21c6ee54f96999..01101db924a5b707e898df279b520ff566e9565a 100644 GIT binary patch delta 21 bcmbQ*$vCx>k?S)rFBbz4+|1d?)$IZRMY#qq delta 21 bcmbQ*$vCx>k?S)rFBbz4ghy}W>UIGDLRbZy diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/__pycache__/__init__.cpython-313.pyc index 47bd891d32f3e71be202e80b6822fc85e49ee4af..171af7a9e44fbd759ae24d118163e19b636a5eb1 100644 GIT binary patch delta 19 ZcmZ3=vXq7EGcPX}0}$NI*~lf$1OPFv1d#v$ delta 19 ZcmZ3=vXq7EGcPX}0}zBqZ{(6@0st;e1O5O2 diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/__pycache__/composite_publisher.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/__pycache__/composite_publisher.cpython-313.pyc index d8eb7a49fdbf07ce1e4cc7ac1c72739c6dcceda7..e7aa90165a7fb514c4296d49c3706cfd65ef69cc 100644 GIT binary patch delta 19 ZcmX>hd_tJ(GcPX}0}$NI*~qnz6975o1)l%_ delta 19 ZcmX>hd_tJ(GcPX}0}zBqZ{*s?2>>>P1q=WH diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/__pycache__/event_builder.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/__pycache__/event_builder.cpython-313.pyc index 62703d076551e6aa9bcd9d841f2b6ff56403f236..a06866c9d49d92743e08c19099ea2c6bb4aaf57a 100644 GIT binary patch delta 19 ZcmaFI`Hqw8GcPX}0}$NI*~s;T1pq!U1^55} delta 19 ZcmaFI`Hqw8GcPX}0}zBqZ{&Ky0suPC1!VvL diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/__pycache__/factory.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/__pycache__/factory.cpython-313.pyc index eb85102bae7ac7cabeabf6102c62a92b6999a62e..1e73aaa889a99e2812e11fc4dbcb095e3e4830f9 100644 GIT binary patch delta 19 ZcmbOyKTn?PGcPX}0}$NI*~m489{@E+1wQ}) delta 19 ZcmbOyKTn?PGcPX}0}zBqZ{(W74*)Ud1gro6 diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/__pycache__/publisher.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/__pycache__/publisher.cpython-313.pyc index aab04f79119b0cce1179c6410fabdc50b6d83657..8fcf15f5d02813d2c88cebd40810a82546dfd486 100644 GIT binary patch delta 19 Zcmcb_cZrYdGcPX}0}$NI*~sO=4gfi|1u*~s delta 19 Zcmcb_cZrYdGcPX}0}zBqZ{+e|2LLuy1fBo@ diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/__pycache__/tim_payload_mapper.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/__pycache__/tim_payload_mapper.cpython-313.pyc index dabdbc8965fbb762b370e8f11773eb6d5eaa17a8..a4a4b6fcd45c4abe0bdefb4a1d16289c4234d60d 100644 GIT binary patch delta 19 ZcmX@%al(V^GcPX}0}$NI*~n$50sue?1*8A~ delta 19 ZcmX@%al(V^GcPX}0}zBqZ{)I50RTLy1rY!M diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/__pycache__/tim_sequence.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/__pycache__/tim_sequence.cpython-313.pyc index e4b04ed744e3f9a2ef9150a8bcc99a53060b6181..a18f97b5d01b9cc8958509185ddb1c51701fa80b 100644 GIT binary patch delta 21 bcmbQ;$vC@{k?S)rFBbz4+|1d?HPHnCMz01z delta 21 bcmbQ;$vC@{k?S)rFBbz4ghy}Wn&<)mLrw** diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/providers/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/providers/__pycache__/__init__.cpython-313.pyc index 603d36e8c3844b0a4cd5b77a5d05c8a18633acf4..31392dd29cbd20f717336a0753ed70edaa235b80 100644 GIT binary patch delta 19 ZcmZo+X<^~|%*)Hg00cL4Hgf%91OP6_1uXyo delta 19 ZcmZo+X<^~|%*)Hg00iOD8@YZl0st#!1eyQ< diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/providers/__pycache__/kafka.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/providers/__pycache__/kafka.cpython-313.pyc index 999cc817ce21a59a74b02854c4037b54a185487c..b5e221b2a45c0a9235e1c84e871489dbf9b41c73 100644 GIT binary patch delta 19 ZcmbQnH;s?$GcPX}0}$NI*~rDi4gfIC1bqMi delta 19 ZcmbQnH;s?$GcPX}0}zBqZ{*@(2LLT>1L^<( diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/providers/__pycache__/langfuse.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/providers/__pycache__/langfuse.cpython-313.pyc index 81b64310ef42356445f976da25cfe4f78a742e8d..1387eaaa92436c263a48b9ee63efbb77d9f43ff9 100644 GIT binary patch delta 21 bcmZqM%GkD*k?S)rFBbz4+|1d?RTBjONyG+l delta 21 bcmZqM%GkD*k?S)rFBbz4ghy}Ws)+&sMq>rt diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/providers/__pycache__/oci_streaming.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/providers/__pycache__/oci_streaming.cpython-313.pyc index af57afa9521e87e6921be6c3a7c30739afad3f82..585cc2841c4ad97f56b90c0430977154b1d3800d 100644 GIT binary patch delta 19 ZcmbQwH=mE|GcPX}0}$NI*~lfz4gfME1egE- delta 19 ZcmbQwH=mE|GcPX}0}zBqZ{!kX2LLX@1O)&9 diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/providers/__pycache__/pubsub.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/analytics/providers/__pycache__/pubsub.cpython-313.pyc index bdc754f33c1f4d7219f2c7a10b7af4533e05e1c5..cfeae8e067794ecc40c113e8ea258e8abf616e15 100644 GIT binary patch delta 19 ZcmbPaHOY$WGcPX}0}$NI*~rBq3jj7F1m6Gv delta 19 ZcmbPaHOY$WGcPX}0}zBqZ{*^T1pqR_1WW(` diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/billing/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/billing/__pycache__/__init__.cpython-313.pyc index ce3571a7827d5f3d8d8d8f65460afb07014586a4..beff5c8389cb8b1869a4db7b456bdda0dfddb5e1 100644 GIT binary patch delta 19 ZcmbQrJe8U2GcPX}0}$NG*~rz+2mmlK1m6Gv delta 19 ZcmbQrJe8U2GcPX}0}w<+Z{+G`1OP111WW(` diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/billing/__pycache__/usage_repository.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/billing/__pycache__/usage_repository.cpython-313.pyc index 6b69221dc69c2303a81d6d285a0274eb7f0ddc1b..386d5fbc73df7de8644101120ddc3a0fd2ee1cf1 100644 GIT binary patch delta 19 ZcmX?6b)t&vGcPX}0}$NG*~n#Q3jjvV1|k3e delta 19 ZcmX?6b)t&vGcPX}0}w<+Z{)JG1pq^A1&;s# diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/cache/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/cache/__pycache__/__init__.cpython-313.pyc index 3c13dadb2a9ad3cd8bb20db03f1019f3884cce59..570985a09abeab3709960b58077d9cf26ce1b13d 100644 GIT binary patch delta 18 Ycmcc4c%6~!GcPX}0}$NKnaFh(05iP>fdBvi delta 18 Ycmcc4c%6~!GcPX}0}w<;Pvkla05I?3(1w#M; delta 19 ZcmdmGw9AO=GcPX}0}w<+Z{#wN1OPXr1hD`B diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/channels/__pycache__/transcription.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/channels/__pycache__/transcription.cpython-313.pyc index 7d0f8edee1b97f031e7ad5c723678c5a3335e6e0..17f6fd043738c906b863eb69aaeeeac64962535c 100644 GIT binary patch delta 19 ZcmbQvJ)N8DGcPX}0}$NI*~rz)3IH*S1o!{| delta 19 ZcmbQvJ)N8DGcPX}0}w<+Z{+G_1pqEE1ZDsL diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/checkpoints/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/checkpoints/__pycache__/__init__.cpython-313.pyc index 823af306ba4dfb10bf14b6d5b4bd398cba92ee78..a89c93af39a9db8b271ef08fec274c2e85ac09dc 100644 GIT binary patch delta 19 ZcmbQsK9`;AGcPX}0}$NG*~m4S82~Zs1pxp6 delta 19 ZcmbQsK9`;AGcPX}0}w<+Z{(WH3;-^Q1a1HT diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/checkpoints/__pycache__/checkpoint_repository.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/checkpoints/__pycache__/checkpoint_repository.cpython-313.pyc index ea320db567a0612754503629c5044bd9dd178328..1b4826bfbc63729b3ebc55a8bc0dbee810bce08f 100644 GIT binary patch delta 21 bcmbPxg>mi`My}7iyj%=Ga4Tmcmv9yUQ3M8r delta 21 bcmbPxg>mi`My}7iyj%=G5D~qROE?PvO``?z diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/checkpoints/__pycache__/langgraph_saver.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/checkpoints/__pycache__/langgraph_saver.cpython-313.pyc index 3daa5593a47454deaa506ec28cf65ed8b436ecd9..34b526898166801e1e2dba39f10ee5076fe78e54 100644 GIT binary patch delta 21 bcmey|%=EdLiR&{jFBbz4+{)R=^|BEFR8I$e delta 21 bcmey|%=EdLiR&{jFBbz4L_}}odf5m7Q0@lm diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/config/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/config/__pycache__/__init__.cpython-313.pyc index 1a708ad6544be1c96353294b92d464fe13e43040..a251e6897423687e4df318dd219d0d9ff0bfca67 100644 GIT binary patch delta 18 Ycmcb?c!QDaGcPX}0}$NGnaFhx05jVKg8%>k delta 18 Ycmcb?c!QDaGcPX}0}w<+PvklW05J^&@Bjb+ diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/config/__pycache__/agent_registry.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/config/__pycache__/agent_registry.cpython-313.pyc index aaa4fd7e0beb0dbf65ad70e5c82320c69202c6be..4d737a18775088b30cf45f2e189583f889e56583 100644 GIT binary patch delta 19 ZcmZ2#w$zO4GcPX}0}$NG*~ld=4FEWC1rGoK delta 19 ZcmZ2#w$zO4GcPX}0}w<+Z{(7e1^_h>1bhGh diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/config/__pycache__/settings.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/config/__pycache__/settings.cpython-313.pyc index 6e9cb7a3ab241dc265d300824ba1eb43b1d68af3..4175dd4cb67a7efffc555037aa91e40a49524e8a 100644 GIT binary patch delta 19 ZcmcbgeLtJ)GcPX}0}$NG*~oR(6aYyv2EhOT delta 19 ZcmcbgeLtJ)GcPX}0}w<+Z{)ga3IIjW1}*>q diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/gateways/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/gateways/__pycache__/__init__.cpython-313.pyc index d7cab90e48d60d2cf1167fa929c517b7394ed3ed..fb011b5f6793484cd01bc77074f8b618c485393f 100644 GIT binary patch delta 19 ZcmdnOw1tW5GcPX}0}$NG*~q2E2mmvw1iAnK delta 19 ZcmdnOw1tW5GcPX}0}w<;Z{*Tq1OPBj1SkLi diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/gateways/__pycache__/mcp_gateway_client.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/gateways/__pycache__/mcp_gateway_client.cpython-313.pyc index 420e8dffcc18b09f7f10230fbc4e3044fb2aabfc..6c5836963c0c2fe412f6ee530092e81dd785c2f9 100644 GIT binary patch delta 19 ZcmZpZYLnvn%*)Hg00g&kHgf&p0RS=(1#18R delta 19 ZcmZpZYLnvn%*)Hg00fcI8@c}Q001tv1la%p diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/__init__.cpython-313.pyc index d7182df26cc53db509237caabf973cc5ade34ce7..e67486929d7acc87bcea7dd167e89642b5912002 100644 GIT binary patch delta 19 Zcmcc5eV?1_GcPX}0}$NG*~oR36#zUz1!J?;PwWPl diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/llm_rails.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/llm_rails.cpython-313.pyc index 963724cab465862eac824275d33736305f167752..8d8f919a3dcafa9df89d3f96e46e523b0bb75a8f 100644 GIT binary patch delta 19 ZcmZ3gw^WboGcPX}0}$NG*~ld=4gfb@1p5F0 delta 19 ZcmZ3gw^WboGcPX}0}w<+Z{(5|2LLnt1ZV&N diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/output_supervisor.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/output_supervisor.cpython-313.pyc index c4b79277968c33eeb3282398d49c6bf55c3173df..548ec0546a4323185c107c93e354229581f1706a 100644 GIT binary patch delta 21 bcmeyem+{M9My}7iyj%=Ga4Tmc*Q+=HT$BgT delta 21 bcmeyem+{M9My}7iyj%=G5D~qR>s1^8Su+Pb diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/parallel_executor.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/parallel_executor.cpython-313.pyc index 21dc1a6550f19bf90c1db93276fd39c0753c3f0e..e3641b6ad80f9d9cd01c3a877fc0639cee612d04 100644 GIT binary patch delta 21 bcmaE{it)uNMy}7iyj%=Ga4TmcS6nCnR^SHw delta 21 bcmaE{it)uNMy}7iyj%=G5D~qRD=riOQ-20& diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/pipeline.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/pipeline.cpython-313.pyc index bf2c81c73b1d24d1953630e37ab94f10ae7a84e7..1e5a9b9635eaf0a55be427989df3d21bd5e73b1f 100644 GIT binary patch delta 19 ZcmeAU?GEMo%*)Hg00g&kHgYv;0RTC|1&#m! delta 19 YcmeAU?GEMo%*)Hg00a@y8@U>_05)L+`v3p{ diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/rail_action.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/rail_action.cpython-313.pyc index 9403c2c7155277dd9598b430408f8ed12f274109..d80bc2d3f21f2dd934c75c02f562a34776a2a6b3 100644 GIT binary patch delta 19 ZcmbQhI)RnzGcPX}0}$NG*~rz#1OP9%1l0fl delta 19 ZcmbQhI)RnzGcPX}0}w<+Z{%uY0st&m1VR7+ diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/rail_decision.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/rail_decision.cpython-313.pyc index df1c3267968cbf0e89b9925c1e24a577ce900913..ac1ae631c5170120413e5fccaf54a2c6de3b1a72 100644 GIT binary patch delta 19 ZcmX@kbDW3kGcPX}0}$NG*~n$f1^_qI1q=WH delta 19 ZcmX@kbDW3kGcPX}0}w<+Z{)IN0{}F01bF}e diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/rail_result.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/rail_result.cpython-313.pyc index 9553b2ed8209900070df9d81ee366a60cdcd6658..32fb0ab1872155d6cecf02e2dd503cfe11116602 100644 GIT binary patch delta 19 ZcmaFI{*ImNGcPX}0}$NG*~s;T82~-;1@r&_ delta 19 ZcmaFI{*ImNGcPX}0}w<+Z{&Ky3;;Ti1z`XH diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/rails.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/__pycache__/rails.cpython-313.pyc index 0a6f6b0e8673c2dfe7dafc19b8b9c621a0bd6e70..c5b5b845d737ad32664c90229d022682e1266c2b 100644 GIT binary patch delta 21 bcmdmYiD};@Ca%xCyj%=Ga4Tmcm&r;1R%Hhy delta 21 bcmdmYiD};@Ca%xCyj%=G5D~qR%VZ@0Qv?Q) diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/__init__.cpython-313.pyc index e9006a642b310682c5841d6c187ccb959a1638d5..1bfc7a6ab870e54084a02c8fb71555a865837a98 100644 GIT binary patch delta 19 ZcmdlYzD1ntGcPX}0}$NG*~qnu8vr+b1#SQU delta 19 ZcmdlYzD1ntGcPX}0}w<+Z{%9V4FEJ81ls@r diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/_compat.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/_compat.cpython-313.pyc index f815d3c5411d884fb976265ad37074f6efc47a1f..3916d89d14c8cd6dc1a1a6c8befd1a03d5c15d4c 100644 GIT binary patch delta 19 ZcmeAd?ic3z%*)Hg00g&kHgdIc0st{}1oZ#_ delta 19 YcmeAd?ic3z%*)Hg00a@y8@XCJ0WK5-VgLXD diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/contestation_validation.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/contestation_validation.cpython-313.pyc index 7a71e277f7d191b5dd6db1467b29ff89bf2ad4fe..e818798a4488801df846c0dfe0dce323eecd1cb4 100644 GIT binary patch delta 19 ZcmZn`Y!>AD%*)Hg00g&kHgZ*R001v&1k3;c delta 19 YcmZn`Y!>AD%*)Hg00a@y8@Vbu04xUtIRF3v diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/contracts.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/contracts.cpython-313.pyc index ce1a4d85cf93d04fbf4f48712791b6a04ce9b95f..037267311a8ef5266b355a4a03517c0f53d281d2 100644 GIT binary patch delta 19 Zcmexv`rVZ4GcPX}0}$NG*~s-)3IIiV27&+p delta 19 Zcmexv`rVZ4GcPX}0}w<+Z{&I_1pq=B1@8a= diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/input_size.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/input_size.cpython-313.pyc index 19bcadb51df53a71a00b8ab9756647532aec9878..b21b72b29b8169ad077af32b15313c7f07bded69 100644 GIT binary patch delta 19 ZcmX>sb6AG!GcPX}0}$NG*~n$d2LL%_1tsb6AG!GcPX}0}w<+Z{)J%0{}Jy1eE{) diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/llm_adapter.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/llm_adapter.cpython-313.pyc index 3da66dd7ea605944cb7a952cafbd8514a62df269..b15f86c964479352421bd87898443705b294ee16 100644 GIT binary patch delta 19 Zcmca9dsCL{GcPX}0}$NG*~oRC4*)&N1?&I- delta 19 Zcmca9dsCL{GcPX}0}w<+Z{#}92LL*01z7+9 diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/llm_client.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/llm_client.cpython-313.pyc index f1404d7ce10bfb990d29d9cf7a148a369d65f7e8..9c8fbc947c5d8c566150434f08e5cdb2165500a0 100644 GIT binary patch delta 19 ZcmZ2rwZMw&GcPX}0}$NG*~ld(3jjDh1quKF delta 19 ZcmZ2rwZMw&GcPX}0}w<+Z{!k_1pqYM1a|-c diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/llm_rails.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/llm_rails.cpython-313.pyc index e89c2722e1e1c71f8b70936ec9d8d59e7415380a..78bb173bcacfea29a29e8641039bb6aed61a1019 100644 GIT binary patch delta 19 ZcmX@$dcc+IGcPX}0}$NG*~qm`2>?HM1_b~B delta 19 ZcmX@$dcc+IGcPX}0}w<+Z{*sh1OPl21#$oY diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/output_sanitization.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/output_sanitization.cpython-313.pyc index 09d07e138d3e530d4d2aa95f429b6523ce72251f..3d364730a0d4d950186a238b64eb4cdc6f3fc4d6 100644 GIT binary patch delta 19 ZcmcbSb0dfAGcPX}0}$NG*~sN*1^`D&1}^{r delta 19 ZcmcbSb0dfAGcPX}0}w<+Z{+eb0{}zm1)Kl? diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/pipeline.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/__pycache__/pipeline.cpython-313.pyc index 9a4db63101b5d1dcbd7c7ff1a618c0f395e9272e..324b0fb5d0716ce4994f12bf6fd70cd88be0306b 100644 GIT binary patch delta 19 ZcmeyK^gW5|GcPX}0}$NG*~pb^2mnfp26F%a delta 19 ZcmeyK^gW5|GcPX}0}w<+Z{*4~1OP`W1>gVx diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/prompts/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/prompts/__pycache__/__init__.cpython-313.pyc index e086b178acfb37fd9e50f0757dc63614c658cf75..92693d1d337bbc27b6202e622ed4ce2367efe96a 100644 GIT binary patch delta 19 Zcmcc3e4Cl;GcPX}0}$NG*~oQ~5db=s1+f4C delta 19 Zcmcc3e4Cl;GcPX}0}w<+Z{)hj2mm)U1s(tZ diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/prompts/__pycache__/_context.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/prompts/__pycache__/_context.cpython-313.pyc index e6f4625510a514d925f8701beae5792589a0f48d..24514e29c5219b838c316fe37de10dcb4f898b00 100644 GIT binary patch delta 19 ZcmeyU`%#zcGcPX}0}$NG*~s-=3;;ud23!CD delta 19 ZcmeyU`%#zcGcPX}0}w<+Z{&I|1^_@I1<3#a diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/prompts/__pycache__/ausencia_oferta_proativa.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/prompts/__pycache__/ausencia_oferta_proativa.cpython-313.pyc index ce8fd813997f09f8b909a1d3f8d5d16cb7e03d2f..c8eb5e0062312b89a3ac0758ba04c002edd013c9 100644 GIT binary patch delta 19 ZcmZ1y> delta 21 bcmccK!Fauck?S)rFBbz4L_}}o@^t|KOUnh} diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/prompts/__pycache__/pinj.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/prompts/__pycache__/pinj.cpython-313.pyc index db480d7dc34e2b37617432545d509b6cbdd98493..0fca1941bc13401b9f02347f41d3640c9e6491a5 100644 GIT binary patch delta 19 ZcmaFm_{x#%GcPX}0}$NG*~s-k0RTlR26+Gg delta 19 ZcmaFm_{x#%GcPX}0}w<+Z{&KQ002SB1?B(% diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/prompts/__pycache__/ragsec.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/prompts/__pycache__/ragsec.cpython-313.pyc index 5f4023bddbb23bda1771912289089157724e7fa9..6bfe49519fc85aaba79db33912b8cfe8c5930146 100644 GIT binary patch delta 19 ZcmaFF@rZ-#GcPX}0}$NG*~k^a0suQq1ycY3 delta 19 ZcmaFF@rZ-#GcPX}0}w<+Z{&(#0RT7a1i%0Q diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/prompts/__pycache__/revprec.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/prompts/__pycache__/revprec.cpython-313.pyc index ff9d2d5b6e9e7b97755c2b2958f26c93c0634012..9f2d9a96cc0ce306fec41c542346380a45b5a31e 100644 GIT binary patch delta 19 Zcmca0aY2IXGcPX}0}$NG*~sO_0{}Y61w{Y= delta 19 Zcmca0aY2IXGcPX}0}w<+Z{%|00RT5=1hN1C diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/prompts/__pycache__/tox.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/prompts/__pycache__/tox.cpython-313.pyc index 9212d475458882dafa94f6938a8856c2d3dcaa79..831d03ac04adc864a99f9485e76ff63facd60494 100644 GIT binary patch delta 19 ZcmZo;ZDZy7%*)Hg00g&kHgeT40RS#M1h)VH delta 19 YcmZo;ZDZy7%*)Hg00a@y8@Xzj04m!ABme*a diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/prompts/__pycache__/toxicidade_output.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/prompts/__pycache__/toxicidade_output.cpython-313.pyc index baf476b15daf624e380929a6d2b459283a4680ed..998cae134a75889c3c0e8287b20e0637847a6565 100644 GIT binary patch delta 19 ZcmZ3)zKEUcGcPX}0}$NG*~m4682~b=1rPuL delta 19 ZcmZ3)zKEUcGcPX}0}w<+Z{(W63;-`k1bqMi diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rails/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rails/__pycache__/__init__.cpython-313.pyc index 8934ee8e94cc951a32c7d5e6d923a92106d8d0ba..aa9d59997ce4ca41417f6443c95bf4911d40fd4a 100644 GIT binary patch delta 19 ZcmZqVZRF+p%*)Hg00g&kHgc7-0RS$N1iSzM delta 19 YcmZqVZRF+p%*)Hg00a@y8@bBa04p&BDF6Tf diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rails/__pycache__/alcada.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rails/__pycache__/alcada.cpython-313.pyc index a1d01dac0342348fd4942ff27b7ab84efd50c72d..1013767cdcd1c369531be02eff94e8076f95b691 100644 GIT binary patch delta 19 ZcmeBF?^Ngd%*)Hg00g&kHgeSq0{}Ba1r-1Q delta 19 YcmeBF?^Ngd%*)Hg00a@y8@cL*0WabNf&c&j diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rails/__pycache__/anatel.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rails/__pycache__/anatel.cpython-313.pyc index 24be80faa104fc89d790dd4f92162e7374036eed..f4a656288b359622de024895f7d39f43be398862 100644 GIT binary patch delta 19 ZcmdnzzR#WOGcPX}0}$NG*~qm;82~?V1_S^A delta 19 ZcmdnzzR#WOGcPX}0}w<+Z{*sd3;;Y31#tiX diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rails/__pycache__/confirmation.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rails/__pycache__/confirmation.cpython-313.pyc index 6924bce5681616660dd65b4045e1270baf575842..27d36a486d6d185f06f84c0029d494792b9e72b3 100644 GIT binary patch delta 19 ZcmZ1ywj_+}GcPX}0}$NG*~lfO4FEiw1zZ3C delta 19 ZcmZ1ywj_+}GcPX}0}w<+Z{(8F1^_ua1jzsZ diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rails/__pycache__/dlex_in.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rails/__pycache__/dlex_in.cpython-313.pyc index 27537fb7f1b66bca142fe5d26f6d5f3ceaca9670..a5045828c44a8c80794144927c0b234f8f05ec9e 100644 GIT binary patch delta 19 Zcmca8c~O$O delta 19 ZcmZpbYL(*p%*)Hg00a@y8@Yb-001tD1l0fl diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rails/__pycache__/ragsec.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rails/__pycache__/ragsec.cpython-313.pyc index 9194807bba1e03cd23b4debf6e295f9fb04cd96f..d721fe49229127363d68206955ed824830ce6825 100644 GIT binary patch delta 19 Zcmcbibwi8mGcPX}0}$NG*~sN53IIN31&ROw delta 19 Zcmcbibwi8mGcPX}0}w<+Z{+e51pqq)1or>{ diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rails/__pycache__/revprec.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rails/__pycache__/revprec.cpython-313.pyc index a53d2027322669a217315397b466233fb392ccf2..7973b2a7da6bffe6cd72c98debc6922994a1f921 100644 GIT binary patch delta 19 ZcmaE$^+1d3GcPX}0}$NG*~k?p3IIQq1)=}| delta 19 ZcmaE$^+1d3GcPX}0}w<+Z{!LS1pquW1rGoK diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rails/__pycache__/tox.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rails/__pycache__/tox.cpython-313.pyc index 019c89a3c620f4acd5917e7c4e98aff3b4ed5aa8..a7e0e360abf8b03c15642407bb3cea9f4c2da0af 100644 GIT binary patch delta 19 ZcmaFv@Z5pxGcPX}0}$NG*~k^E002Xl1?~U< delta 19 ZcmaFv@Z5pxGcPX}0}w<+Z{&(q002NW1zP|B diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rules/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rules/__pycache__/__init__.cpython-313.pyc index 5f3c4ad96a6fa463cae30077e3773b621d935828..526b5cf15a5d944671b22807b46dfa6ea0261e78 100644 GIT binary patch delta 19 ZcmbQvGM$C%GcPX}0}$NG*~rDq1OP9f1ZV&N delta 19 ZcmbQvGM$C%GcPX}0}w<+Z{*@-0st&O1JwWk diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rules/__pycache__/alcada.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rules/__pycache__/alcada.cpython-313.pyc index e22e83be0c7eed7de5ff9648fcc8ed7b1f15d0d0..0c9b4c37a66435c37302b65fb8f139947a229ede 100644 GIT binary patch delta 19 Zcmcc3cbkvvGcPX}0}$NG*~k^h4gfn51x)|| delta 19 Zcmcc3cbkvvGcPX}0}w<+Z{!MO2LLy)1iAnK diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rules/__pycache__/pinj_patterns.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rules/__pycache__/pinj_patterns.cpython-313.pyc index 74c84ca1f7034e55d07935a997fba9e79c0821ee..2d7ea502a4cc446b33e750827ffb066314371867 100644 GIT binary patch delta 19 ZcmbOtJ4Kf3GcPX}0}$NG*~rz!2LLmS1swnY delta 19 ZcmbOtJ4Kf3GcPX}0}w<+Z{+IY0{}291d0Fv diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rules/__pycache__/tox_blocklist.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/guardrails/calibrated/rules/__pycache__/tox_blocklist.cpython-313.pyc index 45c61b4d5c609b0fbdf8aaaa0593a8855a2099c8..4e2b23b0344e8fb1e7588c469ef3630f92b9e16a 100644 GIT binary patch delta 19 ZcmaFD{e+wAGcPX}0}$NG*~oQ^6#zW{1>gVx delta 19 ZcmaFD{e+wAGcPX}0}w<+Z{)hg3II8t1x)|| diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/identity/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/identity/__pycache__/__init__.cpython-313.pyc index bd9109adb6a468824bc9b94fda4395b3ee839f09..79439883877a81131f504af51643c66ccd62e957 100644 GIT binary patch delta 19 ZcmbQmJd2s@GcPX}0}$NK*~m445dbjt1n&R< delta 19 ZcmbQmJd2s@GcPX}0}w<;Z{(W52mmdV1Y7_B diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/identity/__pycache__/mcp_mapper.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/identity/__pycache__/mcp_mapper.cpython-313.pyc index bd8769c3021bc61145b1cd9adb00a4b86aef749a..1fffb81f904a1d66b1ea13111d0202d3cda5198d 100644 GIT binary patch delta 19 Zcmcbna!rNnGcPX}0}$NK*~sN11OPoy1$F=c delta 19 Zcmcbna!rNnGcPX}0}w<;Z{+e30suMh1mgez diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/identity/__pycache__/models.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/identity/__pycache__/models.cpython-313.pyc index e487e49ab0fe455c0defe3e6d4fbc53500844561..b015c14bb4e41702938dbcf88dfd013b8a2b8b20 100644 GIT binary patch delta 19 ZcmX>laY};gGcPX}0}$NK*~sO<0{}Vd1vCHv delta 19 ZcmX>laY};gGcPX}0}w<;Z{%{|0RT3M1fc)` diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/identity/__pycache__/resolver.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/identity/__pycache__/resolver.cpython-313.pyc index 5fade9b9eef09fe381cf23c1d629b4023f80f372..4e40edf35a91d7f130e258cb754b00901ce14d29 100644 GIT binary patch delta 19 ZcmaE@@>+%KGcPX}0}$NK*~pbB1OPy81+@SG delta 19 ZcmaE@@>+%KGcPX}0}w<;Z{$i80suV?1tI_d diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/judges/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/judges/__pycache__/__init__.cpython-313.pyc index 0e772978457e9d40957822aec5c44df2096ecaa5..2c9423c896ff7eda6f517aa24fc4dda292215725 100644 GIT binary patch delta 19 ZcmaFE@`i=$GcPX}0}$NG*~pc|1OPlf1!n*N delta 19 ZcmaFE@`i=$GcPX}0}w<+Z{$j10suJO1k?Zk diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/judges/__pycache__/judge.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/judges/__pycache__/judge.cpython-313.pyc index fbf09e6b39510d00d9bbea1b0d30709baff5afab..5b6c9bea97c6f1d3443090e67e02bb68ac6f9cd8 100644 GIT binary patch delta 21 bcmca~o$1nbCa%xCyj%=Ga4Tmc*NN2tTT}<^ delta 21 bcmca~o$1nbCa%xCyj%=G5D~qR>%?jRSMvv1 diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/judges/calibrated/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/judges/calibrated/__pycache__/__init__.cpython-313.pyc index e973635b945615a64b3cb8b400deba10057ac6d6..a8f8bd445da0b4df9230c8f82739f1ff76b5dbbf 100644 GIT binary patch delta 18 YcmaFN_?VIFGcPX}0}$NGnaFh$05x0%qyPW_ delta 18 YcmaFN_?VIFGcPX}0}w<+Pvp7@05XmR5dZ)H diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/judges/calibrated/__pycache__/llm_client.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/judges/calibrated/__pycache__/llm_client.cpython-313.pyc index dd4cde5ec7efbf850a4bc72d919d7763bee9e890..da332e3a3dafa1075d3483a5b045fbf871d4f3d5 100644 GIT binary patch delta 19 ZcmbQIHBXD{GcPX}0}$NG*~ld#3IH|91l#}s delta 19 ZcmbQIHBXD{GcPX}0}w<+Z{!jY1pqQ=1W5n@ diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/judges/calibrated/prompts/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/judges/calibrated/prompts/__pycache__/__init__.cpython-313.pyc index 349e8519476b85c8d9e9805aaa26654242732f43..1e1a85bdf29402da666678e6963524da678698b0 100644 GIT binary patch delta 18 YcmaFO_?nUHGcPX}0}$NGnaK4J05)_5yZ`_I delta 18 YcmaFO_?nUHGcPX}0}w<+Pvm+C05hfqDF6Tf diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/judges/calibrated/prompts/__pycache__/aluc.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/judges/calibrated/prompts/__pycache__/aluc.cpython-313.pyc index 3fbf3a3d3531c82a8cb27a01851655168c505768..0569e929e37bbff41785643ab650b593faa09fcd 100644 GIT binary patch delta 19 ZcmZoRZZ_un%*)Hg00g&kHgZ);0su4p1t9*n! delta 19 ZcmaEA_tcK-GcPX}0}w<+Z{&)W2LL~$1yBG0 diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/judges/calibrated/prompts/__pycache__/rqlt.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/judges/calibrated/prompts/__pycache__/rqlt.cpython-313.pyc index 8689c1c64b7961fbf53bd5d6ee56bc25352cdb13..cdc86752ac40eabbf44f752e55db8f41eea34a22 100644 GIT binary patch delta 19 ZcmeC@?C0eA%*)Hg00g&kHgdJH001x?1l#}s delta 19 YcmeC@?C0eA%*)Hg00a@y8@XCp04%!%NdN!< diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/judges/calibrated/prompts/__pycache__/vctn.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/judges/calibrated/prompts/__pycache__/vctn.cpython-313.pyc index 66c3634f6810a2be2ad068eb22508423d1ace925..e915a97034ede7a3a852c7562c6a69c8b5b54851 100644 GIT binary patch delta 19 Zcmeyu@`Z)#GcPX}0}$NG*~pc}1OPp51%Chl delta 19 Zcmeyu@`Z)#GcPX}0}w<+Z{*5i0suM<1nd9+ diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/llm/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/llm/__pycache__/__init__.cpython-313.pyc index ea7723da4cf090d742f838b873e9149363080077..914bae727f0c854903138793069b6b25db2e7772 100644 GIT binary patch delta 19 Zcmcb|e2}1-bwL delta 19 Zcmcb|e2>`U1up;q diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/memory/__pycache__/long_term_memory.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/memory/__pycache__/long_term_memory.cpython-313.pyc index 0441f7455896283f02e23908cc34a38a0de35cba..6aa97e0f7d88b0725af5ca09e21fc380909d4316 100644 GIT binary patch delta 19 ZcmdmKy3>^FGcPX}0}$NK*~qnC3IIGz1<3#a delta 19 ZcmdmKy3>^FGcPX}0}w<;Z{%7p1pqkf1vUTx diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/memory/__pycache__/long_term_models.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/memory/__pycache__/long_term_models.cpython-313.pyc index b11c0204464a9f5ce4fe2c0fcdb5b36f73963490..5f9e9dabfa56f9be696d4b70ab95780e9ca966eb 100644 GIT binary patch delta 19 Zcmcb{dySXtGcPX}0}$NK*~oQ<4FEef1-t+N delta 19 Zcmcb{dySXtGcPX}0}w<;Z{#||1^_qJ1t|ak diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/memory/__pycache__/long_term_store.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/memory/__pycache__/long_term_store.cpython-313.pyc index 0982f8cb136c1da3bb0ee73aa08be7e3995c828f..36f94e18d7657228d70ff731d0dc5ac07e738425 100644 GIT binary patch delta 21 bcmZp9!r1bJk?S)rFBbz4+|Jp^^{Ws7QD6sQ delta 21 bcmZp9!r1bJk?S)rFBbz4L`HAq`c()3P5%bY diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/memory/__pycache__/message_history.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/memory/__pycache__/message_history.cpython-313.pyc index 91e9e27906d42c618f4dea67c722b9afc53a6270..ade5aed48131fefc6657431fb3dc46b38c5560e8 100644 GIT binary patch delta 19 ZcmZ4KxYCj9GcPX}0}$NK*~m3t0RTIS1-AeI delta 19 ZcmZ4KxYCj9GcPX}0}w<;Z{(V<001~C1tb6f diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/memory/__pycache__/summary_memory.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/memory/__pycache__/summary_memory.cpython-313.pyc index a3fa80545835ae28a8492c112204868e5b70e5cc..3e8188b164fa2566ac89a366297c78007cae17e9 100644 GIT binary patch delta 19 ZcmaEm_#lz%GcPX}0}$NK*~oRx002k?2CM)8 delta 19 ZcmaEm_#lz%GcPX}0}w<;Z{)gW002az1{nYV diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/memory/__pycache__/summary_store.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/memory/__pycache__/summary_store.cpython-313.pyc index e70f0ede80fef2a5c21aec8c2ce568d0419f0b6d..5f3ce0d44e5e35701cffda8a7e518fc93532ccca 100644 GIT binary patch delta 19 ZcmdnwwaJU?GcPX}0}$NK*~q1#3IIJ91!({P delta 19 ZcmdnwwaJU?GcPX}0}w<;Z{*TY1pqm=1l9lm diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/models/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/models/__pycache__/__init__.cpython-313.pyc index 8764649831053dc5e7cc9b8b18cfc6d2b7b20082..3fa4f4580a96881f56ec63771c4d0436c50bf31a 100644 GIT binary patch delta 18 Ycmcb?c!QDaGcPX}0}$NGnaFhx05jVKg8%>k delta 18 Ycmcb?c!QDaGcPX}0}w<+PvklW05J^&@Bjb+ diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/models/__pycache__/identity.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/models/__pycache__/identity.cpython-313.pyc index c37e1efa0d17d0a9f0977acbfb30bbfea09575e5..c273cb37cddb0c8c6957b72811b15877625d35fa 100644 GIT binary patch delta 19 ZcmeB{?w02I%*)Hg00g&kHgYxc0st}b1pNR2 delta 19 YcmeB{?w02I%*)Hg00a@y8@U>J0WOdPY5)KL diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/models/__pycache__/session.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/models/__pycache__/session.cpython-313.pyc index e94ab292a1d3b40004da03ab03d080b2e86e0e21..142868d5e629495f8be33b5c8a4235c453ff5c4b 100644 GIT binary patch delta 19 ZcmbOxI!%=8GcPX}0}$NG*~rzy1pqR{1rGoK delta 19 ZcmbOxI!%=8GcPX}0}w<+Z{+IX0st>#1bhGh diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/__init__.cpython-313.pyc index 15633666de451d129e267d28944d7755eeb94330..3095e2ed2ae70eaa8dbf7dbad2e8cb5df9cebaa2 100644 GIT binary patch delta 19 Zcmeyu^@WS;GcPX}0}$NI*~pc}3IIMg1&sgz delta 19 Zcmeyu^@WS;GcPX}0}zBqZ{*5i1pqqM1o{8~ diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/code_mapper.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/code_mapper.cpython-313.pyc index 9b2dfe1720b8e44dfb6934f0a43112fd211d0b68..ff5056714a7fe6d861990b56b52f0edebcce05e1 100644 GIT binary patch delta 21 bcmX@PoblvxMy}7iyj%=Ga5HBk*ZyDtQgR0t delta 21 bcmX@PoblvxMy}7iyj%=G5FWjeYkx2RPZ0)# diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/context.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/context.cpython-313.pyc index 94a0e2616328983078fe4802cdf0900a898d6a00..0a8326bf3a5bfedf251fcc8762fad18ff0022521 100644 GIT binary patch delta 19 Zcmca(dB>9LGcPX}0}$NI*~oQC1^_|)208!$ delta 19 Zcmca(dB>9LGcPX}0}zBqZ{)fp0{}jo1*ZT2 diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/event_bus.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/event_bus.cpython-313.pyc index b9567f3c855042d1bf719c4ec91820c5f03dcb3a..4dd047fb91b2d6efa7c79b50c948ce9b7589155a 100644 GIT binary patch delta 19 Zcmdlavq^^QGcPX}0}$NI*~q2A2LLwM1oQv^ delta 19 Zcmdlavq^^QGcPX}0}zBqZ{*V80{}C31YrOG diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/guardrail_events.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/guardrail_events.cpython-313.pyc index dee1bde730eebfbcb0fbeb88d9eb0bded9c12d31..f8b4db195dd31bac9b6eefce0875c8b713dcbc72 100644 GIT binary patch delta 19 ZcmZn>Xc6H0%*)Hg00cL4Hgf%92LLc-1xo+` delta 19 ZcmZn>Xc6H0%*)Hg00iOD8@Yb50{|@q1h@bI diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/ic_events.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/ic_events.cpython-313.pyc index bfb7a89904940decfeadc32fcab45a359fea8c58..1737199e4b5233b676c5d1f31b100a1a2eb74c8f 100644 GIT binary patch delta 19 Zcmey&@|lI}GcPX}0}$NI*~pd21OPok1$zJh delta 19 Zcmey&@|lI}GcPX}0}zBqZ{*5k0suMT1n2+& diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/judge_events.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/judge_events.cpython-313.pyc index 74645fdf965d22f8a4393c72f70d6680a0bf822e..0adfa30d5d1e1d2de246e65447c1d107768a06e3 100644 GIT binary patch delta 19 ZcmZqSZsF$o%*)Hg00cL4HgZ+50st<#1it_P delta 19 YcmZqSZsF$o%*)Hg00iOD8@Z}j0V`MpEC2ui diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/langgraph_telemetry.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/langgraph_telemetry.cpython-313.pyc index 12a17b67d2343e9e86d57a8f3385c9f107d3e872..594ea7507551b01d4bfc12f9279e4f663dc3b1df 100644 GIT binary patch delta 19 ZcmaE=_Ee4QGcPX}0}$NI*~k?w3;;jF1*QN1 delta 19 ZcmaE=_Ee4QGcPX}0}zBqZ{&&=1^_%_1rq=O diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/llm_advisors.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/llm_advisors.cpython-313.pyc index 1f4b4f152cc305a3c53a6b8f9a949fb90dae40a5..fe74b6de0f9dfb6f61ec49e33e5e11187b1d4d25 100644 GIT binary patch delta 19 Zcmew@_FIhWGcPX}0}$NI*~nGM4FEvj1;79R delta 19 Zcmew@_FIhWGcPX}0}zBqZ{#ZE1^_*N1uXyo diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/noc_contract.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/noc_contract.cpython-313.pyc index 1ed0646374cb55584e4a16fcc0009d89723db2dc..fb73ce38d420ce18bc2973c14700fc7ef5cdd7d5 100644 GIT binary patch delta 19 Zcmcbjenp+@GcPX}0}$NI*~oQD7yv$B1@!;` delta 19 Zcmcbjenp+@GcPX}0}zBqZ{#{93;;U*1!4dI diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/noc_otel.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/noc_otel.cpython-313.pyc index 1e2b554cb4f5858a331442f737ed2204866e0082..7e18ce6c75dc721523979d69f1bc151a7f081cd0 100644 GIT binary patch delta 19 ZcmdmNxY>~FGcPX}0}$NI*~qn00suPF1*-r6 delta 19 ZcmdmNxY>~FGcPX}0}zBqZ{%7j0RT5~1sDJT diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/observer.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/observer.cpython-313.pyc index 70e9f4d302c407494ae9bebe8d50cb3812ef554b..8b8e1e10fb2d3575334785f6caa0d3bd4ec73275 100644 GIT binary patch delta 19 ZcmeyQ{z;wdGcPX}0}$NI*~s-m7yv@k22TJ0 delta 19 ZcmeyQ{z;wdGcPX}0}zBqZ{&I*3;;iJ1-t+N diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/otel.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/otel.cpython-313.pyc index 09163f854d89ba850a345f94d6b254aa73358d99..ef635b56ecc909f82a7e9ec76afaa0d4d64b5a3b 100644 GIT binary patch delta 19 ZcmcaAbybS%GcPX}0}$NI*~sP13jjOC1y}$8 delta 19 ZcmcaAbybS%GcPX}0}zBqZ{+gk1pqi?1jPUV diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/streaming_events.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/streaming_events.cpython-313.pyc index edcda5b278ead3a50f4055814f68676c89727d0b..a877ac2ca0893d39169c0acfc4f2dc7745a3f309 100644 GIT binary patch delta 19 ZcmZ3(w}y}FGcPX}0}$NI*~q2D4gfR}1it_P delta 19 ZcmZ3(w}y}FGcPX}0}zBqZ{$*92LLdz1S|jm diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/telemetry.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/telemetry.cpython-313.pyc index deb82cf10bc5817ff453fb254f9b7632e1acc8a0..6d765162bf91ab87aadf217533eb9669df2477f5 100644 GIT binary patch delta 21 bcmX>*llkmSX0Fe?yj%=Ga5HBk*Woh&QO^g1 delta 21 bcmX>*llkmSX0Fe?yj%=G5FWje>+l%>PHqP9 diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/token_cost.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/token_cost.cpython-313.pyc index f1008fdbc7f40762dc2576ac91850f2eff5eca20..2446025531d61ad41fb114c373262163e5497d3b 100644 GIT binary patch delta 19 Zcmez3{Kc8;GcPX}0}$NI*~s-u5dcQz2Aco? delta 19 Zcmez3{Kc8;GcPX}0}zBqZ{&KV2mnKb1_%HE diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/workflow_events.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/observability/__pycache__/workflow_events.cpython-313.pyc index 93dc35b08be44fa1bc1ce15f22e5bf92cab947a5..f503e3a187b4041fb9b46c426f795c2fe4559c33 100644 GIT binary patch delta 19 ZcmZpcYL?>q%*)Hg00cL4Hgf&s0RSq%*)Hg00iOD8@Yb+001sG1kL~e diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/oci/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/oci/__pycache__/__init__.cpython-313.pyc index acd781af3658d5f3ff40ca8ef457678097ba1cba..ad435b05ba6893b1f2ff7c9c2ae7015a5a4861da 100644 GIT binary patch delta 18 Ycmcc0c$JasGcPX}0}$NGnaFh-05ft0dH?_b delta 18 Ycmcc0c$JasGcPX}0}w<+Pvklc05GHk=Kufz diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/oci/__pycache__/auth.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/oci/__pycache__/auth.cpython-313.pyc index 2af4386c2cc372553141a19342aa9bae4375921b..bb18b524b51eef49d14180cab4993d93b37299b7 100644 GIT binary patch delta 19 ZcmZ20xmJ?vGcPX}0}$NG*~qn+2LLv>1zrFE delta 19 ZcmZ20xmJ?vGcPX}0}w<+Z{%9c0{}Bu1j_&b diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/persistence/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/persistence/__pycache__/__init__.cpython-313.pyc index 364e0963dd9eb5520e4ae0f792d9e0497dfe50bd..733a8d0f08330da33f7b24958960e0abee0fdb83 100644 GIT binary patch delta 18 Ycmcc1c$bmuGcPX}0}$NGnaFh+05pmPk^lez delta 18 Ycmcc1c$bmuGcPX}0}w<;Pvp7`05QP@00000 diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/persistence/__pycache__/oracle_store.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/persistence/__pycache__/oracle_store.cpython-313.pyc index 0095c968fed802f360b40bc8e37a87ebbb1ab041..e56a636984f17088ad949ee178a53d86f18e74fe 100644 GIT binary patch delta 21 bcmaF+jOpz&Ca%xCyj%=Ga4TmcSMp{6VA==c delta 21 bcmaF+jOpz&Ca%xCyj%=G5E;FZD|s^jU4I8r diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/persistence/__pycache__/sqlite_store.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/persistence/__pycache__/sqlite_store.cpython-313.pyc index a0efd0680eac40171d0d61532c7825707ee0a842..cb0ebebe271e34b231de61c6e39fb8d9eceb287a 100644 GIT binary patch delta 19 ZcmZ2ex~7!tGcPX}0}$NG*~qoX3IIa*20;J- delta 19 ZcmZ2ex~7!tGcPX}0}w<;Z{%8J1pq&t1+M@A diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/presentation/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/presentation/__pycache__/__init__.cpython-313.pyc index 89c4493ea39ec8ad957922b56b9fe823f0e9665c..6f0c89e4d316b87231c641d658fbe6c99f1267b9 100644 GIT binary patch delta 19 ZcmX@Xe1e(lGcPX}0}$NG*~qnz5db&C1$Y1e delta 19 ZcmX@Xe1e(lGcPX}0}w<;Z{*s?2mmx_1m*w$ diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/presentation/__pycache__/renderers.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/presentation/__pycache__/renderers.cpython-313.pyc index c896e8ea278b5ab216baff727ecde8a115ba09f0..1968a29db873f5970f1124e908c34c17429c245b 100644 GIT binary patch delta 19 Zcmcbwcwdq0GcPX}0}$NG*~oQO002KY1_%HE delta 19 Zcmcbwcwdq0GcPX}0}w<;Z{)fv002AP1$F=c diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/rag/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/rag/__pycache__/__init__.cpython-313.pyc index ec312ff3604d947e08ac1b4eceac3f18f4b4f99a..c9d635ac0b00452d49841cad12e6ca3c124e6e88 100644 GIT binary patch delta 19 ZcmX@kdYqN(GcPX}0}$NG*~qn*2>>_Z1$qDg delta 19 ZcmX@kdYqN(GcPX}0}w<;Z{*s`1OPOL1n2+& diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/rag/__pycache__/embedding_provider.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/rag/__pycache__/embedding_provider.cpython-313.pyc index 0ff0750c1419b93e12e7697a4c27596606af2f4f..bdf965d5ea2e7e233093c29a6562ab0a5bcbf657 100644 GIT binary patch delta 19 Zcmexn^v#ItGcPX}0}$NG*~pb62>?Uw1^55} delta 19 Zcmexn^v#ItGcPX}0}w<;Z{*661OPyi1!e#M diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/rag/__pycache__/graph_store.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/rag/__pycache__/graph_store.cpython-313.pyc index de313c883a0ac73eabfd8e0996a04f2018a99644..9b8823526853e7ea735a29cacef261e754f66d17 100644 GIT binary patch delta 19 ZcmbQKJyV$(R3Pqqe? diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/rag/kbdb_service.py b/agent_framework_oci/libs/agent_framework/src/agent_framework/rag/kbdb_service.py index e8422b24..423b805d 100644 --- a/agent_framework_oci/libs/agent_framework/src/agent_framework/rag/kbdb_service.py +++ b/agent_framework_oci/libs/agent_framework/src/agent_framework/rag/kbdb_service.py @@ -85,6 +85,43 @@ class KbdbRagService: finally: conn.close() + @staticmethod + def _procedure_arguments(cur) -> list[dict[str, Any]]: + """Discover the installed facade signature instead of assuming bind types.""" + cur.execute( + """ + SELECT argument_name, position, in_out, data_type, overload + FROM all_arguments + WHERE package_name = 'PKG_KB_SERVING' + AND object_name = 'SEARCH_KNOWLEDGE_BASE' + AND data_level = 0 + ORDER BY NVL(overload, '0'), sequence + """ + ) + rows = cur.fetchall() + if not rows: + return [] + # Use the first visible overload. Each returned row describes one bind. + first_overload = rows[0][4] + return [ + { + "name": str(row[0] or ""), + "position": int(row[1] or 0), + "in_out": str(row[2] or "IN").upper(), + "data_type": str(row[3] or "").upper(), + } + for row in rows + if row[4] == first_overload and int(row[1] or 0) > 0 + ] + + @staticmethod + def _out_var(cur, oracledb, data_type: str): + if data_type == "JSON" and hasattr(oracledb, "DB_TYPE_JSON"): + return cur.var(oracledb.DB_TYPE_JSON) + if data_type in {"CLOB", "NCLOB"} and hasattr(oracledb, "DB_TYPE_CLOB"): + return cur.var(oracledb.DB_TYPE_CLOB) + return cur.var(oracledb.DB_TYPE_VARCHAR, size=32767) + def _search_sync(self, query: str, k: int) -> dict[str, Any]: import oracledb metadata = self.settings.KBDB_METADATA_JSON @@ -95,8 +132,13 @@ class KbdbRagService: cur = conn.cursor() if self.settings.KBDB_MIN_SCORE is not None: cur.callproc("PKG_KB_SERVING.set_min_score", [float(self.settings.KBDB_MIN_SCORE)]) - out = cur.var(oracledb.DB_TYPE_JSON) - cur.callproc("PKG_KB_SERVING.search_knowledge_base", [ + signature = self._procedure_arguments(cur) + if not signature: + raise RuntimeError( + "Não foi possível descobrir a assinatura de " + "PKG_KB_SERVING.SEARCH_KNOWLEDGE_BASE em ALL_ARGUMENTS" + ) + canonical_inputs = [ self.settings.KBDB_SEARCH_TYPE, query, int(k), @@ -106,8 +148,50 @@ class KbdbRagService: int(self.settings.KBDB_MAX_CROSS_REF_HOPS), self.settings.KBDB_DOCUMENT_TYPE or None, metadata or None, - out, - ]) + ] + named_inputs = { + "SEARCH_TYPE": self.settings.KBDB_SEARCH_TYPE, + "QUERY": query, + "QUERY_TEXT": query, + "QUESTION": query, + "TOP_K": int(k), + "K": int(k), + "NODE_EXPANSION": bool(self.settings.KBDB_NODE_EXPANSION), + "ENABLE_NODE_EXPANSION": bool(self.settings.KBDB_NODE_EXPANSION), + "NODE_MAX_RELATED": int(self.settings.KBDB_NODE_MAX_RELATED), + "MAX_RELATED_NODES": int(self.settings.KBDB_NODE_MAX_RELATED), + "GRAPH_CROSS_REF": bool(self.settings.KBDB_GRAPH_CROSS_REF), + "ENABLE_GRAPH_CROSS_REF": bool(self.settings.KBDB_GRAPH_CROSS_REF), + "MAX_CROSS_REF_HOPS": int(self.settings.KBDB_MAX_CROSS_REF_HOPS), + "DOCUMENT_TYPE": self.settings.KBDB_DOCUMENT_TYPE or None, + "METADATA_JSON": metadata or None, + "METADATA": metadata or None, + } + input_index = 0 + binds: list[Any] = [] + out = None + for argument in signature: + if "OUT" in argument["in_out"]: + bind = self._out_var(cur, oracledb, argument["data_type"]) + binds.append(bind) + out = bind + continue + if input_index >= len(canonical_inputs): + raise RuntimeError( + "Assinatura KBDB possui parâmetros de entrada não suportados: " + f"{[item['name'] for item in signature]}" + ) + normalized_name = argument["name"].strip().upper() + if normalized_name.startswith("P_"): + normalized_name = normalized_name[2:] + value = named_inputs.get(normalized_name, canonical_inputs[input_index]) + input_index += 1 + if argument["data_type"] == "NUMBER" and isinstance(value, bool): + value = 1 if value else 0 + binds.append(value) + if out is None: + raise RuntimeError("Assinatura KBDB não possui parâmetro OUT visível") + cur.callproc("PKG_KB_SERVING.search_knowledge_base", binds) value = _lob_value(out.getvalue()) if isinstance(value, str): return json.loads(value) diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/repositories/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/repositories/__pycache__/__init__.cpython-313.pyc index 472278b0c9c59c93a6f9f5e4491ee47cf3e5caf6..f326045174332481c69cffdab0c7d746162e1bd1 100644 GIT binary patch delta 18 Ycmcb|c#o0mGcPX}0}$NInaFho05qrtlmGw# delta 18 Ycmcb|c#o0mGcPX}0}zBqPvp7+05RGH0RR91 diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/repositories/__pycache__/session_repository.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/repositories/__pycache__/session_repository.cpython-313.pyc index 312153faf5d7d72bbe3eaf2af7afb5bf1c253731..ae555f559a2fe60a0c521705d876a042da6dafd2 100644 GIT binary patch delta 19 ZcmeBo?sw+;%*)Hg00cL4HgdHp0suGX1#AES delta 19 YcmeBo?sw+;%*)Hg00iOD8@XB)0W^jL*#H0l diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/routing/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/routing/__pycache__/__init__.cpython-313.pyc index 333011b8cf0c2e357e64aa053f5b31d5a6efcef6..3c9f6b052ae831637e9a78a6fccfddc39b520b3c 100644 GIT binary patch delta 19 ZcmeBV?PTTp%*)Hg00g&lHgeT70RS$v1i=6R delta 19 YcmeBV?PTTp%*)Hg00fcI8@cM404q}jE&u=k diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/routing/__pycache__/config_loader.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/routing/__pycache__/config_loader.cpython-313.pyc index a75ba967d3e748b148bea45f46549272a0ff5095..fcbbfdfba170cdeb06407386d4215f3d09cb648d 100644 GIT binary patch delta 19 ZcmZn`Z5HMF%*)Hg00g&lHgZ*R0RS)f1lIrn delta 19 YcmZn`Z5HMF%*)Hg00fcI8@VdE04$dTL;wH) diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/routing/__pycache__/continuity.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/routing/__pycache__/continuity.cpython-313.pyc index 44f00e267d917a8c37fa8bf5420723edd845e741..3bb32a12ef258f28a8935899d0d5033bfe76a16f 100644 GIT binary patch delta 19 ZcmdmAv%iMxGcPX}0}$NK*~n#T2LMIF1`PlJ delta 19 ZcmdmAv%iMxGcPX}0}w<;Z{#wy0{}u{1$qDg diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/routing/__pycache__/enterprise_router.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/routing/__pycache__/enterprise_router.cpython-313.pyc index 572ecf90fb9dd82ba04b0268a7cacfc6d3648a6b..53b18084b05a9973191a5e5d131c0e5e3e91565f 100644 GIT binary patch delta 24 ecmcaIkLAid7Ou~{yj%=Ga66}wYbzI{7e4@Itp@o3 delta 24 ecmcaIkLAid7Ou~{yj%=G5E>yn1o;2} delta 19 ZcmbOrJVBW2GcPX}0}w<;Z{%v@1OP5T1ZDsL diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/routing/__pycache__/multi_intent.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/routing/__pycache__/multi_intent.cpython-313.pyc index 2419ff365063943222b55a78c14b9d950644a937..57aed7e1517b89b69d528f01bc37ac370f5bac4a 100644 GIT binary patch delta 63 zcmeC4!#HUUBkyNkUM>b8xSg{&>&!;pbWTA-ATOp^OT*qOT2IkFR=Z|%9jB=im(Pi$ R^C>4&F7pO&-s|nh1OQ!16k-4X delta 56 zcmbOb8h>TvGb#xnlbHBd=bZONLF{LYp%BS@h;sQb=agY+*D-L=J` z6G2C~Z3vRY02tf=Fq}H$0a^hY7)B19EMgjlyQ<^KvS9|&Dn72u0=Gi{h9`}JVfeFisSpfm-&!6u_( z2Iyb{W`O3=#T?YU7WypoHwu=UIj}wO7+nzS2JM~u1xle7?{Fh!gmi|*;c#EUA5cDK zJ!tQsTH+$vHmyAawT^xU6GSyT#+Ze13lmx=)^u5z%m6HRTi8RaxPA5kK)zPS<95xi zb!w@8#{@K_4xqadK$n_zPhtOaGyoUjIz7t>z>r&7D5I|(Jy30FA+6{NI>vRj?qQai zQE|UzROY5!?uEvQz#2Ciu!Ygj90%R#S1yU(;yD3t`49j+h>-xy9yrvj#PIwtbGjw7 z%iF^2!ORinspc;8y-gDQxL z!}$o|V?}J%1L!uNaqHX={y{RjfCFTy*=Nzed^+B8U!ovuo0$V(35?QFump$cC8%al zR#>M@5BgsC!qD0{tz%4uj|=sU7yAb!o)qT`aFYS2Bu)9C@L>lsct^<$o@3 z6jq9+siJ?R#E^iExz%DNU&vST<~Z@NRK<&>LeW?(?y(n)(u)_0d)!(PXDZ~)OKU-t zkpt-%9%dT}@D|K`$;h2A8ikUvoU4@2mloH|C2aEIZ*71R|GXU#KMX^I4(jtag@a0>n8YfF)Ko21`ngn+d%j*-=J;lfJsNpltJ$Xl{@ z1tt8aCK%XV2N)jGfC|#S-X~Z(0zG*t8&3P)c9)ak2RBnc3ZBAL1=8oyNWuu$}IG`Px2XB`W`${ zjhhRPla)t8rH6^~uR__kvBu{(Q`%|rPnkIZp5%%a%yH+w2JmE8#%+Gckf&H+NQ~kt zj)LEad25d=K%)jgyo!H{#i%^X9L>=&5}9P-Zf4-cNaj$yuhAbp)m2yVj%a5GrEUQ% zDP1!X?Fu9U0T#!IQqF62aAB6!!7*KJnK@R7$qErV-r9Eth-p*6aAn0o>(`}LW%haaI(&DojD^lk;HONlrSG+A;h9nB4#wiv3g)w z4skrlQY)jRK<}VvI-uxRat_yGv&_?T;Ho8XbyTH{W(>5?z<1@ttg_!eKJLcxb7^$& z^yaumm0BIHMMcaeEjTwxN1a&e9Xcfw_zrK&Z4RJehtmsk8Anv5(3k>Hpa8DalKQ8% zKayEa9WC~*M4i5;-|+%nvBvHGUVK?yD4MQB&gaRQimdcRLQ9n_hUR|Yd!`sm}AW^ z@TqpBIB-YvFvmAO09c0^J`d~cIKR%S&tXl!g+J=w4;`i5{&)cNw*bE$KyGK-ILok- zc$+2htHcO9iuV%Jm@;jnNcrERS696DwKd_kDm=TB-{SVhPS-A z=CwDxE6cB6-`rT;@-I`$qIb&^@Hg{^ox9d|94FamrOL4z49s-r4Th&vAE}>S`u6xE zW$}Tq_|Gx?D^*>YpK3+fPbZYcG44Lk7K@Slf)K>97j;VfYzqOF&P>wqOQsOuOh7#l z&kWPBTV%9&cP!fy#NAUt;vvr{ekkx1H>)wfiLa%T%1cz6uLp1uKTN;L&Z3+dt^`&4 zLD@dtE$Dt>40F@R9BLDyZ delta 30 kcmaFR!}FkrhwC#hFBbz4L`FAqwQ@1Gaxrb?Vh&>i0E~(UkN^Mx diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/runtime/__pycache__/transaction_parameters.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/runtime/__pycache__/transaction_parameters.cpython-313.pyc index d95c6edeffce77597b2f592f3c8d128fa8b11da2..359fe7555dc034a5afc286ac2ead3f396a3e8d3f 100644 GIT binary patch delta 21 bcmZpi$=EoPk?S)rFBbz4+|Jp^Rqg`-MCk?{ delta 21 bcmZpi$=EoPk?S)rFBbz4L`HAqD)#{ZL5Ky4 diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/sse/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/sse/__pycache__/__init__.cpython-313.pyc index 2c4f45ab413903df9ba1493c1748594759ea3e5f..26baa6268843892ba0f4e94b6f142d4d6df77c0d 100644 GIT binary patch delta 18 Ycmcc0c$JasGcPX}0}$NKnaFh-05f+5djJ3c delta 18 Ycmcc0c$JasGcPX}0}w<;Pvklc05GWp=l}o! diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/sse/__pycache__/events.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/sse/__pycache__/events.cpython-313.pyc index 5288597038c377bbb184dc39e0e272071cc10219..c1716a172603309056589f5fea3bce23581dd11e 100644 GIT binary patch delta 19 ZcmezB_0@~(GcPX}0}$NK*~pcx3IIn51~LEu delta 19 ZcmezB_0@~(GcPX}0}w<;Z{*5W1pq^+1)l%_ diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/supervisor/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/supervisor/__pycache__/__init__.cpython-313.pyc index 094a11010ae3f40486b0c76924b7a60b408f6721..568462bf6ba90c3d66770d4fe20db1309f16203f 100644 GIT binary patch delta 18 Ycmcb^c!!beGcPX}0}$NKnaFhs05og`kN^Mx delta 18 Ycmcb^c!!beGcPX}0}w<;Pvp7;05P5f{Qv*} diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/supervisor/__pycache__/supervisor.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/supervisor/__pycache__/supervisor.cpython-313.pyc index af02e69900212c23a276ae41f4fcb7a5f0d81661..101f60209f9834d7c82fe5c8c5dc90501e84c9fa 100644 GIT binary patch delta 19 Zcmcbpc2SM%GcPX}0}$NK*~sNC3;;aW1#AES delta 19 Zcmcbpc2SM%GcPX}0}w<;Z{%_p1^_vB1la%p diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/workflows/__pycache__/__init__.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/workflows/__pycache__/__init__.cpython-313.pyc index b3df8ea06c03594926705a695cee2c5ad05f4240..1ea33ed21c02a2e041e955618cbf48939e0e9cc8 100644 GIT binary patch delta 19 Zcmeys_JNJ-GcPX}0}$NK*~pc~3;;bL1$h7f delta 19 Zcmeys_JNJ-GcPX}0}w<;Z{$j21^_w01m*w$ diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/workflows/__pycache__/graph.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/workflows/__pycache__/graph.cpython-313.pyc index 1b0a21b68cb477c1a4a8af588a13d93ab16ba29e..b7834f579cbe5eced24c7c2acd46ce9e77690622 100644 GIT binary patch delta 19 ZcmeC=?&RkB%*)Hg00g&lHgeUo0st?A1keBg delta 19 YcmeC=?&RkB%*)Hg00fcI8@cLP0W2Z}Jpcdz diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/workflows/__pycache__/input_contract.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/workflows/__pycache__/input_contract.cpython-313.pyc index 0dac1f256f91f306c0b5d6ce1163f8ed52885ef5..e81dd4bfec4404adb67d959186270541f99c629b 100644 GIT binary patch delta 19 ZcmccNa>Iq|GcPX}0}$NK*~sOm1OP$o1Iq|GcPX}0}w<;Z{+e*0suaX1vvl! diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/workflows/__pycache__/models.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/workflows/__pycache__/models.cpython-313.pyc index c08980d58d6a30a25353e03b41b1427f44aef047..b7a0b9f832899997c6486df34213a354ca322ad4 100644 GIT binary patch delta 19 Zcmexv{oR`DGcPX}0}$NG*~s-)763*`29W>& delta 19 Zcmexv{oR`DGcPX}0}w<;Z{&I_3jjjy1^)m5 diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/workflows/__pycache__/registry.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/workflows/__pycache__/registry.cpython-313.pyc index 3ad59d88fbba000cb39141b7f9f6057832fbf6c6..3f248383172881daa38ccb31f6599cec7af3bb17 100644 GIT binary patch delta 19 Zcmdljv|EVlGcPX}0}$NG*~n$c2>>?R1or>{ delta 19 Zcmdljv|EVlGcPX}0}w<;Z{#xM1OPLD1Z4mK diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/workflows/__pycache__/repository.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/workflows/__pycache__/repository.cpython-313.pyc index b4b0d9913c4d3bc64fead43a0f8a03b608026096..f14e44c0877ef0495f476fb87967c4d09a1ade78 100644 GIT binary patch delta 19 ZcmbOuI!Bc2GcPX}0}$NK*~m4C3ji~&1tI_d delta 19 ZcmbOuI!Bc2GcPX}0}w<;Z{(W91pqKj1djj! diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/workflows/__pycache__/runtime.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/workflows/__pycache__/runtime.cpython-313.pyc index 7b4574f80b2412b6a55fc4327d4768958cd120cf..5386cb341fce27e20a4985f8d3c5867437a9b42d 100644 GIT binary patch delta 21 bcmdlri)q&^Ca%xCyj%=Ga64xsmq9N8O_K(V delta 21 bcmdlri)q&^Ca%xCyj%=G5E;FZ%b*tkN-_od diff --git a/agent_framework_oci/libs/agent_framework/src/agent_framework/workflows/__pycache__/tool_executor.cpython-313.pyc b/agent_framework_oci/libs/agent_framework/src/agent_framework/workflows/__pycache__/tool_executor.cpython-313.pyc index 69526bfe15ce7877c64080a11c31cd48d14b7560..d5b2da55f799f69b60ec678cdd0448e31ab30dc0 100644 GIT binary patch delta 19 ZcmdnMzk#3YGcPX}0}$NK*~qnw9RM}g1y29~ delta 19 ZcmdnMzk#3YGcPX}0}w<;Z{%9W4gfNC1iSzM diff --git a/agent_framework_oci/scripts/sync_pending_topics_to_tuning.py b/agent_framework_oci/scripts/sync_pending_topics_to_tuning.py index c91eaf21..e6e812a3 100644 --- a/agent_framework_oci/scripts/sync_pending_topics_to_tuning.py +++ b/agent_framework_oci/scripts/sync_pending_topics_to_tuning.py @@ -13,16 +13,23 @@ def replace_once(text: str, old: str, new: str, path: Path) -> str: def update_state(path: Path) -> None: text = path.read_text(encoding="utf-8") - if " pending_topics: list[dict[str, Any]]" in text: - return - text = replace_once( - text, - " supervisor_results: list[dict[str, Any]]\n", - " supervisor_results: list[dict[str, Any]]\n" - " pending_topics: list[dict[str, Any]]\n" - " handled_topics: list[dict[str, Any]]\n", - path, - ) + if " pending_topics: list[dict[str, Any]]" not in text: + text = replace_once( + text, + " supervisor_results: list[dict[str, Any]]\n", + " supervisor_results: list[dict[str, Any]]\n" + " pending_topics: list[dict[str, Any]]\n" + " handled_topics: list[dict[str, Any]]\n", + path, + ) + if " rag_results: list[dict[str, Any]]" not in text: + text = replace_once( + text, + " mcp_results: list[dict[str, Any]]\n", + " mcp_results: list[dict[str, Any]]\n" + " rag_results: list[dict[str, Any]]\n", + path, + ) path.write_text(text, encoding="utf-8") @@ -121,17 +128,80 @@ def update_guardrail_evidence_context(path: Path) -> None: path.write_text(text, encoding="utf-8") +def update_rag_propagation(path: Path) -> None: + text = path.read_text(encoding="utf-8") + mcp_line = ' "mcp_results": drained.mcp_results,\n' + rag_line = mcp_line + ' "rag_results": drained.rag_results,\n' + if rag_line not in text: + if mcp_line not in text: + raise RuntimeError(f"Marcador MCP não encontrado em {path}") + text = text.replace(mcp_line, rag_line) + text = text.replace( + ' "evidence": drained.mcp_results or (state.get("context") or {}).get("evidence"),\n', + ' "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"),\n', + ) + marker = ' current_evidence = list(state.get("mcp_results", []) or [])\n' + addition = marker + ' current_evidence.extend(state.get("rag_results", []) or [])\n' + if marker in text and addition not in text: + text = text.replace(marker, addition, 1) + path.write_text(text, encoding="utf-8") + + +def update_rag_agents(path: Path) -> None: + text = path.read_text(encoding="utf-8") + marker = ' "rag": rag_metadata,\n' + if marker not in text or ' "rag_results": [{\n' in text: + return + addition = marker + ( + ' "rag_context": rag_context,\n' + ' "rag_results": [{\n' + ' "intent": state.get("intent"),\n' + ' "agent": self.name,\n' + ' "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""),\n' + ' "metadata": rag_metadata,\n' + ' **({"context": rag_context} if rag_context else {}),\n' + ' }],\n' + ) + path.write_text(text.replace(marker, addition, 1), encoding="utf-8") + + +def update_rag_http_response(path: Path) -> None: + text = path.read_text(encoding="utf-8") + marker = ' "mcp_results": result.get("mcp_results"),\n' + addition = marker + ' "rag_results": result.get("rag_results"),\n' + if addition not in text: + text = replace_once(text, marker, addition, path) + path.write_text(text, encoding="utf-8") + + +def update_rag_telemetry(path: Path) -> None: + text = path.read_text(encoding="utf-8") + marker = ' "mcp_results": state.get("mcp_results", []),\n' + addition = marker + ' "rag_results": state.get("rag_results", []),\n' + if addition not in text: + text = replace_once(text, marker, addition, path) + path.write_text(text, encoding="utf-8") + + def main() -> None: tuning = ROOT / "Tuning-Performance" states = sorted(tuning.glob("**/app/state.py")) graphs = sorted(tuning.glob("**/app/workflows/agent_graph.py")) + agents = sorted(tuning.glob("**/app/agents/*.py")) + mains = sorted(tuning.glob("**/app/main.py")) for path in states: update_state(path) for path in graphs: update_graph(path) update_evidence_propagation(path) update_guardrail_evidence_context(path) - print(f"pending_topics sincronizado: {len(states)} states, {len(graphs)} graphs") + update_rag_propagation(path) + update_rag_telemetry(path) + for path in agents: + update_rag_agents(path) + for path in mains: + update_rag_http_response(path) + print(f"pending_topics/RAG sincronizado: {len(states)} states, {len(graphs)} graphs, {len(agents)} agents, {len(mains)} APIs") if __name__ == "__main__": diff --git a/agent_framework_oci/templates/agent_template_backend/app/agents/billing_agent.py b/agent_framework_oci/templates/agent_template_backend/app/agents/billing_agent.py index aa600999..e627beb9 100644 --- a/agent_framework_oci/templates/agent_template_backend/app/agents/billing_agent.py +++ b/agent_framework_oci/templates/agent_template_backend/app/agents/billing_agent.py @@ -108,6 +108,14 @@ class BillingAgent(AgentRuntimeMixin): "next_state": "BILLING_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/templates/agent_template_backend/app/agents/orders_agent.py b/agent_framework_oci/templates/agent_template_backend/app/agents/orders_agent.py index f557bed4..bdb3c244 100644 --- a/agent_framework_oci/templates/agent_template_backend/app/agents/orders_agent.py +++ b/agent_framework_oci/templates/agent_template_backend/app/agents/orders_agent.py @@ -108,6 +108,14 @@ class OrdersAgent(AgentRuntimeMixin): "next_state": "ORDER_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/templates/agent_template_backend/app/agents/product_agent.py b/agent_framework_oci/templates/agent_template_backend/app/agents/product_agent.py index 113bd8e9..cc65c705 100644 --- a/agent_framework_oci/templates/agent_template_backend/app/agents/product_agent.py +++ b/agent_framework_oci/templates/agent_template_backend/app/agents/product_agent.py @@ -123,6 +123,14 @@ class ProductAgent(AgentRuntimeMixin): "next_state": "PRODUCT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/templates/agent_template_backend/app/agents/support_agent.py b/agent_framework_oci/templates/agent_template_backend/app/agents/support_agent.py index b4f0244f..99562a7d 100644 --- a/agent_framework_oci/templates/agent_template_backend/app/agents/support_agent.py +++ b/agent_framework_oci/templates/agent_template_backend/app/agents/support_agent.py @@ -108,6 +108,14 @@ class SupportAgent(AgentRuntimeMixin): "next_state": "SUPPORT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/templates/agent_template_backend/app/main.py b/agent_framework_oci/templates/agent_template_backend/app/main.py index 86530a36..891f0e06 100644 --- a/agent_framework_oci/templates/agent_template_backend/app/main.py +++ b/agent_framework_oci/templates/agent_template_backend/app/main.py @@ -460,6 +460,7 @@ async def _process_gateway_message(req: GatewayRequest, emit_sse: bool = False) "domain": result.get("domain"), "mcp_tools": result.get("mcp_tools"), "mcp_results": result.get("mcp_results"), + "rag_results": result.get("rag_results"), "transaction_evidence": result.get("relevant_transaction_evidence", []), "transaction_pre_validation": result.get("transaction_pre_validation"), "business_context": business_context.model_dump(), diff --git a/agent_framework_oci/templates/agent_template_backend/app/state.py b/agent_framework_oci/templates/agent_template_backend/app/state.py index 0b4da3e9..aee4d926 100644 --- a/agent_framework_oci/templates/agent_template_backend/app/state.py +++ b/agent_framework_oci/templates/agent_template_backend/app/state.py @@ -23,6 +23,7 @@ class AgentState(TypedDict, total=False): domain: str mcp_tools: list[str] mcp_results: list[dict[str, Any]] + rag_results: list[dict[str, Any]] available_mcp_tools: list[str] selected_tool_call: dict[str, Any] pending_tool_call: dict[str, Any] diff --git a/agent_framework_oci/templates/agent_template_backend/app/workflows/agent_graph.py b/agent_framework_oci/templates/agent_template_backend/app/workflows/agent_graph.py index d1455b4c..f76c2c7d 100644 --- a/agent_framework_oci/templates/agent_template_backend/app/workflows/agent_graph.py +++ b/agent_framework_oci/templates/agent_template_backend/app/workflows/agent_graph.py @@ -570,6 +570,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "output_guardrails_already_applied": False, "supervisor_action": "disabled", "supervisor_attempt": int(state.get("supervisor_attempt", 0)), @@ -577,7 +578,7 @@ class AgentWorkflow: context = { **(state.get("context") or {}), - "evidence": drained.mcp_results or (state.get("context") or {}).get("evidence"), + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), "mcp_results": drained.mcp_results, @@ -650,6 +651,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "guardrail_decisions": state.get("guardrail_decisions", []) + [item for r in decision.results for item in (r.metadata or {}).get("legacy_decisions", [])], } @@ -733,6 +735,7 @@ class AgentWorkflow: relevant_transaction_evidence = list(state.get("relevant_transaction_evidence") or []) judge_context["transaction_evidence"] = relevant_transaction_evidence current_evidence = list(state.get("mcp_results", []) or []) + current_evidence.extend(state.get("rag_results", []) or []) current_evidence.extend(relevant_transaction_evidence) judge_context["evidence"] = current_evidence or judge_context.get("evidence") judge_context["route"] = state.get("route") @@ -880,6 +883,7 @@ class AgentWorkflow: "judges": state.get("judge_results", []), "mcp_tools": state.get("mcp_tools", []), "mcp_results": state.get("mcp_results", []), + "rag_results": state.get("rag_results", []), "transaction_evidence": state.get("relevant_transaction_evidence", []), }, ) diff --git a/agent_framework_oci/templates/agent_template_backend_day_zero/app/agents/billing_agent.py b/agent_framework_oci/templates/agent_template_backend_day_zero/app/agents/billing_agent.py index aa600999..e627beb9 100644 --- a/agent_framework_oci/templates/agent_template_backend_day_zero/app/agents/billing_agent.py +++ b/agent_framework_oci/templates/agent_template_backend_day_zero/app/agents/billing_agent.py @@ -108,6 +108,14 @@ class BillingAgent(AgentRuntimeMixin): "next_state": "BILLING_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/templates/agent_template_backend_day_zero/app/agents/orders_agent.py b/agent_framework_oci/templates/agent_template_backend_day_zero/app/agents/orders_agent.py index f557bed4..bdb3c244 100644 --- a/agent_framework_oci/templates/agent_template_backend_day_zero/app/agents/orders_agent.py +++ b/agent_framework_oci/templates/agent_template_backend_day_zero/app/agents/orders_agent.py @@ -108,6 +108,14 @@ class OrdersAgent(AgentRuntimeMixin): "next_state": "ORDER_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/templates/agent_template_backend_day_zero/app/agents/product_agent.py b/agent_framework_oci/templates/agent_template_backend_day_zero/app/agents/product_agent.py index 34433f57..3e1f0d6d 100644 --- a/agent_framework_oci/templates/agent_template_backend_day_zero/app/agents/product_agent.py +++ b/agent_framework_oci/templates/agent_template_backend_day_zero/app/agents/product_agent.py @@ -108,6 +108,14 @@ class ProductAgent(AgentRuntimeMixin): "next_state": "PRODUCT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/templates/agent_template_backend_day_zero/app/agents/support_agent.py b/agent_framework_oci/templates/agent_template_backend_day_zero/app/agents/support_agent.py index b4f0244f..99562a7d 100644 --- a/agent_framework_oci/templates/agent_template_backend_day_zero/app/agents/support_agent.py +++ b/agent_framework_oci/templates/agent_template_backend_day_zero/app/agents/support_agent.py @@ -108,6 +108,14 @@ class SupportAgent(AgentRuntimeMixin): "next_state": "SUPPORT_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/agent_framework_oci/templates/agent_template_backend_day_zero/app/main.py b/agent_framework_oci/templates/agent_template_backend_day_zero/app/main.py index 670f85f9..0b9f0a6e 100644 --- a/agent_framework_oci/templates/agent_template_backend_day_zero/app/main.py +++ b/agent_framework_oci/templates/agent_template_backend_day_zero/app/main.py @@ -455,6 +455,7 @@ async def _process_gateway_message(req: GatewayRequest, emit_sse: bool = False) "domain": result.get("domain"), "mcp_tools": result.get("mcp_tools"), "mcp_results": result.get("mcp_results"), + "rag_results": result.get("rag_results"), "business_context": business_context.model_dump(), "identity_missing": missing_identity_keys, "judges": result.get("judge_results"), diff --git a/agent_framework_oci/templates/agent_template_backend_day_zero/app/state.py b/agent_framework_oci/templates/agent_template_backend_day_zero/app/state.py index fb4a93bd..a0016e73 100644 --- a/agent_framework_oci/templates/agent_template_backend_day_zero/app/state.py +++ b/agent_framework_oci/templates/agent_template_backend_day_zero/app/state.py @@ -23,6 +23,7 @@ class AgentState(TypedDict, total=False): domain: str mcp_tools: list[str] mcp_results: list[dict[str, Any]] + rag_results: list[dict[str, Any]] available_mcp_tools: list[str] selected_tool_call: dict[str, Any] pending_tool_call: dict[str, Any] diff --git a/agent_framework_oci/templates/agent_template_backend_day_zero/app/workflows/agent_graph.py b/agent_framework_oci/templates/agent_template_backend_day_zero/app/workflows/agent_graph.py index 76d16dfb..aa4726f6 100644 --- a/agent_framework_oci/templates/agent_template_backend_day_zero/app/workflows/agent_graph.py +++ b/agent_framework_oci/templates/agent_template_backend_day_zero/app/workflows/agent_graph.py @@ -568,6 +568,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "output_guardrails_already_applied": False, "supervisor_action": "disabled", "supervisor_attempt": int(state.get("supervisor_attempt", 0)), @@ -575,7 +576,7 @@ class AgentWorkflow: context = { **(state.get("context") or {}), - "evidence": drained.mcp_results or (state.get("context") or {}).get("evidence"), + "evidence": (list(drained.mcp_results) + list(drained.rag_results)) or (state.get("context") or {}).get("evidence"), "tool_result": drained.mcp_results or (state.get("context") or {}).get("tool_result"), "tool_executed": any(isinstance(item, dict) and item.get("ok") for item in drained.mcp_results), "mcp_results": drained.mcp_results, @@ -648,6 +649,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "guardrail_decisions": state.get("guardrail_decisions", []) + [item for r in decision.results for item in (r.metadata or {}).get("legacy_decisions", [])], } @@ -805,6 +807,7 @@ class AgentWorkflow: "judges": state.get("judge_results", []), "mcp_tools": state.get("mcp_tools", []), "mcp_results": state.get("mcp_results", []), + "rag_results": state.get("rag_results", []), }, ) diff --git a/agent_framework_oci/tests/unit/test_multi_intent_planner.py b/agent_framework_oci/tests/unit/test_multi_intent_planner.py index 2f47ab81..d463d6bd 100644 --- a/agent_framework_oci/tests/unit/test_multi_intent_planner.py +++ b/agent_framework_oci/tests/unit/test_multi_intent_planner.py @@ -40,6 +40,20 @@ def test_transactional_intent_is_primary_even_when_mentioned_second(): assert [item.intent for item in plan.operations] == ["cancel", "invoice"] +def test_sentence_boundary_does_not_leak_previous_intent_into_knowledge_query(): + planner = MultiIntentPlanner([ + IntentDefinition(name="invoice", agent="billing", priority=20, keywords=["fatura"]), + IntentDefinition(name="knowledge", agent="support", priority=30, keywords=["tarifação"]), + ]) + plan = planner.plan( + "quero ver minha fatura e o valor. depois gostaria de saber como funciona a tarifação do plano" + ) + assert plan is not None + knowledge = next(item for item in plan.operations if item.intent == "knowledge") + assert knowledge.source_text == "depois gostaria de saber como funciona a tarifação do plano" + assert not knowledge.source_text.startswith("valor") + + def test_does_not_plan_single_intent_or_invent_unknown_intent(): assert _planner().plan("quero cancelar pedido") is None assert _planner().plan("quero cancelar pedido e saber o clima") is None diff --git a/agent_framework_oci/tests/unit/test_pending_topics_isolation.py b/agent_framework_oci/tests/unit/test_pending_topics_isolation.py index d5c1b69b..e2dbb948 100644 --- a/agent_framework_oci/tests/unit/test_pending_topics_isolation.py +++ b/agent_framework_oci/tests/unit/test_pending_topics_isolation.py @@ -12,6 +12,8 @@ async def test_secondary_topic_does_not_inherit_primary_transaction_state(): return { "answer": "Aqui está a sua segunda via.", "mcp_results": [{"tool_name": "consultar_faturas", "ok": True}], + "rag": {"provider": "kbdb", "attempted": True, "status": "executed", "document_count": 1}, + "rag_context": "Documento recuperado da base de conhecimento.", } state = { @@ -59,3 +61,5 @@ async def test_secondary_topic_does_not_inherit_primary_transaction_state(): {"tool_name": "consultar_vas"}, {"tool_name": "consultar_faturas", "ok": True}, ] + assert result.rag_results[0]["metadata"]["provider"] == "kbdb" + assert result.rag_results[0]["context"] == "Documento recuperado da base de conhecimento." diff --git a/agent_framework_oci/tests/unit/test_rag_kbdb_provider.py b/agent_framework_oci/tests/unit/test_rag_kbdb_provider.py index b3d1722d..75192dbc 100644 --- a/agent_framework_oci/tests/unit/test_rag_kbdb_provider.py +++ b/agent_framework_oci/tests/unit/test_rag_kbdb_provider.py @@ -1,4 +1,5 @@ from types import SimpleNamespace +from contextlib import contextmanager import pytest @@ -115,3 +116,68 @@ def test_kbdb_does_not_fallback_to_framework_adb_credentials(): ) with pytest.raises(RuntimeError, match="KBDB_DB_USER"): KbdbRagService(settings) + + +def test_kbdb_discovers_number_flags_and_clob_output(monkeypatch): + import sys + from agent_framework.rag.kbdb_service import KbdbRagService + + captured = {} + + class Var: + def __init__(self, value=None): + self.value = value + + def getvalue(self): + return self.value + + class Cursor: + def execute(self, statement): + captured["signature_query"] = statement + + def fetchall(self): + names = [ + ("P_SEARCH_TYPE", "VARCHAR2"), ("P_QUERY", "VARCHAR2"), + ("P_TOP_K", "NUMBER"), ("P_NODE_EXPANSION", "NUMBER"), + ("P_NODE_MAX_RELATED", "NUMBER"), ("P_GRAPH_CROSS_REF", "NUMBER"), + ("P_MAX_CROSS_REF_HOPS", "NUMBER"), ("P_DOCUMENT_TYPE", "VARCHAR2"), + ("P_METADATA_JSON", "CLOB"), ("P_RESULT", "CLOB"), + ] + return [ + (name, index, "OUT" if index == 10 else "IN", data_type, None) + for index, (name, data_type) in enumerate(names, start=1) + ] + + def var(self, data_type, size=None): + captured["out_type"] = data_type + return Var('{"units": [], "seeds": []}') + + def callproc(self, name, binds): + captured["procedure"] = name + captured["binds"] = binds + + class Connection: + def cursor(self): + return Cursor() + + class FakeOracleDb: + DB_TYPE_JSON = "JSON" + DB_TYPE_CLOB = "CLOB" + DB_TYPE_VARCHAR = "VARCHAR" + + service = KbdbRagService(_settings()) + + @contextmanager + def connect(): + yield Connection() + + monkeypatch.setitem(sys.modules, "oracledb", FakeOracleDb) + monkeypatch.setattr(service, "_connect", connect) + + result = service._search_sync("como funciona?", 5) + + assert result == {"units": [], "seeds": []} + assert captured["procedure"] == "PKG_KB_SERVING.search_knowledge_base" + assert captured["binds"][3] == 1 + assert captured["binds"][5] == 0 + assert captured["out_type"] == "CLOB" diff --git a/agent_framework_oci/tests/unit/test_tuning_pending_topics_sync.py b/agent_framework_oci/tests/unit/test_tuning_pending_topics_sync.py index f5f77d60..dbe1abb7 100644 --- a/agent_framework_oci/tests/unit/test_tuning_pending_topics_sync.py +++ b/agent_framework_oci/tests/unit/test_tuning_pending_topics_sync.py @@ -13,7 +13,8 @@ def test_all_tuning_backend_graphs_support_pending_topics(): assert '"pending_topics": drained.pending_topics' in source, path assert '"handled_topics": drained.handled_topics' in source, path assert '"mcp_results": drained.mcp_results' in source, path - assert '"evidence": drained.mcp_results' in source, path + assert '"rag_results": drained.rag_results' in source, path + assert 'list(drained.mcp_results) + list(drained.rag_results)' in source, path def test_all_tuning_backend_states_expose_pending_topics(): @@ -23,6 +24,7 @@ def test_all_tuning_backend_states_expose_pending_topics(): source = path.read_text(encoding="utf-8") assert "pending_topics: list[dict[str, Any]]" in source, path assert "handled_topics: list[dict[str, Any]]" in source, path + assert "rag_results: list[dict[str, Any]]" in source, path def test_canonical_templates_delegate_drain_to_framework_helper(): @@ -36,7 +38,35 @@ def test_canonical_templates_delegate_drain_to_framework_helper(): assert '"pending_topics": drained.pending_topics' in graph_source assert '"handled_topics": drained.handled_topics' in graph_source assert '"mcp_results": drained.mcp_results' in graph_source - assert '"evidence": drained.mcp_results' in graph_source + assert '"rag_results": drained.rag_results' in graph_source + assert 'list(drained.mcp_results) + list(drained.rag_results)' in graph_source assert "MultiIntentPlanner.public_messages" not in graph_source assert "pending_topics: list[dict[str, Any]]" in state_source assert "handled_topics: list[dict[str, Any]]" in state_source + assert "rag_results: list[dict[str, Any]]" in state_source + + +def test_all_rag_agents_expose_metadata_and_context_as_state_evidence(): + roots = [ROOT / "templates", ROOT / "Tuning-Performance"] + agents = sorted( + path + for root in roots + for path in root.glob("**/app/agents/*.py") + if '"rag": rag_metadata' in path.read_text(encoding="utf-8") + ) + assert agents + for path in agents: + source = path.read_text(encoding="utf-8") + assert '"rag_context": rag_context' in source, path + assert '"rag_results": [{' in source, path + + +def test_templates_and_tuning_expose_rag_results_in_api_and_telemetry(): + roots = [ROOT / "templates", ROOT / "Tuning-Performance"] + mains = sorted(path for root in roots for path in root.glob("**/app/main.py")) + graphs = sorted(path for root in roots for path in root.glob("**/app/workflows/agent_graph.py")) + assert mains and graphs + for path in mains: + assert '"rag_results": result.get("rag_results")' in path.read_text(encoding="utf-8"), path + for path in graphs: + assert '"rag_results": state.get("rag_results", [])' in path.read_text(encoding="utf-8"), path diff --git a/app/__pycache__/__init__.cpython-313.pyc b/app/__pycache__/__init__.cpython-313.pyc index 781a57efddf0acdf8bae1e429825a54071cf6fe0..6d05eaee4dfdd1f11503359456f8e8daad9b6c84 100644 GIT binary patch delta 18 YcmbQiID?VvGcPX}0}wpRnaI@#04rAn&j0`b delta 18 YcmbQiID?VvGcPX}0}wn5pUBk*04oCox&QzG diff --git a/app/__pycache__/main.cpython-313.pyc b/app/__pycache__/main.cpython-313.pyc index f2197f492f2c01d5e2c454616ffa9492450c077b..f7997d8aa8e8974c8811a9b07fbbfe7dd6712c6f 100644 GIT binary patch delta 21 bcmeydlg{Y#qnGcPX}0}wpRS)8Rak++1=VPlgI<75eDAwh9N3=1oWW(}5@?8qoQ z`5$B0WH&}WX*o1mc`%;^s7?W-j!|*4AhRT+5}2(FVvDMPRd51TsKQxlAbCM`G_y3o zx->z$Cc7{zOcrAn5!Hd4uM5|$2U5qb50RNXomo~FWV$h2r3sv63TANuWzFDX<{$`K1(p)3NCLAGTqn)&bNiL?BIIr;VcI*3uJ>M*!4~zQqdW%#|6%E1+jwNin!C= zH9a=3Wf5Uy;Vw!{-@Jo$G7F>6WFIbH#v_wwah={A#Qm3%F=BE6udcHXP)kt+h=>Fd xw>WHa^HWN5QtgUjfLul(E|vfiAD9^#8SgVFeqnQAWK^FZxj^+Z1BeCI2>=3%T*LqX delta 447 zcmew*eL$M`GcPX}0}wn5U!27@k++0VZDW%UBPRP$3}h;|IYbXo#sbW@gv(oj zOgFZM^KIZPTeu!OILjW)0@>gIcDW;nRCI#tafY*8K&)WbBJOlIP4~^mSwt8&zhLcR zVf3C{%;n3taq>Z~)0^jWzhYzzpWMZ(E9DJTT@(%?B7np#4x8Nkl+v73yQ1jH7kR~m Tof#R`CrB<({mcMjffWJ(d{SFb diff --git a/app/agents/__pycache__/contas_prompting.cpython-313.pyc b/app/agents/__pycache__/contas_prompting.cpython-313.pyc index 016b3f95a1131acb1e6393a3be07105f975199e8..dd62e63eb3cbbf5bf2443e9517cf70b5d23da415 100644 GIT binary patch delta 19 ZcmZ3+v5bT3GcPX}0}wpV*~lfs0su0y1gro6 delta 19 ZcmZ3+v5bT3GcPX}0}wn5-^eAy0st~Y1eO2* diff --git a/app/agents/__pycache__/contestacao_agent.cpython-313.pyc b/app/agents/__pycache__/contestacao_agent.cpython-313.pyc index b8af5d5a567805362a2aefe0eadf9be8ab53523d..55690e70ce0aa7bacc1824c243d43fab7f222168 100644 GIT binary patch delta 942 zcmZ9LOKcKR6o&7anZgXnU;*V-gg|Mb6fB9=G*zpqTCEN>BGHNlNjuh>0y+%Q>Y_e2 z8W)<}jgLh&n&{Th#BFg=>Y}j?ni}Gwu3SnnHF48;XDXU_llgM~d;at1OeXU-_^Ffs zVKC?rIo~E;T$-@F;Rk8`CL-^U=f^t@?lo;I-lA_Xv^D{_#BRasEaym|6CTq4?<9Q) z;jgUA>Fb7#)*cA_@r*hU@}P|fXvI^kJ?w9|5^TIJ!X&f}Z<;|U-k#8Q!4PzzgRmVo z<_v+xL_8SLVmI3h9XQGQAf)8E|K=tAjl~jFVR6Axnp=Zey?2#W^j zn2nH%eJ6z22bDRM!z!IDiaB@D7a$lZp5g>*N;967#jIR4=F{16dHlLKni|huF344` zkQb$tEMAkVD9A`V$THQY^qAt+=W_*VMBHey8BtD;rsZ^1JCY+=#Ba@rnVdA4`lC|~ zM^G!Zk{HRWz@s2!RTw3x>ZSBpN)q#h2{|wA#vk)%4`5hBPh48jk|uSCh{t7o&rf z_M@v#qe)k5K}Pd3-?7AZyzZ{>QLg49w|6x)FRpLCGBrduak@H>Y<+d6$-vhK0r`(X zo#9CBKwOl-bP`rub)4>3{sDRA+cv=sPe5Rqr%F`>LC?&DNL6x!z%wP!0WT4A6bQ}C z9KBx=Wj_cOrrf6Z%X>kvGUdMgh=}>VeIPiP_vio+wE!Tvm<39!)Oz)XSJ|x6qSC6; zq0&W&y{4O{IN2*t5qLb3`fd90j41^7@rvmx4B*q|NV9aDv?ZH@GYb0gBlD={A~bDX hJBcYv21f8@iw(x`Jxhz}5CuCIt${V96cYJ+&~NDw>#P6( delta 619 zcmXxhO=uHA6bJBmyR%7l)7{X`XX8hcHfg@vnA9YK0b`_4%xVxK2#VHVBSlC{Hvx@; zQH#)vNST{n6a~FD5j^M8D7{pQ2!UL^2}x=ZFXGIK3-8DK&%9xl-LJDBBg%m+ONc(- zue`Z4Qn!@?Z?)36LF-^3ke>Z``!W9jlRxH3T$+vxgFFm!0jrl;#rdYNfiSHPyv1y}Vqmmm`86p!e%j3?C!LNRcr)3_WsE zz7FHCwiPG=db9(&~kCuTKp!xAj z*0n(k;14m{btXXz;f`-%iiRByv?$);^DK0Opv~d#44dzs0WE>MxjdrbQ|>Hi^Y}A5 z=cQ@a3t9^A9x<~%0L+kK)Nsx)VK{G?qLPmNk$RrKSB<0ie7c)`qAV#nVz5D)j=PW} zzZ`M3hgZwhitb^%m;Q}poXe)0Ah-?}$SY?Rt`f!NIdOyTvHxB>Mj7w`&_~%mI^9Q! SpQeWZnLT&-5V1!0(uu#Bt(gV@ diff --git a/app/agents/__pycache__/faturas_agent.cpython-313.pyc b/app/agents/__pycache__/faturas_agent.cpython-313.pyc index eece0df015fce63dd6749ace5a608a61a764b969..b3ae4568d3a2cb1e7273cf00295fedb413fd24b1 100644 GIT binary patch delta 884 zcmYk4Ur19?9LLYkoo(K&UBl&cbJwYxyZ1Vs8mu%ylm419BU>dS=CEajfAH>#iVuQ8 z1qGG|L=#epu(ycy)m_hbjCzPVXQg%Fe(v}CJKx{$+(d$e1v)c=IKWAN+rk*3HYvbWLn~CHQ&0tLACtV7Z!7oe z$##KEI_wtkkU_f>D%ix5{fR+&?+pT3dtIzXwrm1P+oha;vnsu~%}YZ07SbqiRa4pM zjK)8fVLK)G*E8(TFqol`jr@g2H8()6ibaLytdqK1y=tUaRjTNwN;QK(A!Fq(eI&Kv zF1naBM*9Yo&PYg&45`WNo`@R09#+FiePYm>RKi^$ zB@!LzR-?)T^3~xYdBs;DFVqkfFoNu9SzHY6uA>nM?aE2Cr%XLe2?}LdG?bNMZ3nd&Kn|5iN(+T`H z1FEin)I2q^ZuTr@rHr(cLOOd+ibqoA!tng?TFtqH*s@)CFxQZ>qa5=FU%t+lzwjma z8goiu)gqK*PdTW%uS>beyR!b#K8=<$q^!6~N3{)cH59oQVB2lr z3_qgd^rOZKS~++E{=;~NsTlZu__c?sB?tIx@lx?=12xO#;IGHao~BZ2;wJDn;5g6n zaX0;wa9nIc)U1fdp%vp5>7<6bRS&f4@oI&hX&*4wW>}wL1LFtC5ND{TB)jg%FhTB# zB77$=#X*=PqU6;oPuckgrDMA1R45ZRuWoizg8^GX1+7qv9~;CdJ@gQQjo3n3n?^Kv z5Gsmbq1w4A2*rbfc#zG_gA|0ag-WFd!J`Mg=7S!@i!(Tnb!+P(;vu&>i4twkg5M!wBM=o0{x+>bWD?QIa3g5H)_yAT!k#1ilgl4n__QS-sAe%o7QG)uXu4^ztr{nf^z2&3WUB9^D8mmj_;FV zN8wF^0$L})+!L`ArdRdl2Nka%$vuLiXL?vrNbeS)>}BX-Ng>@Bl8Ow$E6`PCN&daE z&R((_wMO6tSbqGHI~y#5+j-`;hQS)dTO;RX7Pd{W!gxDBnPS0Fz=~jp@OftxtQdCm zNyNgAeikeZ@8r&DEbU^j5_ne_;GO{Ipv$n!h|8Eu&1Hg-uI8S@8Vwsdbm(d0E diff --git a/app/agents/__pycache__/runtime.cpython-313.pyc b/app/agents/__pycache__/runtime.cpython-313.pyc index bdbf4eead312ad7e1c568abc0e48629b769d1230..97c6b146ab1ab009a21bf821943d26c8d471f65c 100644 GIT binary patch delta 19 ZcmdnOyoH(TGcPX}0}wpV*~qnu5dbwA1xWw^ delta 19 ZcmdnOyoH(TGcPX}0}wn5-^jI!5dbu*1v3Bu diff --git a/app/agents/__pycache__/suporte_contas_agent.cpython-313.pyc b/app/agents/__pycache__/suporte_contas_agent.cpython-313.pyc index a905607ffc101a68fec71aec3a9b2dd34872e53c..7818369a3433336fa11125afffb4fccf613e1dda 100644 GIT binary patch delta 836 zcmYk1UrbU_9LLXr0~aoOK~UtPco9(q10jY3zu)=h{p4r% zD=TS0*4OdpH&dpU%z|7~LF^*g`|~RNrlukNTHdaN6z*2m;s;1=h=2=r>BfHxk0Lw% zOkHeLgVz!-BBeLq*gB5dT)%u!m-$2M^Ir zupR4EHe=Lr)FC1}x)62XC5ppSlp1GgPW$g6uLp&F_!n*Qp%ASCgYwY#GBbp-P=pYM zrpt_$X;Fbt-3j>(=sce8*X+tXP9)k$zk)&-jZY>En#9zMI2?~9|6N=3e8YOrooFph{L}4^0#uGE+$%NR8W6XV6o!(`v5KRgbajep1 z;iL3>-I#o#uH}oFTXilwpAF^B?j6>$$}Y1XIoq?qS}+yNxx4dCJ=;yO^}uFuBltF& z@4HG|?piF*UEis1-BT+q%nurPyOvHrzP)8=TbC6zBvb^-dTo&bt?sqC)LhPYChs`A zSEtj{#d@H%6)lo#09wPgfpKjyt`~tk<12C`dQVxj-hp1V5w*cV-i0=-1D(Wd znjr5+n`~bTG4FaH??o9P)n`b;k235jKunhHg?tCfn)~I%>AtSI_MH4y1LF_lW;ZrOaZ^01$VDwap5h>0}h#gk2wIj-T js4yPP;>Fq(IEFcs2~OZn6Q{o-gB>~6bpRwG){*)@Mk&!$hhaU zd$=N;PWQZ-e?7mIAK6KdwiJIvZU%^!YzDbfi5A^eGuvurrGH1wH#OFLA~p};m#*1` zNx>`0ZIzhCHuVP8b{RF>6&%%I5X=-uq9e2JYQ!U0a~{%5N0;4^I)rVBQ|u1xy=ID zA-Xx>WBMZjPQj(}3TPSUzh1!MkDzpU-U>XT%fM9`i6PrDdrq+fQeDo2vMMVz~ zy?FAG(L^K>hzGnGQ_coBpg;n}9w3beZ(a)o6K~EgVB#e6+wc44%YSDN``xwI&YzT( z=>S>3;vepYO`my*E-5AUDcL8xY&JBQhc?jcK@!_? zo<$G((1Ib_zpC=R z%4tH%FA+ljl**t=n-=(MF4Ggx*`7`6T-2=QPBIfqW}Ha&l2;d)$Ru%vl5}cX9*>1H zv4@$0HWAB2qLECbz>cR#n?zNKSRy6QgwK8WqTyuaMlwcrD5z85QqWCMD3K$RVL6tb zj%U(xFG(Jmef@a9Gy#p-zA^!#WF!&8A%27ELD@RJo}R5~`f0TU&ci;%Gb$#`&d%p$q{bR)CLgBpq)?sbS5vQ^7zjdJF%1htd z$NQCSYgDm>L`9&f)fait;$E3qp2>9%=bJ~4YRV0|VlB|u7j25V1oV{$m3-?y-}Bz>kSHsGjXYIclfINdQ1s{4)+Q^p?;L(n)1k4rhCt$^z!FpR>ZCLO2ylYT+I z^hveY2;V`GM+=I|La_p^wh^^%hoTX!3j_7UY*J9HLYs7d6ERy(C|c20tJ2>l2R5`# zUjxMK&{v@-pdBJQ?q4xd)-|XK; delta 613 zcmXw#O=uHA6vyZ7%*JGroz;y=lPYA}n8s|=*if5(P)uqIrM0`45T$rgXhg(TO#Pq- ziReX7f`b<;LRHYKq-U|0Vq1#U9)un|hzedLAM_x2aAu1S-jDzPy*D$D`FP@Unzb~I zA`w5&y}a@x_?DHh-!JTak*&X;+B{xX`5|A76q6bCG0nqqUZ8PE@pmN3?@$^_$ip&9 zNM`U+6WFm`4!C53;QV$; zy~t^aToD-^z?UGEt`+=gg}>0EZE8h6Ux`a}NTel(_;>9F1Zy+Q1YXtOD_?PK^q`JU zCeyDMmlwCQQ#;8s4Zqi*^#Ia4>zY&y>A^3|`oyd^{W~mM*G2Jxr+%1!3tq2IV%0~R z3`O!yqH3%;1t>8M&45p1jdtYA3K-MS2vZ;Zv+zjla4%wyz*Df3WJ#(T*cMso7HTyH zb`M!K$2)~tQ^4*eYj~_nnDrFcePrE|^Bba(BO7=W3A2d{U=NZ_a{8!nTPE1UWUJ$V z)D}qgxa@V==Q8JV(B-foH$ry}N9?tr2$*IiBL6ARUxniEkbel>hB00UXN+Ake{rr{ ziOTNT{gG;T)>8&Gyyx&=;idKqvU)^9Ua{*PnY%W7^J@82rOcnV#f&ipa@)GOhoo@l F{sHHWk8uD1 diff --git a/app/agents/contestacao_agent.py b/app/agents/contestacao_agent.py index 39339e8a..987f36f7 100644 --- a/app/agents/contestacao_agent.py +++ b/app/agents/contestacao_agent.py @@ -111,6 +111,14 @@ class ContestacaoAgent(AgentRuntimeMixin): "next_state": "CONTESTACAO_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), } diff --git a/app/agents/faturas_agent.py b/app/agents/faturas_agent.py index 7fd5d84f..7defd757 100644 --- a/app/agents/faturas_agent.py +++ b/app/agents/faturas_agent.py @@ -219,6 +219,14 @@ class FaturasAgent(AgentRuntimeMixin): "next_state": "FATURAS_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **self.transaction_state_patch(state), **handoff_patch, diff --git a/app/agents/suporte_contas_agent.py b/app/agents/suporte_contas_agent.py index 6cad6549..99a0e213 100644 --- a/app/agents/suporte_contas_agent.py +++ b/app/agents/suporte_contas_agent.py @@ -129,6 +129,14 @@ class SuporteContasAgent(AgentRuntimeMixin): "next_state": "SUPORTE_CONTAS_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **informational_patch, **self.transaction_state_patch(state), diff --git a/app/agents/vas_agent.py b/app/agents/vas_agent.py index 61beb27e..dd02147b 100644 --- a/app/agents/vas_agent.py +++ b/app/agents/vas_agent.py @@ -116,6 +116,14 @@ class VasAgent(AgentRuntimeMixin): "next_state": "VAS_ACTIVE", "mcp_results": tool_context, "rag": rag_metadata, + "rag_context": rag_context, + "rag_results": [{ + "intent": state.get("intent"), + "agent": self.name, + "source_text": str(state.get("sanitized_input") or state.get("user_text") or ""), + "metadata": rag_metadata, + **({"context": rag_context} if rag_context else {}), + }], "memory_context_metadata": state.get("memory_context_metadata"), **informational_patch, **self.transaction_state_patch(state), diff --git a/app/domain/__pycache__/__init__.cpython-313.pyc b/app/domain/__pycache__/__init__.cpython-313.pyc index a08d0a886e3852d0d8bcc104868825bbd267c67b..768c9600fe475743644d45f948e76306520b167e 100644 GIT binary patch delta 18 YcmaFG_==J1GcPX}0}wpRnaK4305**U#Q*>R delta 18 YcmaFG_==J1GcPX}0}wn5pUCw905&-VumAu6 diff --git a/app/domain/contas/__pycache__/__init__.cpython-313.pyc b/app/domain/contas/__pycache__/__init__.cpython-313.pyc index 86a9004a6de8f26ec0bfda1536828932ac19593e..f7dd23d9a41d4e29c108537e93c3fa6709b39d33 100644 GIT binary patch delta 19 ZcmX@bbc%`VGcPX}0}wpR*~sO<2mm)V1qc8D delta 19 ZcmX@bbc%`VGcPX}0}wn5-^k^_2mm(B1oHp@ diff --git a/app/domain/contas/__pycache__/client.cpython-313.pyc b/app/domain/contas/__pycache__/client.cpython-313.pyc index c9b6df5393d0f81a34057adae1beeefab4dc38f5..c600cddd3d62094580f10b2f3e7c62791220c1e0 100644 GIT binary patch delta 21 bcmZ2Km3jSCX0Fe?yj%=G@GNH|*V0n}Ot}Xv delta 21 bcmZ2Km3jSCX0Fe?yj%=G@GN{I*V0n}Oi%|G diff --git a/app/domain/contas/__pycache__/conversation_policy.cpython-313.pyc b/app/domain/contas/__pycache__/conversation_policy.cpython-313.pyc index 1eb2f818d669f491e979d60930e0ebfb6a3f02ab..b304a4f7edae9fdb42965e2d5471864cfbc866dc 100644 GIT binary patch delta 21 bcmZo}Wo&L`>*eG6%*)Hg00hr+HgYku0{}0@1aANU delta 19 ZcmeC>>*eG6%*)Hg00hs%H*ztv0{|~v1X=(9 diff --git a/app/domain/contas/__pycache__/invoice_resolver.cpython-313.pyc b/app/domain/contas/__pycache__/invoice_resolver.cpython-313.pyc index 2cc6d02e584cce1a52c7ca44881df1694f24ae27..1eddbfb4364069de8a1dc24229245466726864f5 100644 GIT binary patch delta 21 bcmeygmHE?FX0Fe?yj%=G@GNH|*Na;KTqFoZ delta 21 bcmeygmHE?FX0Fe?yj%=G@GN{I*Na;KTe}D_ diff --git a/app/domain/contas/__pycache__/line_reference.cpython-313.pyc b/app/domain/contas/__pycache__/line_reference.cpython-313.pyc index 1f1948e849e30a0a64e9673ff335cc235d70e111..f576d9b3e742bd681f8dc420cef2c4b4c1c51be8 100644 GIT binary patch delta 19 ZcmaDZ^<0YUGcPX}0}wpR*~k^k3jjX91)Bf> delta 19 ZcmaDZ^<0YUGcPX}0}wn5-^dlq3jjV=1%?0s diff --git a/app/domain/contas/__pycache__/service.cpython-313.pyc b/app/domain/contas/__pycache__/service.cpython-313.pyc index 83d9788de869234b8bb303462d458338479c3966..42b23ef7d13509d9d1f00779668aca4b14033c5f 100644 GIT binary patch delta 21 bcmZo#$=I}#k?S)rFBbz4Jj>b0RS^OJN2~@@ delta 21 bcmZo#$=I}#k?S)rFBbz4JPY5*RS^OJM?(fa diff --git a/app/domain/contas/__pycache__/vas_variation.cpython-313.pyc b/app/domain/contas/__pycache__/vas_variation.cpython-313.pyc index fbb5869712de323b46dc7e1f84607fb76f617908..affc3253c63d0e839154f2e8f7300bd00a1873b1 100644 GIT binary patch delta 21 bcmbPql4;UOCa%xCyj%=G@GNH|SH}_nPfrIG delta 21 bcmbPql4;UOCa%xCyj%=G@GN{ISH}_nPUZ&y diff --git a/app/domain/contas/integrations/__pycache__/secure_pdf_crypto.cpython-313.pyc b/app/domain/contas/integrations/__pycache__/secure_pdf_crypto.cpython-313.pyc index f95801f6fbb9fa148fb88bfa8c60eab493b723f6..e32e4876a375154c616d58ff66b53553ed7b65bf 100644 GIT binary patch delta 19 ZcmZ1@yhfPoGcPX}0}wpV*~qns696_51z7+9 delta 19 ZcmZ1@yhfPoGcPX}0}wn5-^jIy696@$1w#M; diff --git a/app/domain/contas/parsers/__pycache__/__init__.cpython-313.pyc b/app/domain/contas/parsers/__pycache__/__init__.cpython-313.pyc index d5e2fe7dd293c1239404f14bfb1767b64aa0a244..24cef90c0701cc2d8f2bbbd71e5150e2a17c3cda 100644 GIT binary patch delta 19 ZcmZ37~ diff --git a/app/extensions/__pycache__/tim_guardrails.cpython-313.pyc b/app/extensions/__pycache__/tim_guardrails.cpython-313.pyc index db3d1d22aba07bcc868c9a046f92ebd04aaf23f8..3b761f97fda52c7e7d141b35c1104c71f95263c6 100644 GIT binary patch delta 21 bcmaE|gz3o=Ca%xCyj%=G@H}TDSJWf`RtyI) delta 21 bcmaE|gz3o=Ca%xCyj%=G@GN{ISJWf`Rhpby diff --git a/app/extensions/tim_prompts/__pycache__/fraseologia.cpython-313.pyc b/app/extensions/tim_prompts/__pycache__/fraseologia.cpython-313.pyc index 9c23fad74c996b165b013a2d51d537a536588a49..d64b48bf1112cdf0bcf0d3d0da17b4869d54af0d 100644 GIT binary patch delta 19 ZcmaE9_0o##GcPX}0}wpV*~k?y3jjl51@Zs@ delta 19 ZcmaE9_0o##GcPX}0}wn5-^dj&3jjj$1>67t diff --git a/app/extensions/tim_prompts/__pycache__/out_of_scope.cpython-313.pyc b/app/extensions/tim_prompts/__pycache__/out_of_scope.cpython-313.pyc index 208530cd1010e80db20a8132de07f8b350e39561..b4c9a6788f59a20347f2cc295f60fe649e6247e4 100644 GIT binary patch delta 21 bcmey{!uYp^k?S)rFBbz4JkQz4RqO-+RQd+# delta 21 bcmey{!uYp^k?S)rFBbz4JPY5*RqO-+REq}F diff --git a/app/extensions/tim_prompts/__pycache__/revprec.cpython-313.pyc b/app/extensions/tim_prompts/__pycache__/revprec.cpython-313.pyc index 69292fd622cd7227c1573726c69fbf45c56a5b27..581b0f7e9db0f5b6f7555c1a3dd94532b37a105b 100644 GIT binary patch delta 19 ZcmbOrF+qasGcPX}0}wpV*~rDl0{}6W1d;#% delta 19 ZcmbOrF+qasGcPX}0}wn5-^j(r0{}561bhGh diff --git a/app/extensions/tim_prompts/__pycache__/rqlt.cpython-313.pyc b/app/extensions/tim_prompts/__pycache__/rqlt.cpython-313.pyc index 5643f6fb3846dc669a99848ea8b984e938be6220..0f52e6fb75e17ba8cd9ad36afcbe7a85f1ff7e58 100644 GIT binary patch delta 19 ZcmX@fagu}UGcPX}0}wpV*~n$j0suGU1r-1Q delta 19 ZcmX@fagu}UGcPX}0}wn5-^gXp0suF41pfd4 diff --git a/app/main.py b/app/main.py index 6e714e0b..f1764d4a 100644 --- a/app/main.py +++ b/app/main.py @@ -483,6 +483,7 @@ async def _process_gateway_message(req: GatewayRequest, emit_sse: bool = False) "domain": result.get("domain"), "mcp_tools": result.get("mcp_tools"), "mcp_results": result.get("mcp_results"), + "rag_results": result.get("rag_results"), "transaction_evidence": result.get("relevant_transaction_evidence", []), "transaction_pre_validation": result.get("transaction_pre_validation"), "business_context": business_context.model_dump(), diff --git a/app/observability/__pycache__/__init__.cpython-313.pyc b/app/observability/__pycache__/__init__.cpython-313.pyc index f5fc8a4535dfa0b660f0ea562da3069f284b47fd..3b6e6824091e23e89e8b53a857489786b4d0ee99 100644 GIT binary patch delta 18 YcmZ3+xQvnOGcPX}0}wpRnaDK<04+fT`2YX_ delta 18 YcmZ3+xQvnOGcPX}0}wn5pU5=_04(hU#g|e?LZ2_San?~hTiLnh3Xp=H&*?dw^c`R-h zj!>72;8hXC1q@fX%2jp>6cx+6V6NNqQ;>@np{R)4eRC#llA?T{>DS-?%$ak}%$zxM zX4!N^`phwD+|}4vm5BY$H$6A^Yw6ComFY2Ws70cg$um=Crp`=*XVcr^)JytxUnt?z z#}i76L|#d~3>EO_5Dy_CDvBrR;}xoB9WuLG28m7`s56SPRDH%A!pMapQRCp7iR$39FO^`;NYsW^>~W~#(z3Ro zs8A=^;~auL9y}QqupLC%1gJOV!}}RhA_rHt4&n|gwKb$zQE$Pp98VIjsi>Ilar=A2k>Jj~Ckgt;a| zln=)|pw!n8yDB2y$i?|Mb4UWZf*2q(Lj&hB6Z$Kg41Jxtxdmh59WJ{OO5!%8LvjHZ!UZSx}RmM=aRej&TAJ+LP?r z=;1yQuf~zYnl|%JXc%P)Q<+HJG2foRIq`k|b=g_RBkMq5ONmFNOPh4BX>-=41#P13Qj&^btLGAvKjOw`#6 zhA@5nnMKvfB9WSXYs3zjSL@I+y+UqJs}bF%_lt`}elfF9$1Lch!d%b8JO#F&QxZLo zMRSHyY`4L`bCSc1wD$07oGz}uE!2=-?A5bIim;I)QFBUtD(?w{A-zO%YKh2RJdZRd zJCYqKj#NilsnlMQCYq~gPOD4Hib`f?QC&*dB?b{IG0TJau+fi$6?`P5HXU}RYb2%i zA#f^JC)3XoS%<>K+#jTB>Y5!0=H(Ld3=nI(@Hp!Mg~0z`nhv9Vp@Yj`xyi!F7IMmgT=QI_93hWS#f@OI$g#JK}kdFBKiQb zAH-r}gRl7>kJsJkbT9BUy1fl<`lk@TjZ(L_)!F8EQ)jDtQ7hd5|5e;H;5n?-`{(%D zni`!Rzpu&F>UPfY_*;E+F?|v3ZbjGzmx>1)4uqQBr8}}#sXsE9H>YN zVR%6O6?Wu2!Ud=sQAo^z`$v4IA}_(BiVLyNBmXLcZG^4?Z{-v+3Er$US&>D*MfeWk zdxVz|t|9z@a2=rs#8r1@iwGmd2oeT<_AfG1i~}k|rog}j_g76L7vY~(dFm*W5IZqf zPJczw|3LA?4w4(_oVZUaC{Rxfk4`m^SlB*wAZZT#W9lG*ybVhGL!>3J-u{4A*oJCG z$e5F_Sj)(5Vrqh0=aeKof&5~G*AbqCb#t~E3YbN!lnz3}#Rw$`PcnhAGPu)|qTYnE z7!MR+iDw<@fY`Y+NDj=NJ4DUh^a9pxfEVYMkK!#1Km$BPB*n!gL1nAk>taFVX$&e{ zvoV}JjWmzRuvSedIsu^qvgggpegjQ~%E-J0VKM?YJPfJV;njI*2~mp3tc0`k>eW$9 z7~8Zc`60Ac$-s{(#@y@rM_}g`4Sd#QAyYuwJn*-s#x_4~u0^YM2K`mhU>)O5hwIHI zavP+27l(YX6l-39jb5WJ2UU4Yj6~+0SR4)Sd6NYTlG*UJH?=y-aVRtzYj8mZW9POt z&UQPg+uzpI>bFX$6RYkX)Hc#eFN2esgFftt6`fVXS81VUegc8O-SfZDwwtkrPXO;Q#vMgZSS3Mev#-%jkD$f47RpkL zug&lDx3Zi;b5UzP%3emmrNc%z6S+L9?m`Q)pupqCAK_8V&lLS@l~eR(I}ObMvQa4{ zzzuOJDVO2~g7N;g7B^kM@)mWrG`YNV18SjcFs`=7QCI1-S5B>*P*+(I2}RaSRCHkj zkr~AHN<*ElLL<_-exH}+jeD`6YVdhmJ>E7?>tf2+C0~CpV~d%vVC4vM7wlL$e0anf z?@TCYuo)grW04w%z)fsNZ6g-PgLzes(17F`n6k<|JM1-jA2P#kq6<)mw{jb!f^v7W zhb_bgIvV*mG{;?u{;5_f6HWjMFWLN)|ctEnO(G5{Xs8{px!c|wQ@ ze_LBNWHq+Kx2O-oJ>i|@;@D5C5Y^ZU?ET|Vv~DoD0uAeO$!CEz>)OO>F3nw-1FH4u z19+LonK-oL@g|a(cE5$&1J&z`$d$l->%Sz$kx=Cwz!+o$oq^qIz-GA#c3x)-hqifX z5@c@FWu=#4>bkvmA=qZQTHC10@8p5`ElV%{$KdZz-4V!qVuZNt4>hm|+xs)N_nY2+ z3r{~~AV0&Nr#6sh0yR(nh5Rv-i*Ii7J6Qg%1}Zlu5-I$;DIMs>c5eD10{3l7`D5mn z+}!;4@Q+P-B!-!OikW?KGm&L3#i8*axy8S;ZlZ@Vrc893Dh` z1%xM`ae0h#2BuAx^DJAMvamdj)-nc@!0aC+E&bvEbN^5>6u#QBrWl2TNm03=H|K^9 zMm(lsBC$aK47Z-tlt!XtADS1~nTX|0ItOh@=lVQeYiv{$KgxXo7hasmj_xH}EdnOE zU#Y@QjR|{wiGCpz@6w6s9{7IeBJw2oUQc6Z zi8ZgcJ0@V?D-d`_!WFu$--eA>7Y5_ms%`Z& zyPcSN@z84F>FOHf>@v%zNZ48}62rgu4hk&YbwC&r@rAZ;o3pVgb^6_YzsKjLd$9ci z?B3f*y@SvRZEuwe`;j~Ze}8Lf`|mi59>wZR230hRAxm!&NAcv{i2~ePJlOgT533rn z(c?(*v-}C9#vpGt0*;+_G4RVoki09F`~aPMGsxn=`MpcU;_)gddsG{^_Z<&WR$BRh-)+O8X}Y174@00{J>y^+NR7F6|?t=PnYT7f&IU*L-O(iW8kWD z0GvDEg))~0x?Ebg_n-;xKdM>xpjPY^;IcEBl%OHFbZ{Ef9@0o1vf5J4n03g^)>+v; z4J@CafmaSahSf3k_;|p74jF8oV1z}7Gti#6ek>e2Y*gdJe*ID;IX^deCg4&unMgvDE=o~IU`NO@{K1CO0BlU&$w!qV^1{K<)tgSco!Gomz% zIh+2IH6Dx!WlFZb*g~UKa7)(|vKlsYnUe3uz71u9EDiE#=iLuNS63=I1LwL%4fzly zxY!z`&LZ%^JcwHPl+9*uyoa~pQ0i^x_L{IdvIu_12KA!I=LnJX>BC|i0w2Xer1%2D z@zCK|#A6YC1dBYG%lmc%CGyMJP4$zLZ90A|;U@UN9>%)EaOI*AR=jH#Hezn^!}fPy zhr0JHYK=-8cUh#0jk~N5-2dJPN#0pg?itgdQ>H;zic++3*X%^9Rb3M?xPs7AMwA*= z&v*i7J{Z@YK@KR{lZy0!ssMwP|chb5g-T3F#!!7%&iv=1zU8QraqVYa%nNS#>dwg^b) z6GR(fwME?}_~|a?I84px(_*YXEfwn0<)>AoE;i=0ItJ-vd0j@}Q1`70HJ@DW84H*{ z%9$DoOMcKVNAHG1D=7HdT3gy$`-SWc(N~EYp%8?%ALXXu`I=5an2Jz@{^xs8HJtjW zN~l5RbTEGGPQJ+n4xapYSVEbUi8)aAHiX;ZvyXE<7?bSOzr0DI23u9|;q9Jb9qvjV%;s{FsfGF**l)pA?b>u|qk za`?Y*p6|FUXKxXczZgYe%>jMK3>i_wc|)4iEMl+XS02^E178kdPs}4a8f7FI#yOQL zhu9vU$86gZApP8H_;?I2JCoq9P8~iCE9{z)cd!R*8|*xn3e(Rg!O-(*fDgJe&ga3) z?Dco``9xVV8i0gRdKkG(3&+mCMpB^cndxxht4vURp$GO*3(5=QNIHyv(;&7RSYa%@ za3P<34yP{6o@AW1Brd#t@+&NjOg_I1qGPS%pkjWT+uw>CD__q%F8J=slfW2Q_AgWZ z3iMMr@vub3Z~u542%QE-AjQuKHaPsRaRRR{2GzyG7!@`ebhfre|YM||)y!X~lA7&XL#r!j? z4Ql!y!?pN2Cjbn0ZDR))5Euz z9SBa9WNXel_j%JXSxotxPVn0 zGmvVnaLky;=;KmStydhEl?`Nt6Gf@jDM?+57)Ez#Nwrbv(kYS7NUb(0x`s)R9vQ=$ zI4O|oY~iF_K)N(uU==6z1TlrvCK=M%1gmp}>M`<@1*Ezt=44?E(j(;4M6iE-a^TZ% z#)}gop~071E)?|)sO3u^^D&$78|DXJ2!aAW9k>_r^%Q*+rmJuoFq&>S2miwFJbQZ* z$@0LvJsX9zWjIyKajFzfXQQW~)#;>sD>wuzt{1BQ%Iqu=7nwpWgVe?txE#v?U&9)j?^aiyh;6 z7#)O+pN!-i82!@#@~43NCz~wlo*Is7DrN1l%jykjQovs9T7QsKXk|#Ue_U%aziWZJ zk;*&L3CS42_dDJp-WTj-KR5C~j$^7fxbfExN=QC=d-pShY>-Di^h8!@?UBunD??cK&+zgwEzt;|!;F&kA@#f{+?J{klS z?s52T;`KG~Q$i@W|K|SwA74|mU3k?SfUv;sO>bYvn~+p$MSY{^S- zWD9TfsGL;=xb$a{MdR7Tu>qN6sM6plBd_yB}RC<;u+%zvS~Z2>lY!`-&mqI&l` z$wVzn`<$uJiwO53#G+gA@snQaxMU#4^6!xQJ;HT_mk_QY{DANy!cPd8zv(Xs-yr;o zfHO-AIwly&l+3AOnP#i@vIxIBvaj;*Rf$MQx-3Rk&z&8w8HrCjhsff3>Le5JbBlPe oY!d02yL(Uu`HB$Ooo*(p#AHgx^I4=Re!hn2dqjwIAZzFU0nit&8vp7)X6c@^>6SL>N?Pa!WhrGTr4+OaGz~6QLSCCfpiRr47AX2Ge!TZs zpDc4BJX|iIpHjVE#h^St;0ef51O#unSIs9b?-K<@EubP7p7+h1lq9YCp5g2KbLPy< zIcLtyoH>VQPRajxLLPY|B0?>}-xv2iyXY<1-pJL-;j=Xo$-KCE@$>Za5@1(y50k>) zxmq}%qJ!`Lp;207ImmAf5(_;lot0VSL~c}&GWuB*zzm6D0;h(7$&d!KAJ#!(ssg4w zr&}%T{$*uAceo2Y_anvshv|3QDYOo9G7ByTmSGr2BQXMABe&=r@)j+0V z1)AQL#w1!Zm#;AywEEJS$fmxlg{H?>vEe~gcnR~Xc4->5dM zImrG*x(X(xCx@_-rJqO-M~e*dCP&?0Zb>0`x&JeZfq$=AQn~w(r=-E3|3w8KX2dZ6 z`lvOy|95Sf7#*}i$kqj?M`NDPP|*}k@Oowrq|evEK&H?WZOI@r2J97MjYf}7qrt5) zh@}TGBcIqDOBAO>+_j$K^{4SRE^nxMD4ts3(g{DT8)x=9ZpjRR=(J?3fe+M)qb4$mq#3o=6b*^P zyBvXC=$S38nd=|YEp<^w$fw~7ByI7HiF{57N(PZOeUZdcu$Z;QS>vqnR=qW0jNDR~ zBw3_vOK3<)$MkY{FN~6g_<(UzB-ldDMce>n(PF+NR-Y^ZsWH|t+A=0+0V~VIH5&2H zrE8IxOJGjUPu{sB42(Smo#q|^a5CZ+?=AB!CTt_zrvd5zZFs*;cqz z*g9f2b;Y|Ews*BQ+nnz9R(q$zw$SPBY!|!5=ZX6T0(+plXtd!Np(hBOB+y6T6aqI{ z6HXT`U==XBcx-f1*853id$h0Ud-bm-^_$DQyNVUEu)6n@DIXZ~y?aY;v6%j{#JL&r z3yE5Sg*kIGya&bsV`)$~!K?X#6kj6nB}9~tVyWJVr9Y@yFBDZ?iFlUi*AVnFaV_M` zxOdhJ^anTP&Xtl)c8_DTV|&$3+lBZNF&AlQHewd96SzU(djh=#ejxB8ftv&d;J}QB zGJhsif+|Hudht(U6lqUI84=|OY%sB^R&#}DR|$Lr>#A}zAu8cuRW@9$`UA`KK0foX zJVPK!(%CB&vq@ql0yhPQaZtAgnrm{|V(-S9Vu2lkqn7o|<*jX4r4#lLe=@wkFi*J& zQPf}nwX-PNL-axddkJiZd!4K`-Z{t9y}8>nY4fBP z&9}q`_=~H%hg;z>k|9(0)J^TK7H6}=)#Tt)_6co{&V}vGVg?Py_q>#tAEag}0<+o| z<+i(=oz4{w3@KMfSEp#A&U6Gm?Sd}5*eu$et+r-Ilhf^Nce%w7!%O6(2HtH?%6OQB z<`JmE0n9S7i11s(ET+Xxf&ktlW7iXU}{GpI}A%YGE&abRT zP4H?*Jo^Anb{sU&=J}#K9Ij@kYk_T9ySTWewSAdLAthG9&Ls^3dAKhX*0-gy&E7=u zb6rm=b@C11QzWnC)-cO_^0xM7hj^SsB0EIKQfGUY+ve`Xq#|aL)Dq(TmH}<}hxl9x<>xA_@5!xFXIa584xVqN~FpF2%$q+B#b8 zE^#Z3O}xIy`Z{YvrOi@VU0KmkIX&pXILt8b3hob$H^x8d>7+!y$ldP3MAS_Ua+OY} ztIOHhE%K=4(fJaMm<9!FCa^|ut{Fc*sEto1;5dGdDnm`;Bm!K;izJ;)&B^fLnk>Oi z=vt7kHTDFoCO$$$iYIO+aVcSZl(~rc!W?bRPMfnyEF=1`;kYTu9%e;|hw$adxxrRp zpPO=rk$(O}NE_&bTT7y1#P%*+@q&Oa|H1qAT2UDtT%w7lwiPP3nb(|<{QbV)5-IX5x|qfc8=S39?|-csH$tFG2I zyRLdx#RF!kKlq3N@w&jk(MTAQCI+y}mkTERH*%Ybedis!?Gh^w`Z_l^IWb!50a9Z} z+`ourBq|fTT;eaZUW13W8`*X5KX2bAo%g$xEhpVONcS(4(HZ8`ms5b;HyEk;OYLqO z51GHik|(#Zr@Svcvz`Gwt^a*f@BZ!4Zot=1XW~^W`k5VE?X$nr8Y_NV<@d00XAV=N z%4FE^WI1SeO-9xAyO^TqQCcx~WIC>U<-c}nuSmR`pz=fFny+3QYFpfDt}C!iyfxZ^$zOwp$S&Fz~{zHoMEV(C%t(Z)p+VfLC5yose`vE@QXJoUy|Je6;LGT+1{&65F?hP7lB+cd^VTTBufc%5ggtrJi3QG?@*7Ga2 z5RX%L8iE<35g{hIpdEOUKS2!K7~GqNtcJRpY0y5xcqThV*d(GYAV5nM-$8&2iS+OG z;CBBAj~_~9%e*@eJtk#3Z`$F<7@G#q9GNLt!YsKanz{NJj4$_6WQeE9$2Y&R zu<7*l2&LZ#sXE01^0U(k@bl?$_xzQbJRb)AIFKfS2R3?eu%E{{PqIAil8O~c%V6cX zM5&kwJI-Vbsq6dBl#Uyg8G^Fo(6r)*sK6I4I^12YofxMWup$**D=J}$HxnK{o6c6l z%Cl)j^JuPPQNkP^vX&1>S{rgsEa-AJ+o_EIE1W+&vFCk~;-YH^`x^nCLUKiPk--4t zH3}W?znaXsDO;&G7=uHVi7x8>lt3^kw^P%M0V)ysI*$^@W0zJej;AJ7ZsK}sw!oox z*Tt?b(G(C;d};ll9~ zg)+iNr&;o4eX-1vAoOX=OR({dl39|4cU05DuyH1uSyF{FF%`siuCP4PVv0RKIRhK- znZ{YNlm3!00`Y!HIO^&T$A=%GKSCfpjuA}2w;5SMe=>dgQ#mwg2p`G2^MwXQSpOJi z85iDP5{~!<7S^Ejp1Ckbsp0#`jbefk7qhB^UdnGAQ^{}vAN2`Xu+ohz;A-f>!@RJ9 zB>esG9~ZNe$mhga1nwbFK&Izs*uC)K#Tlv^BGw{+Lf1d(f8z=YyFMNlGYOAi(L(GE z1gs2pTuiHKak}iS+!3+T;Oii#G{=S>WW>%rqKU9iX$EZsD4~gN0uHGABq5qR5ij%4 z5wQi9eKIPglVmEf?G8g=^#A--z%BHhOeXVQ`s8`J^i=`oUwh8eu3|>-oJ$iKeEP*0 zSedPoTcwt8FnyT}7mukS^~(aaB?_PE;xS_?U~_3aZ2fXGK2ayb$Ww9r^;v3(1^eYR z|LgMF%Nh8F91H(-In~n)ns5_=du5UQC}~ZnNqtVGEk%}>S|u#2r2zG(W=RYW~ooPq|4#% z#QU{BCva!rXEp`7I1xVjIxRcY3p_-oa>8Ftj3bQK86zS4>J))@=fmQwc{2juH1siq z1U@EULx5#mFyMI>nN9i+6L^W3*1$(sQv?U0^Wo>KnS~P(^+h*zi6WNwHoQ9f-yGg1 ziPwmYbo;_={(LB|$KW?4YlmJ2xIJc~o4Nm63hTb<_dfFNDHhuli1_a*;%{9qhPeYK z)&%TA9Q^x0SWitnJCe()(}g2>GQ#txYpTm+$0sCKX9*|b%k}sbbC)%mffQ^N^Ig`D?t zfalSZ34gvZ;yxbJluj|ehiwGCLHGoEoNz4TX&1LK@F*v)CVQJua9F{7o20NtdLc2) zFZ!sr=KH6Gq{nD$dT48uHe0i^sncc?c|w01E(8Xbd*ti9wy$lhRoIPM6mOA z=8#kI-0d_$g6~u!gYR#bn{ShLep}}C9)H#4-t;Hx;N>4*-F%pLCqL#G%~9TL@3f2D zZH~gzcMR+sIB;hKTkrk+PQIcrXsm!2i&7j9FSWzcpqys$nrE7nP1nf?$3KcIh16<&oA^14TO)B zWBsX^>ZD(u5CI*&aJ$RB%puyE7TQI(zdDKH_tE^O_O^~zM<-fpH|m&SRt|T=zzOeD zI;PMIjjO$h-vj-nz%MTU|AT6LaYN%B-?rTNR)1mtfQH>t4_;9`-^H^kw#hS2&+_%l zX=O`k6@&M%6xzxx&!c*lqzO42J-hU5#Q34M!Urw9|G6BkHfOVFBDr(~E20DG*Y0#J zZC~sVr+ZieONtvREoP8}$y1oXvWtdwDX_~I=~&+6=%5U3>+J4un6;rNo@aFeGnw_I z!e0f^Ivynxgbj{L_s_c~KIM5YfsLA)OzhbNf^H|EjFJERM_w)sJp7ar?ls*bRcQC< z1|;--HS-4l-jGRz*a0b#uHWy;Ph;)67N&^2K3i5npL?Xmika;C!u@;G*k#5x@84l! YYou(JCnJ-!Mzv~L{B;RI{+}EF3-fw*UH||9 diff --git a/app/workflows/agent_graph.py b/app/workflows/agent_graph.py index dd0fee17..8b2a971c 100644 --- a/app/workflows/agent_graph.py +++ b/app/workflows/agent_graph.py @@ -151,7 +151,9 @@ class AgentWorkflow: """ ctx = dict(state.get("context", {}) or {}) mcp_results = state.get("mcp_results") or [] - ctx["evidence"] = mcp_results or ctx.get("evidence") + rag_results = state.get("rag_results") or [] + combined_evidence = list(mcp_results) + list(rag_results) + ctx["evidence"] = combined_evidence or ctx.get("evidence") ctx["tool_result"] = mcp_results or ctx.get("tool_result") ctx["tool_executed"] = any(isinstance(r, dict) and r.get("ok") for r in mcp_results) @@ -945,12 +947,17 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, "output_guardrails_already_applied": False, "supervisor_action": "disabled", "supervisor_attempt": int(state.get("supervisor_attempt", 0)), } context = { - **self._output_guardrail_context({**state, "mcp_results": drained.mcp_results}), + **self._output_guardrail_context({ + **state, + "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, + }), "tenant_id": state.get("tenant_id"), "agent_id": state.get("agent_id"), "session_id": state.get("conversation_key") or state.get("session_id"), @@ -1022,6 +1029,7 @@ class AgentWorkflow: "pending_topics": drained.pending_topics, "handled_topics": drained.handled_topics, "mcp_results": drained.mcp_results, + "rag_results": drained.rag_results, } async def output_guardrails(self, state): @@ -1104,6 +1112,7 @@ class AgentWorkflow: relevant_transaction_evidence = list(state.get("relevant_transaction_evidence") or []) judge_context["transaction_evidence"] = relevant_transaction_evidence current_evidence = list(state.get("mcp_results", []) or []) + current_evidence.extend(state.get("rag_results", []) or []) current_evidence.extend(relevant_transaction_evidence) judge_context["evidence"] = current_evidence or judge_context.get("evidence") judge_context["route"] = state.get("route") @@ -1251,6 +1260,7 @@ class AgentWorkflow: "judges": state.get("judge_results", []), "mcp_tools": state.get("mcp_tools", []), "mcp_results": state.get("mcp_results", []), + "rag_results": state.get("rag_results", []), "transaction_evidence": state.get("relevant_transaction_evidence", []), }, )