Catalog PyPI
Back to packageRELEASE DETAILS

0.2.4

PyPI

abundant-sdk

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

apiautomationreinforcement-learningsalesforcesimulation
Published7 Aug 2025
Direct dependencies10
Transitive dependenciesNot calculated

README

Version 0.2.4 documentation

Simulation Environment API

FastAPI-based API service for managing simulation environments for RL agent training. Currently supports Salesforce scratch orgs with browser automation via Browserbase.

Production API: https://api.abundant.systems/

Overview

This API provides:

  • Isolated browser instances of simulated websites
  • Direct CDP access for agent control
  • Clean separation between simulated environment and test harness controls
  • Realistic environment URLs

V1 API Endpoints

Environment Discovery

  • GET /v1/environments - List available simulation environments

Instance Lifecycle

  • POST /v1/instances - Create new environment instance
  • GET /v1/instances/{id} - Get instance details with CDP URL
  • DELETE /v1/instances/{id} - Terminate instance

Control Operations

  • POST /v1/instances/{id}/reset - Reset instance to clean state
  • POST /v1/instances/{id}/verify - Run verification function
  • GET /v1/instances/{id}/state - Get current state

TODO

High Priority

  • Implement Salesforce-specific verification functions

Medium Priority

  • Update authentication to support Bearer token format
  • Create Python client SDK

Low Priority

  • Remove or deprecate old /salesforce endpoints
  • Add WebSocket support for real-time state updates
  • Multi-region support

Installation

uv sync

This will install all dependencies including the Foundry SDK from Test PyPI.

Usage

  1. Set up environment variables in .env:

    API_SECRET_KEY=your_secret_key
    FOUNDRY_API_KEY=your_foundry_api_key
    BROWSERBASE_API_KEY=your_browserbase_api_key
    BROWSERBASE_PROJECT_ID=your_browserbase_project_id
    
  2. Run the server:

    uv run simulation-env-api
    

    Customize server settings in src/simulation_env_api/uvicorn_config.py if needed.

  3. Access docs at http://localhost:8000/docs

Example Usage

List available environments

curl -X GET "http://localhost:8000/v1/environments"

Create an instance

curl -X POST "http://localhost:8000/v1/instances" \
     -H "x-api-key: your_secret_key" \
     -H "Content-Type: application/json" \
     -d '{"environment": "salesforce_sales"}'

Get instance details (includes CDP URL)

curl -X GET "http://localhost:8000/v1/instances/{instance_id}" \
     -H "x-api-key: your_secret_key"

Reset instance

curl -X POST "http://localhost:8000/v1/instances/{instance_id}/reset" \
     -H "x-api-key: your_secret_key"

Python SDK

A Python SDK is included for easier integration:

import asyncio
from abundant_sdk import Client

async def main():
    async with Client(api_key="your_secret_key") as client:
        # Create and use an instance
        instance = await client.create_instance("salesforce_sales")
        print(f"CDP URL: {instance.cdp_url}")

        # Verify task completion
        result = await instance.verify("opportunity_created")

        # Clean up
        await instance.terminate()

asyncio.run(main())

See examples/ directory for more detailed examples.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 10

Native requirements
10 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
httpx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
httpx>=0.27.2runtime
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
pydantic>=2.0.0runtime
black
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
black>=24.10.0; extra == "dev"runtime
mypy
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
mypy>=1.13.0; extra == "dev"runtime
pre-commit
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
pre-commit>=4.2.0; extra == "dev"runtime
pytest-asyncio
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
pytest-asyncio>=0.24.0; extra == "dev"runtime
pytest-cov
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
pytest-cov>=6.0.0; extra == "dev"runtime
pytest-mock
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
pytest-mock>=3.14.0; extra == "dev"runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
pytest>=8.3.3; extra == "dev"runtime
ruff
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
ruff>=0.7.0; extra == "dev"runtime

Distribution files

2 collected
abundant_sdk-0.2.4-py3-none-any.whl

bdist_wheel · 13.87 KB · Python py3

Source file
abundant_sdk-0.2.4.tar.gz

sdist · 11.9 KB · Python source

Source file

Repository

PENDING
your-org/simulation-env-api

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:46 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:62fc00774732a280eea0c6441c029fc2afd5f607bd6b00fcdfbffcf4ac364b5b

Other collected versions

View all collected versions →