Skip to main content
POST
/
agent
Create Agent
curl --request POST \
  --url https://{api-address}.org.machina.gg/agent \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '{
  "name": "my-new-agent",
  "title": "My New Agent",
  "description": "Your agent description",
  "context": {
    "config-frequency": 0.04
  },
  "workflows": [
    {
      "name": "sync-nba-embeds",
      "description": "sync-nba-embeds",
      "inputs": {
        "event_code": "$.get('\''event_code'\'') or None"
      },
      "outputs": {
        "sync-nba-embeds-status": "$.get('\''workflow-status'\'', False)"
      }
    }
  ],
  "status": "inactive"
}'
{
  "data": {
    "id": "67db52c32ae92018b93310a1"
  },
  "meta": {
    "code": 200
  },
  "status": "success"
}

Authorizations

x-api-token
string
header
required

Body

application/json
name
string
required
title
string
required
description
string
required
context
object
workflows
object[]
status
enum<string>
default:active
Available options:
active,
inactive

Response

data
object
meta
object
status
enum<string>
Available options:
success
Example: