# installAgentForProjects

```graphql
mutation InstallAgentForProjects($input: InstallProjectAgentForSelectedProjectsInput!) {
  installAgentForProjects(input: $input) {
    avatarUrl
    id
    name
    description
    provider
    version
    capabilities
    defaultInputModes
    defaultOutputModes
    tools
    skills
    suggestions
    model
    url
    kind
    canRun
    sourceType
    installedAccess
    runtimeReadiness
    sourcePath
    editMode
  }
}
```

Install agent in projects. Requires project.agents.write.

## Arguments

| Name                              | Type                                         | Required | Description                                                                                                              |
| --------------------------------- | -------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
| `input`                           | InstallProjectAgentForSelectedProjectsInput! | Yes      |                                                                                                                          |
| `input.selectedProjectReferences` | \[String!]!                                  | Yes      |                                                                                                                          |
| `input.agentId`                   | String!                                      | Yes      |                                                                                                                          |
| `input.relation`                  | String                                       |          | Relation of each agent access grant. The selection expands into one explicit grant per project; the agent is not copied. |

## Variables

```json
{
  "input": {
    "selectedProjectReferences": [
      "string"
    ],
    "agentId": "string"
  }
}
```

## Responses

| Status | Description                                                |
| ------ | ---------------------------------------------------------- |
| 200    | The \[ProjectAgentCard!]! in data.installAgentForProjects. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "mutation InstallAgentForProjects($input: InstallProjectAgentForSelectedProjectsInput!) {\n  installAgentForProjects(input: $input) {\n    avatarUrl\n    id\n    name\n    description\n    provider\n    version\n    capabilities\n    defaultInputModes\n    defaultOutputModes\n    tools\n    skills\n    suggestions\n    model\n    url\n    kind\n    canRun\n    sourceType\n    installedAccess\n    runtimeReadiness\n    sourcePath\n    editMode\n  }\n}",
  "variables": {
    "input": {
      "selectedProjectReferences": [
        "string"
      ],
      "agentId": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "installAgentForProjects": [
      {
        "avatarUrl": "https://example.com",
        "id": "string",
        "name": "string",
        "description": "string",
        "provider": {},
        "version": "string",
        "capabilities": {},
        "defaultInputModes": [
          "string"
        ],
        "defaultOutputModes": [
          "string"
        ],
        "tools": [
          "string"
        ],
        "skills": [
          {}
        ],
        "suggestions": {},
        "model": "string",
        "url": "https://example.com",
        "kind": "string",
        "canRun": false,
        "sourceType": "string",
        "installedAccess": {},
        "runtimeReadiness": {},
        "sourcePath": "string",
        "editMode": "string"
      }
    ]
  }
}
```
