# Coded agents in Studio Web

> :::note
Coded agents in Studio Web is in Preview.
:::

:::note
Coded agents in Studio Web is in Preview.
:::

Coded agents let you define agent behavior directly in Python while still benefiting from UiPath orchestration, evaluation, and observability. Studio Web acts as the control plane, while your Integrated Development Environment (IDE) remains the primary development environment.

After connecting your local project, Studio Web provides access to:

- **Definition** — A high-level view of the agent entry points and configuration.
- **Source code** — A read-only view of synced files. Your IDE remains the authoritative source.
- **Evaluation sets** — Test cases for validating agent behavior.
- **Evaluators** — Output- and trajectory-based evaluators used during evaluation runs.

From Studio Web you can run **Debug** or **Debug step-by-step**, execute evaluations in the [Evaluations](https://docs.uipath.com/agents/automation-suite/2.2510/user-guide/agent-evaluations) space, and publish the agent for production use. Published agents emit traces visible in the [Agent traces](https://docs.uipath.com/agents/automation-suite/2.2510/user-guide/agent-traces) space and can be managed from the [Managing UiPath agents](https://docs.uipath.com/agents/automation-suite/2.2510latest/user-guide/managing-uipath-agents) page.

## Prerequisites

- You have Python 3.11 or higher and either `pip` or `uv` installed.
- You have created, initialized, and tested your coded agent project locally. Follow the quick start guide for your framework:
  - [Core Python SDK](https://uipath.github.io/uipath-python/core/getting_started/)
  - [LangChain (LangGraph)](https://uipath.github.io/uipath-python/langchain/quick_start/)
  - [LlamaIndex](https://uipath.github.io/uipath-python/llamaindex/quick_start/)
  - [OpenAI Agents](https://uipath.github.io/uipath-python/openai-agents/quick_start/)
- You have access to Studio Web with a solution open or ready to create.

## Create a coded agent in Studio Web

1. Go to [studio.uipath.com](https://studio.uipath.com).
2. Select **Create New**, then select **Agent**.
3. Select **Coded** as the agent type.

**Result:** Studio Web creates a coded agent shell and opens the **Setup your coded agent** page.

## Connect your local project to Studio Web

On the **Setup your coded agent** page, Studio Web guides you through linking your local Python project to the agent.

### Copy the project key

1. On the **Setup your coded agent** page, copy the **Agent project** key. Studio Web generates this key automatically for each solution project.
2. In your local project, open the `.env` file.
3. Add the following line, replacing `<project-id-from-studio>` with the key you copied:

    ```ini
    UIPATH_PROJECT_ID=<project-id-from-studio>
    ```

This key links your local project to the agent in Studio Web.

### Push your project to Studio Web

1. Open a terminal in your local project directory.
2. Run the following command:

    ```bash
    uipath push
    ```

**Result:** Studio Web syncs the following files from your local project and automatically loads the coded agent content:

- Source files (for example, `graph.py`, `entry-points.json`)
- Configuration files (`pyproject.toml`, `uipath.json`)
- Evaluation assets (evaluators, evaluation sets)
- Metadata and bindings
