…eated-by resource tag
Adds two complementary origin signals for AgentCore Payments:
- Per-call surface tag: PaymentManager and PaymentClient now propagate an
integration_source (default "raw-sdk") plus a feature=payments token through
the boto3 User-Agent. Strands sets "strands", LangGraph sets "langgraph". Lets
the payments DP count callers by surface/version/operation from each request.
- Durable resource tag: create_payment_manager stamps
agentcore:created-by=agentcore-sdk (default-if-absent, caller value preserved)
so payment managers created through the SDK are attributable after creation.
build_user_agent_suffix gains an optional feature token. Adds unit coverage for
the user-agent formatting and the created-by tag injection/override behavior.
What
Two complementary origin signals for AgentCore Payments so we can measure who is calling and what the SDK created.
1. Per-call surface tag (User-Agent, carrier A1)
build_user_agent_suffixgains an optionalfeaturetoken →bedrock-agentcore/X.Y.Z (integration_source=strands; feature=payments).PaymentManager(data plane) andPaymentClient(control plane) now takeintegration_source(defaultraw-sdk) and emit it withfeature=payments.integration_source="strands"; LangGraph middleware sets"langgraph".2. Durable created-by resource tag
create_payment_managerstampsagentcore:created-by=agentcore-sdk, default-if-absent (a caller-supplied value and other tags are preserved).create_payment_manager_with_connectorpath automatically.CreatePaymentConnectorhas notagsin its API model, and credential providers are created via a separateIdentityClient.Tests
tests/bedrock_agentcore/_utils/test_user_agent.py— user-agent formatting, feature token, sanitization.test_client.pycases — created-by tag injection and caller-override preservation.integration_sourcekwarg.The
agentcore:tag-key prefix passes the botocore model pattern, but I have not verified the control plane accepts caller-suppliedagentcore:-prefixed keys at runtime (services sometimes reserve such prefixes). Please validatecreate_payment_manageragainst a personal/alpha stack before merging; if rejected, fall back toagentcore-created-by.