---
title: "API Environments"
description: "AgentSync provides multiple environments for different stages of development and testing. This guide covers environment configuration and best practices."
url: "https://internal-developer-portal.agentsync.io/api-environments"
image: "https://internal-developer-portal.agentsync.io/_og/d/c_Ocean.takumi,title_API+Environments,description_AgentSync+provides+multiple+environments+for+different+stages+of+development+and+testing.+This+guide+covers+environment+configuration+and+best+practices.,props_eyJ0aGVtZSI6eyJjb2xvcnMiOnt9fX0,p_Ii9hcGktZW52aXJvbm1lbnRzIg,s_0rKlNGTCYvNrrBkk.png"
---

# API Environments

AgentSync provides multiple environments for different stages of development and testing. This guide covers environment configuration and best practices.

## [Available Environments](#available-environments)

### [Development](#development)

**Purpose:** Feature development and early testing

| Service  | URL                                   |
| :------- | :------------------------------------ |
| API Base | https://api.dev.agentsync.io          |
| Auth     | https://auth.dev.agentsync.io         |
| Internal | https://api-internal.dev.agentsync.io |

**Characteristics:**

-   Most frequent deployments
-   May have experimental features
-   Data is regularly refreshed
-   Lower performance guarantees

### [Test](#test)

**Purpose:** Integration and regression testing

| Service  | URL                                    |
| :------- | :------------------------------------- |
| API Base | https://api.test.agentsync.io          |
| Auth     | https://auth.test.agentsync.io         |
| Internal | https://api-internal.test.agentsync.io |

**Characteristics:**

-   Stable feature set
-   Used for CI/CD integration tests
-   Data is periodically refreshed
-   Mirrors production configuration

### [Sandbox](#sandbox)

**Purpose:** User Acceptance Testing (UAT)

| Service  | URL                                       |
| :------- | :---------------------------------------- |
| API Base | https://api.sandbox.agentsync.io          |
| Auth     | https://auth.sandbox.agentsync.io         |
| Internal | https://api-internal.sandbox.agentsync.io |

**Characteristics:**

-   Production-like environment
-   Used for customer demos
-   More stable than Test
-   Data changes require approval

### [Production](#production)

**Purpose:** Live production services

| Service  | URL                               |
| :------- | :-------------------------------- |
| API Base | https://api.agentsync.io          |
| Auth     | https://auth.agentsync.io         |
| Internal | https://api-internal.agentsync.io |

**Characteristics:**

-   Highest availability guarantees
-   Strict change management
-   Real customer data
-   Full monitoring and alerting

## [Environment Selection Guide](#environment-selection-guide)

| Use Case                | Recommended Environment       |
| :---------------------- | :---------------------------- |
| Building new features   | Development                   |
| Running automated tests | Test                          |
| Customer demos          | Sandbox                       |
| Production integrations | Production                    |
| Load testing            | Test (coordinate with DevOps) |
| Security testing        | Development                   |

## [Configuration Example](#configuration-example)

### [Environment Variables](#environment-variables)

```bash
# Development
export API_BASE_URL=https://api.dev.agentsync.io
export AUTH_URL=https://auth.dev.agentsync.io/oauth/token

# Test
export API_BASE_URL=https://api.test.agentsync.io
export AUTH_URL=https://auth.test.agentsync.io/oauth/token

# Sandbox
export API_BASE_URL=https://api.sandbox.agentsync.io
export AUTH_URL=https://auth.sandbox.agentsync.io/oauth/token

# Production
export API_BASE_URL=https://api.agentsync.io
export AUTH_URL=https://auth.agentsync.io/oauth/token
```

### [Python Configuration](#python-configuration)

```python
import os

ENVIRONMENTS = {
    "development": {
        "api_base": "https://api.dev.agentsync.io",
        "auth_url": "https://auth.dev.agentsync.io/oauth/token"
    },
    "test": {
        "api_base": "https://api.test.agentsync.io",
        "auth_url": "https://auth.test.agentsync.io/oauth/token"
    },
    "sandbox": {
        "api_base": "https://api.sandbox.agentsync.io",
        "auth_url": "https://auth.sandbox.agentsync.io/oauth/token"
    },
    "production": {
        "api_base": "https://api.agentsync.io",
        "auth_url": "https://auth.agentsync.io/oauth/token"
    }
}

def get_config(env_name=None):
    env = env_name or os.getenv("AGENTSYNC_ENV", "development")
    return ENVIRONMENTS[env]
```

## [Data Considerations](#data-considerations)

### [Data Isolation](#data-isolation)

-   Each environment has isolated data
-   Test data does not affect production
-   Credentials are environment-specific

### [Data Refresh](#data-refresh)

| Environment | Refresh Schedule      |
| :---------- | :-------------------- |
| Development | Weekly (Sundays)      |
| Test        | Bi-weekly             |
| Sandbox     | Monthly or on request |
| Production  | N/A (live data)       |

## [Best Practices](#best-practices)

### [Do](#do)

-   Use environment variables for configuration
-   Test in lower environments before production
-   Use separate credentials per environment
-   Coordinate load testing with DevOps
-   Monitor your API usage across environments

### [Don't](#dont)

-   Use production credentials in development
-   Run destructive tests in Sandbox or Production
-   Assume data consistency across environments
-   Deploy directly to production without testing

## [Network Access](#network-access)

### [VPN Requirements](#vpn-requirements)

| Environment   | VPN Required |
| :------------ | :----------- |
| Development   | No           |
| Test          | No           |
| Sandbox       | No           |
| Production    | No           |
| Internal APIs | Yes          |

### [Firewall Allowlist](#firewall-allowlist)

If you need to allowlist our IPs, contact `#devops-support` for the current IP ranges.

---

**Questions about environments?** Contact `#devops-support` on Slack.