> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gnani.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Environments

Environments allow teams to build, test, and prepare agents for deployment in a structured and controlled manner.

This feature is available only within Organizations and is designed to separate development, validation, and production readiness.

***

## Overview

Each agent inside an Organization has three environments:

* Development
* Staging
* Production

These environments follow a strict linear workflow:

Development → Staging → Production

Important:

* There is no version history.
* Saving changes overwrites the current state of that environment.
* Promoting to the next environment overwrites the configuration in that target environment.

Versioning and rollback capabilities are coming soon.

***

## 1. Development Environment

### Who Has Access?

* Developer
* Org Admin

### What Can Be Done Here?

Full editing capabilities are available:

* Modify system prompts
* Edit conversation flows
* Update knowledge base
* Change configurations
* Adjust integrations

This is the primary workspace where agents are built and iterated.

### Action: Promote to Staging

When you click **"Promote to Staging"**:

* The current Development configuration is copied to Staging.
* Any existing Staging configuration is overwritten.
* QA users automatically gain visibility of the agent in Staging.

This ensures QA only sees agents that are ready for testing.

***

## 2. Staging Environment

Staging is used for validation and testing before moving to Production.

### Who Has Access?

* QA
* Org Admin

### What Can Be Done Here?

QA can:

* Test conversations
* View logs
* Validate behavior

Editing is not allowed in Staging.

### Action: Mark "Ready for Production"

Available to: QA

When QA clicks **"Mark Ready for Production"**:

* The agent status changes to **Ready for Production**.

This signals that the agent has passed testing and is ready for final approval.

***

## 3. Production Environment

Production represents the finalized configuration of the agent.

### Who Has Access?

* Org Admin

### What Can Be Done Here?

* The agent handles live traffic once deployed.
* Editing is not allowed in Production.

### Action: Push to Production

Available to: Org Admin only

When **"Push to Production"** is clicked:

* The Staging configuration is copied to Production.
* Any existing Production configuration is overwritten.

This ensures that only a QA-approved configuration reaches Production.

***

## How Environment Promotion Works

Each promotion step fully replaces the target environment.

For example:

* Promoting from Development to Staging replaces everything in Staging.
* Pushing from Staging to Production replaces everything in Production.

Because there is no version history, previous configurations cannot be restored automatically.

***

## Deployment

Production represents the final approved configuration.

Deployment to live infrastructure is handled by the Gnani Agents team.

Only agents that are in the Production environment are eligible for deployment.

***

## Best Practices

* Complete all development work before promoting to Staging.
* Ensure QA thoroughly tests before marking Ready for Production.
* Confirm readiness before pushing to Production, since the action overwrites the existing configuration.

***

## Summary

The Environments feature ensures:

* Clear separation between building and testing
* Controlled approval before Production
* Reduced risk of accidental live changes
* Structured collaboration within Organizations

This workflow helps teams maintain quality, control, and clarity as agents move toward deployment.
