Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.asteroid.ai/llms.txt

Use this file to discover all available pages before exploring further.

These examples are aligned with the current SDK surfaces documented on the TypeScript SDK and Python SDK pages.
Start an execution and poll until the result is available.
import { client, agentExecutePost, executionGet } from 'asteroid-odyssey';

client.setConfig({
  headers: { 'X-Asteroid-Agents-Api-Key': process.env.ASTEROID_API_KEY! },
});

const { data, error } = await agentExecutePost({
  path: { agentId: 'your-agent-id' },
  body: {
    inputs: {
      patientName: 'Jane Doe',
      appointmentDate: '2026-03-27',
    },
    metadata: {
      source: 'cookbook-basic',
    },
  },
});

if (error) throw new Error(JSON.stringify(error));
const executionId = data.executionId;

let exec;
do {
  await new Promise((r) => setTimeout(r, 3000));
  const res = await executionGet({ path: { executionId } });
  exec = res.data;
} while (exec?.status === 'running' || exec?.status === 'starting');

console.log(exec?.status, exec?.inputs);

TypeScript SDK

See the current TypeScript helper and generated namespaces

Python SDK

See the current Python high-level client and generated subpackages