Client library patterns for Agent Proxy
Behind Agent Proxy, the only application-side integration work is placing a placeholder credential where your client library requires one. This page explains placeholder credentials, shows where the placeholder goes for the three common library types, and links the official SDK documentation for the services Aembit documents. For the integration procedure itself, see Integrate through Agent Proxy.
Understanding placeholder credentials
Section titled “Understanding placeholder credentials”A placeholder credential is a stand-in value used only for client library initialization. Agent Proxy intercepts authentication requests and replaces placeholder values with real, dynamically generated credentials before they reach the target Server Workload: Server Workloads represent target services, APIs, databases, or applications that receive and respond to access requests from Client Workloads.Learn more. The placeholder never reaches the target service.
Any non-empty string that satisfies your library’s validation works as a placeholder, such as
'placeholder-client-secret', 'aembit-managed', or 'dummy-value-12345'.
Libraries need a placeholder because they validate that required credential fields are present during initialization, and without a value they throw errors like:
ValueError: client_secret is requiredThe placeholder satisfies that validation while Aembit manages the actual credential.
OAuth SDK initialization
Section titled “OAuth SDK initialization”Most OAuth SDKs follow this initialization pattern:
from some_oauth_library import OAuthClient
# Initialize with placeholderclient = OAuthClient( client_id='your-client-id', client_secret='placeholder-client-secret', # ← Aembit replaces token_url='https://oauth-provider.com/token')
# Acquire token - Aembit intercepts this requesttoken = client.get_access_token(scopes=['api.read'])
# Use the token with your service's API clientapi_client.call_api(access_token=token)The placeholder goes in the client_secret parameter, and the SDK sends the token request automatically.
Aembit intercepts the POST /token request, so the SDK receives a valid access token.
API key in headers
Section titled “API key in headers”API key libraries typically set headers:
import requests
# Aembit injects API key into Authorization header automatically# Application code doesn't include the key at allresponse = requests.get( 'https://api.example.com/resource', # No Authorization header needed - Aembit adds it)The application code carries no API key, because Aembit injects the header transparently, and the application sees normal API responses.
Database connection
Section titled “Database connection”Database drivers use connection parameters:
import psycopg
# Placeholders in connection stringconnection = psycopg.connect( "host=database.example.com " "port=5432 " "dbname=mydb " "user=placeholder-username " # ← Aembit replaces "password=placeholder-password" # ← Aembit replaces)
# Use connection normallycursor = connection.cursor()cursor.execute("SELECT * FROM users")The placeholders go in the user and password parameters, and Aembit intercepts the connection request, so the
driver receives a valid connection.
Service-specific SDK resources
Section titled “Service-specific SDK resources”When integrating with your specific service, use these resources for SDK-specific guidance:
OAuth-based services
Section titled “OAuth-based services”- Entra ID (Microsoft Identity Platform) - Entra ID Server Workload guide for the Aembit configuration, with the official Microsoft Authentication Library (MSAL) for Python and MSAL for Node.js SDK documentation
- Salesforce - Salesforce Server Workload guide for the Aembit configuration, with the simple-salesforce Python SDK and JSforce Node.js SDK
- GitHub - GitHub Server Workload guide for the Aembit configuration in OAuth mode, with the official Octokit SDKs in multiple languages
API key services
Section titled “API key services”- Okta - Okta Server Workload guide for the Aembit configuration, with the official Okta Python SDK and Okta Node.js SDK
- Claude (Anthropic) - Claude Server Workload guide for the Aembit configuration, with the official Anthropic Python SDK and Anthropic TypeScript SDK
- OpenAI - OpenAI Server Workload guide for the Aembit configuration, with the official OpenAI Python library and OpenAI Node.js library
Database services
Section titled “Database services”- MySQL - AWS MySQL guide for RDS and Local MySQL guide for local or on-premises databases, with the official mysql-connector-python driver and the mysql2 Node.js driver
- PostgreSQL - AWS Postgres guide for RDS and Local Postgres guide for local or on-premises databases, with the official psycopg3 driver and the node-postgres (pg) Node.js driver
Cloud provider services
Section titled “Cloud provider services”- AWS - AWS Cloud guide for the Aembit configuration for AWS APIs, with the official Boto3 Python SDK and AWS SDK for JavaScript
Next steps
Section titled “Next steps”- Integrate through Agent Proxy - The developer-side procedure, from placeholder credential to verified request
- Test and debug your integration - Verify interception, credential delivery, and access end to end
- Server Workload guides - Service-specific configuration