Skip to main content
The Trelent SDK authenticates with a client ID and secret. The SDK exchanges them for short-lived access tokens automatically on each request.

Get credentials

Ask your Trelent admin for a client ID and secret, then pass them to the Client:

Environment variables

You can also read credentials from the environment:

Custom API URL

Client defaults to https://agents.trelent.com. Override it when pointing at a different environment:

How it works

  • The SDK calls POST /token on the API with your credentials and the scope needed for the request (e.g. AgentOrchestrator:runs:create).
  • Tokens are short-lived and cached per scope for the lifetime of the Client.
  • If a narrow scope is rejected, the SDK transparently retries with a broader one (AgentOrchestrator:runs:*, then AgentOrchestrator:*).
You generally do not need to think about scopes — the SDK picks the right one per call.