# Abundant SDK

Python SDK for the Abundant Environment API - simulation environments for RL agent training.

## Installation

```bash
pip install abundant-sdk
```

## Features

- **Task System**: Bind tasks to instances and verify completion
- **Enhanced Instance Management**: List, filter, and manage instances
- **SOQL Integration**: Execute Salesforce Object Query Language queries
- **Data Export**: Export data from Salesforce objects
- **State Tracking**: Monitor current page, user, and data mutations
- **Async/await support**: Full async/await support with context managers
- **Type hints and Pydantic models**: Strong typing throughout
- **Browser Automation**: Integration with Playwright for browser automation

## API Reference

### Client Methods

- `list_environments()` - List available simulation environments
- `list_instances()` - List instances with optional filtering
- `list_tasks()` - List available tasks for environments
- `create_instance()` - Create new instance with optional task binding
- `get_instance()` - Get existing instance by ID

### Instance Methods

- `bind_task()` - Bind a task to the instance
- `verify()` - Verify the bound task with optional answer
- `get_state()` - Get current instance state
- `reset()` - Reset instance to clean state
- `execute_soql_query()` - Execute SOQL query
- `export_data()` - Export data from Salesforce objects
- `list_objects()` - List available Salesforce objects
- `terminate()` - Terminate the instance

## Examples

See the [examples directory](https://github.com/your-org/simulation-env-api/tree/main/examples) for more detailed examples including RL training loops and task-based workflows.

## Development

For development setup:

```bash
git clone https://github.com/your-org/simulation-env-api.git
cd simulation-env-api
pip install -e ".[dev]"
```

## License

Apache License - see [LICENSE](LICENSE) file for details.

## Version History

### v0.2.0
- Added comprehensive task system with binding and verification
- Enhanced instance management with filtering and listing
- Added SOQL query execution and data export capabilities
- Improved state tracking with detailed page and user information
- Updated all examples to use new task-based workflows

### v0.1.0
- Initial release with basic client functionality
- Support for environment listing and instance management
- Basic verification and state tracking
