VirtuousAI
Reference

Agent specs

List Specs

GET
/api/v1/agents/specs

Query Parameters

limit?integer
Default100
Range1 <= value <= 100
offset?integer
Default0
Range0 <= value
mode?|

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/agents/specs"
{
  "specs": [
    {
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
      "description": "string",
      "frontmatter": {},
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "markdown": "string",
      "mode": "string",
      "name": "string",
      "resourcePreview": [
        {}
      ],
      "resources": [
        {
          "agentSpecId": "d6712993-8587-454e-b8bf-05ae5d316c13",
          "createdAt": "2019-08-24T14:15:22Z",
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "metadata": {},
          "resourceType": "url",
          "source": "frontmatter",
          "updatedAt": "2019-08-24T14:15:22Z",
          "value": "string"
        }
      ],
      "slug": "string",
      "updatedAt": "2019-08-24T14:15:22Z",
      "updatedBy": "b0efe45f-0520-4e21-90f0-7e35f137732e"
    }
  ],
  "total": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Create Spec

POST
/api/v1/agents/specs

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

markdown*string

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/agents/specs" \  -H "Content-Type: application/json" \  -d '{    "markdown": "string"  }'
{
  "createdAt": "2019-08-24T14:15:22Z",
  "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
  "description": "string",
  "frontmatter": {},
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "markdown": "string",
  "mode": "string",
  "name": "string",
  "resourcePreview": [
    {}
  ],
  "resources": [
    {
      "agentSpecId": "d6712993-8587-454e-b8bf-05ae5d316c13",
      "createdAt": "2019-08-24T14:15:22Z",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "metadata": {},
      "resourceType": "url",
      "source": "frontmatter",
      "updatedAt": "2019-08-24T14:15:22Z",
      "value": "string"
    }
  ],
  "slug": "string",
  "updatedAt": "2019-08-24T14:15:22Z",
  "updatedBy": "b0efe45f-0520-4e21-90f0-7e35f137732e"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Spec

GET
/api/v1/agents/specs/{spec_id}

Path Parameters

spec_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/agents/specs/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "createdAt": "2019-08-24T14:15:22Z",
  "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
  "description": "string",
  "frontmatter": {},
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "markdown": "string",
  "mode": "string",
  "name": "string",
  "resourcePreview": [
    {}
  ],
  "resources": [
    {
      "agentSpecId": "d6712993-8587-454e-b8bf-05ae5d316c13",
      "createdAt": "2019-08-24T14:15:22Z",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "metadata": {},
      "resourceType": "url",
      "source": "frontmatter",
      "updatedAt": "2019-08-24T14:15:22Z",
      "value": "string"
    }
  ],
  "slug": "string",
  "updatedAt": "2019-08-24T14:15:22Z",
  "updatedBy": "b0efe45f-0520-4e21-90f0-7e35f137732e"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Update Spec

PATCH
/api/v1/agents/specs/{spec_id}

Path Parameters

spec_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

markdown*string

Response Body

application/json

application/json

curl -X PATCH "https://loading/api/v1/agents/specs/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "markdown": "string"  }'
{
  "createdAt": "2019-08-24T14:15:22Z",
  "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
  "description": "string",
  "frontmatter": {},
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "markdown": "string",
  "mode": "string",
  "name": "string",
  "resourcePreview": [
    {}
  ],
  "resources": [
    {
      "agentSpecId": "d6712993-8587-454e-b8bf-05ae5d316c13",
      "createdAt": "2019-08-24T14:15:22Z",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "metadata": {},
      "resourceType": "url",
      "source": "frontmatter",
      "updatedAt": "2019-08-24T14:15:22Z",
      "value": "string"
    }
  ],
  "slug": "string",
  "updatedAt": "2019-08-24T14:15:22Z",
  "updatedBy": "b0efe45f-0520-4e21-90f0-7e35f137732e"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Delete Spec

DELETE
/api/v1/agents/specs/{spec_id}

Path Parameters

spec_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

curl -X DELETE "https://loading/api/v1/agents/specs/497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Execute Spec

POST
/api/v1/agents/specs/{spec_id}/execute

Path Parameters

spec_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/agents/specs/497f6eca-6276-4993-bfeb-53cbbbba6f08/execute"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

List Runs

GET
/api/v1/agents/specs/{spec_id}/runs

Path Parameters

spec_id*string
Formatuuid

Query Parameters

limit?integer
Default100
Range1 <= value <= 100
offset?integer
Default0
Range0 <= value

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/agents/specs/497f6eca-6276-4993-bfeb-53cbbbba6f08/runs"
{
  "runs": [
    {
      "agentSpecId": "d6712993-8587-454e-b8bf-05ae5d316c13",
      "completedAt": "2019-08-24T14:15:22Z",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
      "decisionId": "caa985ad-f12f-4ef1-943f-c1812738ec7a",
      "error": {},
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "input": {},
      "result": {},
      "startedAt": "2019-08-24T14:15:22Z",
      "status": "pending",
      "triggerMethod": "string",
      "triggerSourceId": "bee4343e-fed3-4af5-b3cb-ae72c692f618",
      "triggerSourceType": "string",
      "updatedAt": "2019-08-24T14:15:22Z",
      "updatedBy": "b0efe45f-0520-4e21-90f0-7e35f137732e"
    }
  ],
  "total": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Spec Stats

GET
/api/v1/agents/specs/{spec_id}/stats

Path Parameters

spec_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/agents/specs/497f6eca-6276-4993-bfeb-53cbbbba6f08/stats"
{
  "avgDurationSeconds": 0,
  "cancelledRuns": 0,
  "completedRuns": 0,
  "crystallizationCount": 0,
  "failedRuns": 0,
  "negativeFeedback": 0,
  "positiveFeedback": 0,
  "successRate": 0,
  "totalFeedback": 0,
  "totalRuns": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}