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

# Create Session from Agent

Create a session from an existing agent configuration.

<ParamField path="agent_id" type="string" required>
  The agent ID to create a session from
</ParamField>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.artaios.ai/api/v1/sessions/from-agent/550e8400-e29b-41d4-a716-446655440000/ \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.artaios.ai/api/v1/sessions/from-agent/550e8400-e29b-41d4-a716-446655440000/",
      headers={"x-api-key": "YOUR_API_KEY"}
  )
  session = response.json()
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.artaios.ai/api/v1/sessions/from-agent/550e8400-e29b-41d4-a716-446655440000/', {
    method: 'POST',
    headers: {
      'x-api-key': 'YOUR_API_KEY'
    }
  });
  const session = await response.json();
  ```
</CodeGroup>

## Response

```json theme={null}
{
  "success": true,
  "session_id": "session_def456",
  "agent_id": "550e8400-e29b-41d4-a716-446655440000",
  "config_hash": "a1b2c3d4e5f6"
}
```

<Note>
  This method creates a session using the current configuration of the specified agent.
</Note>
