Skip to main content
This page contains practical examples for the Asteroid Odyssey TypeScript and Python SDKs.
Execute an agent and wait for the result in the simplest way possible.
import { AsteroidClient, executeAgent, waitForExecutionResult } from 'asteroid-odyssey';

async function basicExample() {
  const client = AsteroidClient('YOUR_API_KEY');

  const executionId = await executeAgent(client, 'YOUR_AGENT_ID', {
    dynamic_data: {
      DATA: "First name: John, Last name: Smith"
    },
    agent_profile_id: 'YOUR_AGENT_PROFILE_ID'
  });

  const result = await waitForExecutionResult(client, executionId);
  console.log('Result:', result);
}

basicExample().catch(console.error);
These examples cover the most common patterns you’ll need when working with the Asteroid Odyssey TypeScript and Python SDKs.