Getting started

Install SDKs

The Superagent SDKs allows you easilly create, deploy and monitor your AI Assistants in a production environment. The Python SDK supports both synchronous and asynchronous concurrency. The Javascript SDK can be run in any environment, in the browser or on the server.

Install the SDK

1
2
3
poetry add superagent-py 
# or
pip install superagent-py

Sync

1
2
3
4
5
6
7
import os 
from superagent.client import Superagent

client = Superagent(
    token=os.environ["SUPERAGENT_API_KEY"], # replace with your Superagent API
    base_url="https://api.beta.superagent.sh" # or your local environment
)

Async

1
2
3
4
5
6
7
import os
from superagent.client import AsyncSuperagent

client = AsyncSuperagent(
    token=os.environ["SUPERAGENT_API_KEY"], # replace with your Superagent API key    
    base_url="https://api.beta.superagent.sh" # or you local environment
)