Skip to content

Releases: SAP/cloud-sdk-python

v0.17.0 - May 11, 2026

11 May 17:54
02105d4

Choose a tag to compare

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 — exposes list_mcp_tools() and call_mcp_tool(tool, user_token, **kwargs) as async methods.
    • MCPTool data model with namespaced_name, description, and input_schema fields.
    • LangChain converter: mcp_tool_to_langchain(mcp_tool, call_tool, get_user_token) in sap_cloud_sdk.agentgateway.converters converts MCPTool objects to LangChain StructuredTool instances (requires sap-cloud-sdk[langchain]).
    • Exceptions: AgentGatewaySDKError, MCPServerNotFoundError.

Contributors

v0.16.0 - May 11, 2026

11 May 17:11
58d63b6

Choose a tag to compare

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/) or CLOUD_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
    • AgentMemoryConfig — configuration dataclass; token_url, client_id, and client_secret are optional for unauthenticated local development.
    • FilterDefinition — OData substring filter helper for content and metadata fields, accepted by list_memories and list_messages.
    • Model classes: Memory, Message, MessageRole, RetentionConfig, SearchResult.
    • Exception hierarchy: AgentMemoryError (base), AgentMemoryConfigError, AgentMemoryHttpError, AgentMemoryNotFoundError, AgentMemoryValidationError.
  • Telemetry: added Module.AGENT_MEMORY and corresponding Operation constants; all AgentMemoryClient methods are instrumented with @record_metrics.

Contributors

  • @santoshnallur-sap

v0.15.0 - May 11, 2026

11 May 13:30
45ebc27

Choose a tag to compare

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.
    • AgentDecoratorError is raised at decoration time if key is empty or whitespace-only.
    • Import from sap_cloud_sdk.agent_decorators.

Contributors

v0.14.3 - May 07, 2025

07 May 17:35
552dac7

Choose a tag to compare

What's New

  • resolve_base_mount() function: New public utility function exported from sap_cloud_sdk.core.secret_resolver. Resolves the effective base path for mount-based secret discovery by checking the SERVICE_BINDING_ROOT environment variable first, falling back to the provided base_volume_mount argument.
  • SERVICE_BINDING_ROOT support: read_from_mount_and_fallback_to_env_var now respects the SERVICE_BINDING_ROOT environment variable as defined by the servicebinding.io v1.1.0 specification. When set, it overrides the base_volume_mount argument 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_var callers (AuditLog, Destination, DMS) now pass base_volume_mount and base_var_name explicitly for clarity.

Contributors

Application Foundation Toolkit Libraries Team

v0.14.2 - May 6, 2026

06 May 16:36
8b651d4

Choose a tag to compare

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

04 May 19:51
2376dc9

Choose a tag to compare

What's New

  • PropagatedAttributesSpanProcessor — a new OpenTelemetry SpanProcessor that automatically injects attributes propagated via invoke_agent_span(propagate=True) into framework-generated child spans (LangChain, LangGraph, Anthropic SDK, etc.).

    Previously, custom attributes such as user.id, session.id, or gen_ai.agent.id were 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 modified workflow 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

04 May 16:22
88b0043

Choose a tag to compare

What's New

  • ConsumptionLevel enum for the v2 destination consumption API (get_destination). Supported values: PROVIDER_SUBACCOUNT, PROVIDER_INSTANCE, SUBACCOUNT, INSTANCE. Exported from sap_cloud_sdk.destination.
  • level parameter on get_destination now accepts ConsumptionLevel instead of requiring manual @level string concatenation in the destination name.
  • fragment_level field on ConsumptionOptions — optional ConsumptionLevel that appends @<level> to the fragment name in the X-fragment-name request header.

Breaking Changes

⚠️ Important: This section is critical for users upgrading from previous versions

  • get_destination level parameter type: changed from Optional[Level] to Optional[ConsumptionLevel]. If you were passing Level.SERVICE_INSTANCE or Level.SUB_ACCOUNT to get_destination, migrate as follows:

    Before After
    level=Level.SERVICE_INSTANCE level=ConsumptionLevel.INSTANCE
    level=Level.SUB_ACCOUNT level=ConsumptionLevel.SUBACCOUNT

    The v1 Level enum 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

29 Apr 02:04
9cc450a

Choose a tag to compare

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

29 Apr 00:45
v0.12.1
b10572f

Choose a tag to compare

Bug Fixes

  • auditlog-ng: OTLP transport now respects OTEL_EXPORTER_OTLP_PROTOCOL env var. Previously the gRPC exporter was hardcoded; setting OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf now selects the HTTP/protobuf exporter instead. Defaults to grpc — no breaking change.

Contributors

Application Foundation Toolkit Libraries Team

v0.12.0 - April 28, 2026

28 Apr 16:27
6011bd8

Choose a tag to compare

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)