UNPKG

test-wuying-agentbay-sdk

Version:

TypeScript SDK for interacting with the Wuying AgentBay cloud runtime environment

29 lines (20 loc) 826 B
# Session Creation and Management Example This example demonstrates how to create, list, and delete sessions using the Wuying AgentBay SDK. It covers: - Initializing the AgentBay client - Creating a session with default parameters - Listing all available sessions - Creating multiple sessions - Deleting sessions - Verifying session deletion This example is useful for understanding the session lifecycle and how to manage multiple sessions. ## Running the Example ```bash cd session-creation npx ts-node session-creation.ts ``` Make sure you have set the `AGENTBAY_API_KEY` environment variable or replace the placeholder in the code with your actual API key. ## Prerequisites - Node.js installed - TypeScript installed - ts-node installed (`npm install -g ts-node`) - Required dependencies installed (`npm install`)