---
orphan: true
---

# Query system agent configuration

Query the configuration of the specified system agent in the workspace.

```text
GET https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/system-agent-setups/{agent_id}
```

## Before you call

The example below uses `$AI_STUDIO_API_KEY` (personal access token), `$WORKSPACE_ID` (workspace ID), and `$AGENT_ID` (system agent ID).

## Request example

```bash
curl "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/system-agent-setups/$AGENT_ID" -H "X-API-Key: $AI_STUDIO_API_KEY" -H "X-Workspace-ID: $WORKSPACE_ID"
```

## Successful response

Returns `200` and system agent configuration on success.

```json
{"code":0,"data":{"agent_id":"agent_01"}}
```

The response fields are as follows.

| Field | Type | Description |
| --- | --- | --- |
| `data.agent_id` | string | System agent ID. |

## Error response

```json
{"code":5,"message":"not found"}
```
