> Source: https://wexa.ai/docs/agents/get-agent

# get-agent

Read one agent from the project's agent registry: its title, role, description, model, skills, context tags and knowledge-base setting. Needs the `fabric:orchestrate.read` grant.

**Read an agent**

**Wexa MCP server**

```bash
curl -sS -X POST https://fabric.wexa.ai/mcp/$FABRIC_PROJECT_ID \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "Mcp-Session-Id: $MCP_SESSION_ID" \
  -H "content-type: application/json" -H "accept: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"get-agent","arguments":{"agent_id":"6ab1945e7566f41b5c28e303.6ab1945e83ff5845d7db96bc"}}}'
```

```json
{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000175\",\"result\":{\"agent_id\":\"6ab1945e7566f41b5c28e303.6ab1945e83ff5845d7db96bc\",\"title\":\"docs-fixture-agent\",\"role\":\"tester\",\"description\":\"A stable agent the documentation cites.\",\"model\":\"system_model\",\"skills\":[],\"has_knowledge_base\":false}}"
    }
  ],
  "isError": false
}
```

**REST API**

```bash
curl -sS https://fabric.wexa.ai/v1/get-agent \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "content-type: application/json" \
  -d '{"agent_id":"6ab1945e7566f41b5c28e303.6ab1945e83ff5845d7db96bc"}'
```

```json
{
  "lifecycle_id": "qlc_000175",
  "result": {
    "agent_id": "6ab1945e7566f41b5c28e303.6ab1945e83ff5845d7db96bc",
    "title": "docs-fixture-agent",
    "role": "tester",
    "description": "A stable agent the documentation cites.",
    "model": "system_model",
    "skills": [],
    "has_knowledge_base": false
  }
}
```

**TypeScript SDK**

```ts
import { Fabric } from '@wexa-fabric/sdk'

const fabric = new Fabric()
const result = await fabric.getAgent({
  agent_id: '6ab1945e7566f41b5c28e303.6ab1945e83ff5845d7db96bc'
})
```

```ts
// result is the payload itself, with no `.result` to read
{
  agent_id: '6ab1945e7566f41b5c28e303.6ab1945e83ff5845d7db96bc',
  title: 'docs-fixture-agent',
  role: 'tester',
  description: 'A stable agent the documentation cites.',
  model: 'system_model',
  skills: [],
  has_knowledge_base: false
}
```

**Python SDK**

```python
from wexa import Fabric

fabric = Fabric()
out = fabric.get_agent(
    agent_id="6ab1945e7566f41b5c28e303.6ab1945e83ff5845d7db96bc",
)
```

```python
# out is the result, already unwrapped
{
    "agent_id": "6ab1945e7566f41b5c28e303.6ab1945e83ff5845d7db96bc",
    "title": "docs-fixture-agent",
    "role": "tester",
    "description": "A stable agent the documentation cites.",
    "model": "system_model",
    "skills": [],
    "has_knowledge_base": False
}
```

## Parameters

| Parameter | Type | Required | Notes |
| --- | --- | --- | --- |
| `agent_id` | string | Required | The id `list-agents` and `create-agent` return, which is also the id the console shows in its URL. An agent in this project. |

**Show full response**

A real response, captured from a live call to `get-agent`:

**Result of get-agent**

**REST API**

```json
{
  "lifecycle_id": "qlc_000175",
  "result": {
    "agent_id": "6ab1945e7566f41b5c28e303.6ab1945e83ff5845d7db96bc",
    "context": [],
    "description": "A stable agent the documentation cites.",
    "has_knowledge_base": false,
    "is_promoted": false,
    "model": "system_model",
    "prompt": {
      "display_template": "Reply with READY.",
      "template": "Reply with READY.",
      "variables": []
    },
    "role": "tester",
    "role_description": "A stable agent the documentation cites.",
    "skills": [],
    "title": "docs-fixture-agent",
    "triggers": []
  }
}
```

**Wexa MCP server**

```json
{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000175\",\"result\":{\"agent_id\":\"6ab1945e7566f41b5c28e303.6ab1945e83ff5845d7db96bc\",\"context\":[],\"description\":\"A stable agent the documentation cites.\",\"has_knowledge_base\":false,\"is_promoted\":false,\"model\":\"system_model\",\"prompt\":{\"display_template\":\"Reply with READY.\",\"template\":\"Reply with READY.\",\"variables\":[]},\"role\":\"tester\",\"role_description\":\"A stable agent the documentation cites.\",\"skills\":[],\"title\":\"docs-fixture-agent\",\"triggers\":[]}}"
    }
  ],
  "isError": false
}
```

**TypeScript SDK**

```ts
// the object you get back IS the result — there is no `.result` to read
{
  agent_id: '6ab1945e7566f41b5c28e303.6ab1945e83ff5845d7db96bc',
  context: [],
  description: 'A stable agent the documentation cites.',
  has_knowledge_base: false,
  is_promoted: false,
  model: 'system_model',
  prompt: {
    display_template: 'Reply with READY.',
    template: 'Reply with READY.',
    variables: []
  },
  role: 'tester',
  role_description: 'A stable agent the documentation cites.',
  skills: [],
  title: 'docs-fixture-agent',
  triggers: []
}

// The TS SDK names these camelCase — lifecycleId, traceId — where Python uses
// lifecycle_id and trace_id. Both are non-enumerable: readable, but omitted by
// Object.keys() and JSON.stringify(). `result.lifecycleId` here is undefined.
result.lifecycleId // 'qlc_000175'
```

**Python SDK**

```python
# a dict subclass; `result` is already unwrapped
{
 "agent_id": "6ab1945e7566f41b5c28e303.6ab1945e83ff5845d7db96bc",
 "context": [],
 "description": "A stable agent the documentation cites.",
 "has_knowledge_base": False,
 "is_promoted": False,
 "model": "system_model",
 "prompt": {
  "display_template": "Reply with READY.",
  "template": "Reply with READY.",
  "variables": []
 },
 "role": "tester",
 "role_description": "A stable agent the documentation cites.",
 "skills": [],
 "title": "docs-fixture-agent",
 "triggers": []
}

out.lifecycle_id  # 'qlc_000175' — an attribute, not a key
```

**More details**

For a multi-agent process flow use [get-process-flow](/docs/automation/get-process-flow) instead.

Every tool call works the same way: [How every tool call works](/docs/sdks-and-apis/how-every-tool-call-works).
