# agentSource

```graphql
query AgentSource($input: ProjectAgentInput!) {
  agentSource(input: $input) {
    id
    name
    description
    model
    systemPrompt
    thinking
    temperature
    maxSteps
    allowedModels
    skillIds
    skillSelection {
      kind
      skillIds
    }
    skillResolution {
      policy
      skillIds
      sourcePaths
      unresolvedEntryIndexes
      catalogStatus
      evidenceScope
    }
    skills
    allToolsEnabled
    toolIds
    tools
    toolLoading
    toolResultContext
    knowledge
    providerToolIds
    suggestions
    avatar
    avatarUrl
    securityEnabled
    sourcePath
    source
    editMode
    sourceOnlyReasons
  }
}
```

Get agent source. Requires project.agents.read.

## Arguments

| Name                        | Type               | Required | Description |
| --------------------------- | ------------------ | -------- | ----------- |
| `input`                     | ProjectAgentInput! | Yes      |             |
| `input.projectReference`    | String             |          |             |
| `input.agentId`             | String!            | Yes      |             |
| `input.sourceTargetKind`    | String             |          |             |
| `input.runtimeTargetKind`   | String             |          |             |
| `input.targetEnvironmentId` | ID                 |          |             |
| `input.targetBranchId`      | ID                 |          |             |

## Variables

```json
{
  "input": {
    "agentId": "string"
  }
}
```

## Responses

| Status | Description                                    |
| ------ | ---------------------------------------------- |
| 200    | The ProjectAgentDocument! in data.agentSource. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query AgentSource($input: ProjectAgentInput!) {\n  agentSource(input: $input) {\n    id\n    name\n    description\n    model\n    systemPrompt\n    thinking\n    temperature\n    maxSteps\n    allowedModels\n    skillIds\n    skillSelection {\n      kind\n      skillIds\n    }\n    skillResolution {\n      policy\n      skillIds\n      sourcePaths\n      unresolvedEntryIndexes\n      catalogStatus\n      evidenceScope\n    }\n    skills\n    allToolsEnabled\n    toolIds\n    tools\n    toolLoading\n    toolResultContext\n    knowledge\n    providerToolIds\n    suggestions\n    avatar\n    avatarUrl\n    securityEnabled\n    sourcePath\n    source\n    editMode\n    sourceOnlyReasons\n  }\n}",
  "variables": {
    "input": {
      "agentId": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "agentSource": {
      "id": "string",
      "name": "string",
      "description": "string",
      "model": "string",
      "systemPrompt": "string",
      "thinking": {},
      "temperature": 0,
      "maxSteps": 0,
      "allowedModels": [
        "string"
      ],
      "skillIds": [
        "string"
      ],
      "skillSelection": {
        "kind": "string",
        "skillIds": [
          "string"
        ]
      },
      "skillResolution": {
        "policy": {},
        "skillIds": [
          "string"
        ],
        "sourcePaths": {},
        "unresolvedEntryIndexes": [0],
        "catalogStatus": "string",
        "evidenceScope": "string"
      },
      "skills": {},
      "allToolsEnabled": false,
      "toolIds": [
        "string"
      ],
      "tools": {},
      "toolLoading": "string",
      "toolResultContext": {},
      "knowledge": {},
      "providerToolIds": [
        "string"
      ],
      "suggestions": {},
      "avatar": {},
      "avatarUrl": "https://example.com",
      "securityEnabled": false,
      "sourcePath": "string",
      "source": "string",
      "editMode": "string",
      "sourceOnlyReasons": [
        "string"
      ]
    }
  }
}
```
