{
  "name": "Autonomous Agent - Configure Custom Model Capability",
  "nodes": [
    {
      "parameters": {},
      "id": "11111111-1111-4111-8111-111111111111",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        220,
        300
      ]
    },
    {
      "parameters": {
        "operation": "pull",
        "model": "qwen2.5-coder:7b",
        "insecure": false
      },
      "id": "22222222-2222-4222-8222-222222222222",
      "name": "Pull Model",
      "type": "n8n-autonomous-agent-nodes.autonomousAgentLlmModel",
      "typeVersion": 1,
      "position": [
        460,
        300
      ],
      "credentials": {
        "autonomousAgentApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "create",
        "name": "coding",
        "model": "qwen2.5-coder:7b",
        "provider": "ollama",
        "inputModalities": [
          "text"
        ],
        "maximumInputCharacters": 100000,
        "maximumOutputTokens": 4096,
        "maximumCostUnits": 10000,
        "allowedPurposes": "coding,refactoring",
        "includeDimensions": false
      },
      "id": "33333333-3333-4333-8333-333333333333",
      "name": "Create Model Policy",
      "type": "n8n-autonomous-agent-nodes.autonomousAgentModelPolicy",
      "typeVersion": 1,
      "position": [
        720,
        300
      ],
      "credentials": {
        "autonomousAgentApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "create",
        "name": "custom-code-generation",
        "description": "Generate or refactor source code.",
        "agent": "model-agent",
        "agentVersion": "1.0.0",
        "agentType": "model",
        "modelPolicy": "coding",
        "modelPurpose": "coding",
        "inputModalities": [
          "text"
        ],
        "inputSchema": "{\n  \"type\": \"object\",\n  \"required\": [\"task\"],\n  \"properties\": {\"task\": {\"type\": \"string\"}}\n}",
        "outputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\"code\": {\"type\": \"string\"}}\n}",
        "sideEffect": "none",
        "approvalRequired": false,
        "enabled": true,
        "priority": 100,
        "timeoutSeconds": 120,
        "maximumConcurrency": 1,
        "tenantAllowlist": "",
        "requiredRoles": ""
      },
      "id": "44444444-4444-4444-8444-444444444444",
      "name": "Create Capability",
      "type": "n8n-autonomous-agent-nodes.autonomousAgentCapability",
      "typeVersion": 1,
      "position": [
        980,
        300
      ],
      "credentials": {
        "autonomousAgentApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Pull Model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pull Model": {
      "main": [
        [
          {
            "node": "Create Model Policy",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Model Policy": {
      "main": [
        [
          {
            "node": "Create Capability",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "55555555-5555-4555-8555-555555555555",
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}