Agent Sandbox Registry

python-sdk

Decision: Implement AK/SK → API Key token exchange (experimental)

无中文版

.agents/notes/implemented/feature/2026-09-29-aksk-token-exchange.md

Decision: Implement AK/SK → API Key token exchange (experimental)

Status: implemented Implemented: 2026-09-29

Problem

Users with Alibaba Cloud AK/SK credentials cannot directly authenticate with the FC Agent Sandbox API, which requires an API Key. Manually obtaining an API Key adds friction to the onboarding flow, especially for enterprise users who already have AK/SK credentials provisioned through their cloud account.

Decision

Implement an experimental token exchange mechanism that converts AK/SK credentials into a temporary API Key:

Error handling

API Design

async def exchange_aksk_for_api_key(
    access_key_id: str,
    access_key_secret: str,
    *,
    region: str = "cn-hangzhou",
) -> str:
    """Exchange AK/SK for a temporary API Key via FC platform."""
    ...

Alternatives considered

Dependencies

Test Strategy

Acceptance criteria

Verification caveat: the ⚠️ items above are covered only by unit tests that mock the FC endpoint response — they have not been exercised against the real FC endpoint. The endpoint action name (CreateApiKey) and the response field names are still pending confirmation from the FC platform team.