1

Installation

npm install asteroid-odyssey typescript ts-node
2

Create your TypeScript file (run_agent.ts)

import { 
  AsteroidClient, 
  executeAgent,
  waitForExecutionResult 
} from 'asteroid-odyssey';

// Create client and execute agent
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'
});

// Wait for result
const result = await waitForExecutionResult(client, executionId);
console.log(result);
3

Run the agent

Replace your API key, your agent_id, and update the dynamic_data with your agent’s variables (or remove if no variables), then run:
npx ts-node run_agent.ts
Agent Creation: Agents can only be created through the Asteroid Platform web interface. The API is designed for executing existing agents, not creating them.

Method Reference

MethodPurposeReturns
executeAgent()Start agent executionexecution_id
waitForExecutionResult()Wait for completionresult
getExecutionStatus()Check current statusstatus_info
getExecutionResult()Get final resultresult
uploadExecutionFiles()Upload filesupload_response
getBrowserSessionRecording()Get recording URLurl
getCredentialsPublicKey()Get encryption public keypublic_key
getAgentProfiles()List agent profilesprofiles
getAgentProfile()Get specific profileprofile
createAgentProfile()Create new profileprofile
updateAgentProfile()Update existing profileprofile
deleteAgentProfile()Delete profilesuccess_message
getLastNExecutionActivities()Get execution activitiesactivities
addMessageToExecution()Add message to executionvoid

Core Methods

Agent Profiles