Create a new agent and define its configurations.
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"
}
API key authentication
Agent created successfully
The response is of type object
.
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"
}
Create a new agent and define its configurations.
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"
}
API key authentication
Agent created successfully
The response is of type object
.
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"
}