Releases: SAP/cloud-sdk-python
v0.17.0 - May 11, 2026
What's New
- Agent Gateway module (
sap_cloud_sdk.agentgateway): A client for discovering and invoking MCP tools via SAP Agent Gateway.create_client(tenant_subdomain="tenant")— auto-detects agent type (LoB vs Customer) from credential file presence.AgentGatewayClient— exposeslist_mcp_tools()andcall_mcp_tool(tool, user_token, **kwargs)as async methods.MCPTooldata model withnamespaced_name,description, andinput_schemafields.- LangChain converter:
mcp_tool_to_langchain(mcp_tool, call_tool, get_user_token)insap_cloud_sdk.agentgateway.convertersconvertsMCPToolobjects to LangChainStructuredToolinstances (requiressap-cloud-sdk[langchain]). - Exceptions:
AgentGatewaySDKError,MCPServerNotFoundError.
Contributors
v0.16.0 - May 11, 2026
What's New
- Agent Memory client module (
sap_cloud_sdk.agent_memory): new client for the SAP Agent Memory service (v1 OData API).create_client(config=None)— factory function that auto-detects credentials from a mounted BTP service binding (/etc/secrets/appfnd/hana-agent-memory/default/) orCLOUD_SDK_CFG_HANA_AGENT_MEMORY_DEFAULT_*environment variables.AgentMemoryClient— synchronous HTTP client exposing:- Memory operations:
add_memory,get_memory,update_memory,delete_memory,list_memories,count_memories,search_memories(semantic/vector search) - Message operations:
add_message,get_message,delete_message,list_messages - Admin operations:
get_retention_config,update_retention_config
- Memory operations:
AgentMemoryConfig— configuration dataclass;token_url,client_id, andclient_secretare optional for unauthenticated local development.FilterDefinition— OData substring filter helper forcontentandmetadatafields, accepted bylist_memoriesandlist_messages.- Model classes:
Memory,Message,MessageRole,RetentionConfig,SearchResult. - Exception hierarchy:
AgentMemoryError(base),AgentMemoryConfigError,AgentMemoryHttpError,AgentMemoryNotFoundError,AgentMemoryValidationError.
- Telemetry: added
Module.AGENT_MEMORYand correspondingOperationconstants; allAgentMemoryClientmethods are instrumented with@record_metrics.
Contributors
- @santoshnallur-sap
v0.15.0 - May 11, 2026
What's New
- Agent Decorators module (
sap_cloud_sdk.agent_decorators): A new configuration-as-code API for SAP AI agents. Developers annotate zero-argument functions with three decorators to expose agent configuration fields to a low-code UI:@prompt_section(key, label, description, validation=None)— marks a function that returns a prompt string.@agent_config(key, label, description)— marks a function that returns a generic configuration value.@agent_model(key, label, description="")— marks a function that returns a model identifier string.AgentDecoratorErroris raised at decoration time ifkeyis empty or whitespace-only.- Import from
sap_cloud_sdk.agent_decorators.
Contributors
v0.14.3 - May 07, 2025
What's New
resolve_base_mount()function: New public utility function exported fromsap_cloud_sdk.core.secret_resolver. Resolves the effective base path for mount-based secret discovery by checking theSERVICE_BINDING_ROOTenvironment variable first, falling back to the providedbase_volume_mountargument.SERVICE_BINDING_ROOTsupport:read_from_mount_and_fallback_to_env_varnow respects theSERVICE_BINDING_ROOTenvironment variable as defined by the servicebinding.io v1.1.0 specification. When set, it overrides thebase_volume_mountargument for mount path resolution.
Improvements
- User guides for AuditLog, Destination, DMS, ObjectStore, and AI Core were standardized with a consistent configuration section format.
read_from_mount_and_fallback_to_env_varcallers (AuditLog, Destination, DMS) now passbase_volume_mountandbase_var_nameexplicitly for clarity.
Contributors
Application Foundation Toolkit Libraries Team
v0.14.2 - May 6, 2026
Bug Fixes
opentelemetry-instrumentation-langchain (pulled in via traceloop-sdk~=0.54.0) calls wrap_function_wrapper(module=..., name=..., wrapper=...). wrapt 2.x removed the module keyword, so the LangChain instrumentor initialization fails.
This adds an interim constraint wrapt<2 to pyproject.toml so the SDK pulls a wrapt 1.x (e.g. 1.17.x) where wrap_function_wrapper(module=...) is still accepted. After this change, auto_instrument() cleanly initializes the LangChain instrumentor and downstream agents see chain / node / graph spans again.
Contributors
Application Foundation Toolkit Libraries Team
v0.14.1 - May 4, 2026
What's New
-
PropagatedAttributesSpanProcessor— a new OpenTelemetrySpanProcessorthat automatically injects attributes propagated viainvoke_agent_span(propagate=True)into framework-generated child spans (LangChain, LangGraph, Anthropic SDK, etc.).Previously, custom attributes such as
user.id,session.id, orgen_ai.agent.idwere visible on the parent SDK span but silently dropped on auto-instrumented child spans. With this processor registered, any propagated attribute that is not already set on a child span will be injected at span creation time.No API changes required — the processor is registered automatically by
auto_instrument().Priority semantics: propagated attributes are lowest priority. If a framework already sets an attribute on a span (e.g.
gen_ai.operation.name), the framework's value is preserved.
Bug Fixes
- CI: version regression check — the
Enforce version bump when src/ is modifiedworkflow now verifies that the new version is strictly greater than the base branch version. Previously it only checked that the version line had changed, allowing a version downgrade to pass undetected.
Contributors
Application Foundation Toolkit Libraries Team
v0.14.0 - May 4, 2026
What's New
ConsumptionLevelenum for the v2 destination consumption API (get_destination). Supported values:PROVIDER_SUBACCOUNT,PROVIDER_INSTANCE,SUBACCOUNT,INSTANCE. Exported fromsap_cloud_sdk.destination.levelparameter onget_destinationnow acceptsConsumptionLevelinstead of requiring manual@levelstring concatenation in the destination name.fragment_levelfield onConsumptionOptions— optionalConsumptionLevelthat appends@<level>to the fragment name in theX-fragment-namerequest header.
Breaking Changes
⚠️ Important: This section is critical for users upgrading from previous versions
-
get_destinationlevelparameter type: changed fromOptional[Level]toOptional[ConsumptionLevel]. If you were passingLevel.SERVICE_INSTANCEorLevel.SUB_ACCOUNTtoget_destination, migrate as follows:Before After level=Level.SERVICE_INSTANCElevel=ConsumptionLevel.INSTANCElevel=Level.SUB_ACCOUNTlevel=ConsumptionLevel.SUBACCOUNTThe v1
Levelenum is unchanged and still used for write operations, label operations, and the v1 read methods (get_instance_destination,get_subaccount_destination, etc.).
v0.13.0 - April 28, 2026
What's New
auto_instrument() now accepts a middlewares parameter for automatic extraction of request-scoped attributes into OpenTelemetry traces.
The first implementation is StarletteIASTelemetryMiddleware for Starlette/FastAPI. It reads the Authorization: Bearer header, parses it as an IAS JWT, and automatically propagates sap.tenancy.tenant_id (from sap_gtid) and user.id (from user_uuid) to all telemetry spans for the duration of the request.
from starlette.applications import Starlette
from sap_cloud_sdk.core.telemetry import auto_instrument
from sap_cloud_sdk.core.telemetry.middleware import StarletteIASTelemetryMiddleware
app = Starlette(...)
# The SDK registers the middleware, sets up context propagation,
# and adds a span processor — all from this single call.
auto_instrument(middlewares=[StarletteIASTelemetryMiddleware(app=app)]) Contributors
Application Foundation Toolkit Libraries Team
v0.12.1
Bug Fixes
- auditlog-ng: OTLP transport now respects
OTEL_EXPORTER_OTLP_PROTOCOLenv var. Previously the gRPC exporter was hardcoded; settingOTEL_EXPORTER_OTLP_PROTOCOL=http/protobufnow selects the HTTP/protobuf exporter instead. Defaults togrpc— no breaking change.
Contributors
Application Foundation Toolkit Libraries Team
v0.12.0 - April 28, 2026
What's New
- New Document Management Service (DMS) Module: Introduced
sap_cloud_sdk.dms, a client for SAP Document Management Service that provides both CMIS (Content Management Interoperability Services) and Admin API functionality - CMIS API Support: Full implementation of CMIS standard for document operations including create, read, update, delete, and search capabilities
- Admin API Support: Administrative functions for repository and user management
- Flexible Authentication: Support for OAuth2 and basic authentication
Bug Fixes
N/A - This is a new feature addition
Breaking Changes
No Breaking Changes: This is a new module addition that doesn't affect existing functionality
Contributors
Application Foundation Toolkit Libraries Team
Karan Shukla (karan.shukla01@sap.com)