arena-physica-atlas (atlas_sdk). TypeScript package: @arena-physica/atlas. Your Arena Physica point of contact will get you set up.
Get credentials
The default is M2M: a client ID and client secret. Ask your Arena Physica point of contact for credentials for your Atlas environment. You will be asked to provide the user groups those credentials can access. Treat the client secret like a password. Keep it in server-side env or a secret store — not in git, and not in a browser or mobile app. A Bearer token (token / api_key) is also supported. Do not set a token and M2M credentials together.
Authenticate
If you omit constructor credentials, the SDK reads those env vars. Explicit arguments win over env.
M2M credentials are exchanged for an access token (
/desktop-config, then Auth0 client_credentials). The client secret is never sent as a Bearer token.
Create a client
base_url / baseUrl can be a host (your-atlas-domain) or a full URL. The SDK adds https:// and /api/v1 only when you omit them. Any other path is kept.
Python
TypeScript
send_message / sendMessage returns immediately with a message_id. Completion arrives on the stream as run.completed or run.failed.
Bearer token
Use this instead of M2M when you already have a user access token. Do not passtoken / apiKey together with client_id / clientId.
Operations
Python usessnake_case. TypeScript uses camelCase.
create takes no arguments. send_message / sendMessage takes the message text.
Events
Every event includessession_id and message_id.
Ignore unknown event types so later additions do not break your client.
Env-only configuration
Errors
Missing or mixed credentials raiseAtlasAuthError (token and M2M together, or only one of client id / secret).
HTTP failures raise from the underlying client (httpx in Python; Error in TypeScript).