Welcome to AgentBay SDK! This guide provides a step-by-step learning path for users new to cloud development.
After completing this quick start guide, you will be able to:
- Understand AgentBay's core concepts
- Create your first cloud session (both sync and async)
- Perform basic file and command operations in the cloud
- Choose between synchronous and asynchronous APIs
- Learn how to save and reuse your work
- Installation and Configuration
- Get API key
- Verify installation
- Understanding Basic Concepts
- What is a cloud session?
- Differences between sessions and local environments
- Data persistence concepts
- Create Your First Session
- Quick verification (30 seconds) - Sync & Async
- Cloud data processing example - Sync & Async
- Understanding the differences
- When to use synchronous API
- When to use asynchronous API
- Performance considerations
AgentBay provides both synchronous and asynchronous APIs. Here's a quick comparison to help you choose:
Best for:
- Learning AgentBay
- Scripts and automation
- CLI tools
- Simple, sequential tasks
Example:
from agentbay import AgentBay
agent_bay = AgentBay()
session = agent_bay.create().session
result = session.command.run("echo 'Hello'")
print(result.output)
agent_bay.delete(session)Best for:
- Web applications (FastAPI, Django async views)
- High-concurrency scenarios
- Real-time systems
- Processing multiple tasks simultaneously
Example:
import asyncio
from agentbay import AsyncAgentBay
async def main():
agent_bay = AsyncAgentBay()
session = (await agent_bay.create()).session
result = await session.command.run("echo 'Hello'")
print(result.output)
await agent_bay.delete(session)
asyncio.run(main())| Your Situation | Recommended API |
|---|---|
| Just learning AgentBay | Sync |
| Building a script or CLI tool | Sync |
| Building a web application | Async |
| Need to handle 100+ concurrent operations | Async |
| Simple automation tasks | Sync |
| Real-time data processing | Async |
- Session Management - Advanced session patterns
- File Operations - Upload, download, and manage files
- Command Execution - Run shell commands and code
- Data Persistence - Save and reuse your work
- Browser Automation - Web scraping and testing
- Mobile Testing - Android app automation
- Check out the Feature Guides to learn about complete functionality
- Explore Use Cases for practical application examples
- Join community discussions
- Start with Sync API - It's simpler and easier to understand for beginners
- Each step includes complete code examples - Both sync and async versions where applicable
- Don't worry if you don't understand everything at first - Learning takes time
- The community is here to help! - Don't hesitate to ask questions
- Try the examples yourself - Hands-on practice is the best way to learn
- Completed environment setup
- Understood basic concepts
- Created first session (sync)
- Tried async version (optional for beginners)
- Understand when to use sync vs async
- Ready to explore advanced features
Congratulations! Once you've completed these steps, you're ready to build amazing applications with AgentBay! 🎉