The first-party Threetone Python SDK is planned. No verified installable release has been identified.
requests is an HTTP library, and the example below calls the public REST API directly.Before you start
Use a supported Python release and a personal API key with permission to read agents. SetTHREETONE_API_KEY in the environment where your script runs. Keep it out of source files and logs.
Install the HTTP dependency:
Read a page of agents
Save this aslist_agents.py. It reads up to 20 agents through List agents.
list_agents.py
Read the next page
Whenhas_more is true, call list_agents(cursor=next_cursor) to read the next page. Continue with each newly returned cursor until has_more is false. Do not alter or construct cursor values.
page_size accepts 1 to 100 and defaults to 30 when omitted. The example uses 20. If you add filters, keep them the same while following a cursor. Use Get agent when you need one agent’s complete saved configuration.
Troubleshoot a request
For401, check the key and its expiry. For 403, check its permissions and workspace access. For 429, follow Retry-After when supplied. See Errors and retries before adding automatic retries.
The error context includes the method, path, status, and an escaped request ID limited to 128 characters. It excludes the key and response body. A connection failure or timeout may have no response status or request ID.
Frequently asked questions
Is requests the Threetone SDK?
Is requests the Threetone SDK?
No. It is a general-purpose Python HTTP library. The Threetone Python SDK is planned, and no first-party package name is documented for installation yet.
Does this example create or change an agent?
Does this example create or change an agent?
No. It sends a GET request and reads existing records. A successful read does not start a conversation or verify execution availability.
Why is my agent list empty?
Why is my agent list empty?
Confirm that the key belongs to the intended workspace and can access its agents. The list excludes archived agents by default. Check the filters in List agents.