If you’d prefer to run one of our example agents, please see Cookbook

1

Install dependencies

Install the asteroid-sdk Python SDK:

pip install asteroid-sdk
2

Generate an API key

Sign in to https://platform.asteroid.ai, head to API Keys and generate a new key.

  export ASTEROID_API_KEY="ast..."

See API Keys for more.

3

Initialise Asteroid

Before your agent starts running, you need to initialise Asteroid:

run_id = asteroid_init(
  project_name="My Project",
  task_name="Booking Assistant",
)

See more about initialisation here.

4

Wrap your LLM client

After initialising Asteroid, you need to wrap your LLM client; simply initialise your normal LLM client, then use Asteroid’s provided wrappers:

  client = OpenAI()
  wrapped_client = asteroid_openai_client(client, run_id)

Find out more about the @supervise decorator here, and which supervisors are possible here.

5

Monitor and control agent via the platform

Inspect the agents execution and respond to any human review requests in the interface.

Navigate to https://platform.asteroid.ai and click Projects —> Tasks —> Runs and click on the latest run.

6

See more examples

Check out a full worked example in Full Example.

Or if you’d prefer to see different examples, please see Cookbook.