POST
/
agents
curl -X POST https://api.treeship.dev/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "DataAnalyzer",
    "description": "Analyzes sensitive data while preserving privacy",
    "capabilities": ["data-analysis", "text-generation"],
    "zkConfig": {
      "enableProofs": true,
      "preservePrivacy": true,
      "proofType": "zk-SNARK"
    },
    "metadata": {
      "department": "research",
      "compliance": "GDPR"
    }
  }'
{
  "id": "agent_1234567890",
  "name": "DataAnalyzer",
  "description": "Analyzes sensitive data while preserving privacy",
  "capabilities": ["data-analysis", "text-generation"],
  "zkConfig": {
    "enableProofs": true,
    "preservePrivacy": true,
    "proofType": "zk-SNARK"
  },
  "status": "active",
  "verificationHash": "0x7d8f9e8a7b6c5d4e3f2a1b0c9d8e7f6a",
  "metadata": {
    "department": "research",
    "compliance": "GDPR"
  },
  "createdAt": "2024-01-27T10:30:00.000Z",
  "updatedAt": "2024-01-27T10:30:00.000Z"
}

Request

name
string
required
A unique name for your agent
description
string
A description of what your agent does
capabilities
array
required
List of capabilities for the agent. Available options:
  • text-generation
  • data-analysis
  • code-generation
  • image-processing
  • voice-synthesis
zkConfig
object
required
Zero-Knowledge configuration for the agent
metadata
object
Additional metadata for the agent
curl -X POST https://api.treeship.dev/v1/agents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "DataAnalyzer",
    "description": "Analyzes sensitive data while preserving privacy",
    "capabilities": ["data-analysis", "text-generation"],
    "zkConfig": {
      "enableProofs": true,
      "preservePrivacy": true,
      "proofType": "zk-SNARK"
    },
    "metadata": {
      "department": "research",
      "compliance": "GDPR"
    }
  }'

Response

id
string
Unique identifier for the agent
name
string
The agent’s name
description
string
The agent’s description
capabilities
array
List of enabled capabilities
zkConfig
object
Zero-Knowledge configuration
status
string
Current status of the agent. Possible values: active, pending, suspended
verificationHash
string
Cryptographic hash for agent verification
createdAt
string
ISO 8601 timestamp of creation
updatedAt
string
ISO 8601 timestamp of last update
{
  "id": "agent_1234567890",
  "name": "DataAnalyzer",
  "description": "Analyzes sensitive data while preserving privacy",
  "capabilities": ["data-analysis", "text-generation"],
  "zkConfig": {
    "enableProofs": true,
    "preservePrivacy": true,
    "proofType": "zk-SNARK"
  },
  "status": "active",
  "verificationHash": "0x7d8f9e8a7b6c5d4e3f2a1b0c9d8e7f6a",
  "metadata": {
    "department": "research",
    "compliance": "GDPR"
  },
  "createdAt": "2024-01-27T10:30:00.000Z",
  "updatedAt": "2024-01-27T10:30:00.000Z"
}