Skip to main content
POST
/
v1
/
agent-npc
Register a spawn event for an agent NPC
curl --request POST \
  --url https://api.pixocracy.io/v1/agent-npc \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "instanceIdentifier": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "type": "natural",
  "parentIdentifiers": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "deletedAt": "2023-11-07T05:31:56Z",
  "agentNpc": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "deletedAt": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "instance": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "deletedAt": "2023-11-07T05:31:56Z",
      "application": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "deletedAt": "2023-11-07T05:31:56Z",
        "name": "<string>",
        "description": "<string>",
        "instances": [
          "<any>"
        ],
        "twitchUsername": "<string>",
        "featuredInstance": {}
      },
      "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "taxRate": 123,
      "collectedTaxes": 123,
      "npcs": [],
      "agentNpcs": []
    },
    "agent": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "deletedAt": "2023-11-07T05:31:56Z",
      "name": "<string>",
      "endpoint": "<string>",
      "hostType": "self_hosted",
      "lastHealthCheck": "2023-11-07T05:31:56Z",
      "healthy": true,
      "claimedInstances": []
    },
    "wealth": 0,
    "mood": 100,
    "parents": []
  },
  "type": "natural"
}
Billable Resource
Register a new Agent NPC spawn event in your instance. Agent NPCs are AI-powered characters that can interact with each other and with the game world, creating dynamic and emergent gameplay experiences. You can specify the spawn type (natural, breeding, or manual) and provide parent identifiers for breeding events. Each Agent NPC is assigned to an AI agent that determines their behavior and personality.

Authorizations

Authorization
string
header
required

Your Application's JWT token

Body

application/json

The spawn event data

instanceIdentifier
string<uuid>
required

The ID or UUID of the instance.

uuid
string<uuid>
required

The UUID of the NPC or AgentNPC that was spawned.

type
enum<string>
required

The type of spawn event.

Available options:
natural,
breeding,
manual
parentIdentifiers
string<uuid>[]
required

The identifiers of the parent agent NPCs.

Response

The created spawn event

id
string<uuid>
required

Unique identifier

createdAt
string<date-time>
required

Date of creation

updatedAt
string<date-time>
required

Date of last update

type
enum<string>
required

The type of spawn event.

Available options:
natural,
breeding,
manual
deletedAt
string<date-time> | null

Date of deletion

agentNpc
object

The agent NPC that was spawned.