feat(agentgateway): list connected systems and filter MCP tools by GTID - #264
Open
I542102 wants to merge 12 commits into
Open
feat(agentgateway): list connected systems and filter MCP tools by GTID#264I542102 wants to merge 12 commits into
I542102 wants to merge 12 commits into
Conversation
…d typed return - Extract global_tenant_id, system_type, integration_dependency from fragment labels instead of parsing the fragment URL - Rename list_active_integrations to _list_active_integrations (private) - Add ActiveIntegration TypedDict for strong return type; export it from the agentgateway package - Skip fragments only when system_type label is absent (gtid and ord_id are guaranteed to be present by the writer) - Update unit tests to mock get_fragment_labels instead of URL parsing
…gment Fragments missing the system_type label are now included in the result with system_type set to None, and a debug log is emitted. Previously the fragment was silently dropped, causing incomplete results for older integrations.
Feat/afsdk 4288
…flict Resolves conflict in _fragments.py by adopting main's private label constants (_LABEL_GTID, _LABEL_ORD_ID, _LABEL_SYSTEM_TYPE) and updating the GTID filter in _list_fragments_by_label to use _LABEL_GTID.
add global id filter for lob agents
| "integration_dependency": "sap-pce-apiResource-PA-v1", | ||
| } | ||
|
|
||
| def test_fragment_with_missing_labels_gets_none_values(self): |
Contributor
There was a problem hiding this comment.
Ensure you also test on a sample agent (can be locally) poiting out to one destination service, to ensure scenarios are ok for empty labels and so on
Contributor
|
Verify failing checks and fulfill PR template. Also check skills in the repo and use it ;) |
…and GTID filtering - Move FragmentLabel enum to _models.py (single source of truth) - Rename ActiveIntegration → ConnectedSystem with all fragment metadata fields - Remove A2A from _list_active_integrations filter (MCP-only) - Rename MCPToolFilter.global_tenant_ids → gtids; simplify docstring - Guard list_active_integrations against customer agent flow - Export ConnectedSystem from __init__.py; remove ActiveIntegration - Add gtids filter test and customer agent guard tests - Add BDD integration tests for connected systems scenarios - Bump version to 0.43.0
…strings - Fix ConnectedSystem construction to use global_tenant_id (not gtids) - Rename list_mcp_fragments param global_tenant_ids → gtids in tests - Replace GTID_LABEL_KEY usage with string literal in test_lob.py - Update test names and MCPToolFilter usages to use gtids field - Fix agw_client.py docstring example to use gtids instead of global_tenant_ids
- Add ConnectedSystem TypedDict to _models.py (was referenced but never defined) - Fix ruff format violations in _fragments.py and agw_client.py - Update test_operation.py count for AGENTGATEWAY_LIST_ACTIVE_INTEGRATIONS - Sync uv.lock version to 0.43.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds two capabilities to the Agent Gateway LoB flow:
list_active_integrations/list_connected_systems— new client method that reads Destination Service instance fragments to discover which backend systems (e.g. SAP PCE, SAP S/4HANA) are connected for the current subscriber tenant. Returns a list ofConnectedSystemdicts withglobal_tenant_id,system_type, andintegration_dependency.GTID filter for
list_mcp_tools— addsgtidsfield toMCPToolFilter, forwarded to the Destination Service as a label filter onsap-managed-runtime-gtid, allowing callers to scope MCP tool discovery to specific connected systems.Key design decisions:
FragmentLabelenum moved to_models.pyalongside other public data modelsConnectedSystemTypedDict replacesActiveIntegration(more aligned with connectivity semantics)list_active_integrationsis LoB-only and raisesAgentGatewaySDKErrorfor customer agent flowsRelated Issue
Closes #AFSDK-4288
Type of Change
How to Test
agw_client.list_active_integrations()— expect a list ofConnectedSystemdictsglobal_tenant_idinMCPToolFilter(gtids=[...])and calllist_mcp_tools()— expect only tools from that systemlist_active_integrations()from a customer agent — expectAgentGatewaySDKErrorChecklist
Additional Notes
ActiveIntegrationis kept as a backward-compatible alias in_fragments.pybutConnectedSystemis the canonical export going forwardMCPToolFilter.global_tenant_idsrenamed togtidsto match the abbreviated form used consistently in labels and docs