Manifest
The manifest is the contract that defines a Trik. It declares what actions are available, what data they accept, and how they respond.
Anatomy of a Manifest
Every Trik has a manifest.json at its root:
{
"schemaVersion": 1,
"id": "demo/article-search",
"name": "Article Search",
"description": "Searches for articles on a given topic.",
"version": "2.0.0",
"actions": { ... },
"capabilities": { ... },
"limits": { ... },
"entry": { ... }
}Core Fields
Identification
| Field | Required | Description |
|---|---|---|
id | Yes | Unique identifier (e.g., publisher/trik-name) |
name | Yes | Human-readable name |
description | Yes | What this Trik does |
version | Yes | Semantic version |
Entry Point
The entry field tells the gateway how to run your Trik:
{
"entry": {
"module": "./graph.js",
"export": "default",
"runtime": "node"
}
}module- Path to the compiled JavaScript or Python fileexport- Named export or"default"runtime- Optional:"node"(default) or"python"
Actions
Actions are the operations your Trik supports. Each action has its own input/output schemas and response mode.
{
"actions": {
"search": {
"description": "Search for articles by topic",
"responseMode": "template",
"inputSchema": { ... },
"agentDataSchema": { ... },
"responseTemplates": { ... }
},
"details": {
"description": "Get full article content",
"responseMode": "passthrough",
"inputSchema": { ... },
"userContentSchema": { ... }
}
}
}Action Fields
| Field | Required | Description |
|---|---|---|
description | Yes | What this action does |
responseMode | Yes | "template" or "passthrough" |
inputSchema | Yes | JSON Schema for input validation |
agentDataSchema | Depends | Schema for data the agent receives (template mode) |
userContentSchema | Depends | Schema for content sent to user (passthrough mode) |
responseTemplates | Depends | Pre-defined responses for template mode |
Input Schema
Validates what the agent sends to your Trik:
{
"inputSchema": {
"type": "object",
"properties": {
"topic": { "type": "string", "minLength": 1 },
"limit": { "type": "integer", "default": 10 }
},
"required": ["topic"]
}
}Uses standard JSON Schema. Invalid inputs are rejected before your code runs.
Agent Data Schema
For template mode: defines what structured data the agent receives.
{
"agentDataSchema": {
"type": "object",
"properties": {
"template": {
"type": "string",
"enum": ["success", "empty", "error"]
},
"count": { "type": "integer" },
"topic": {
"type": "string",
"enum": ["AI", "technology", "science", "health"]
},
"articleIds": {
"type": "array",
"items": { "type": "string", "format": "id" }
}
},
"required": ["template"]
}
}Key principle: Use enums, integers, and IDs. Avoid free-form strings.
User Content Schema
For passthrough mode: defines content that goes directly to the user.
{
"userContentSchema": {
"type": "object",
"properties": {
"contentType": {
"type": "string",
"enum": ["article"]
},
"content": {
"type": "string",
"description": "The full article content"
},
"metadata": {
"type": "object",
"properties": {
"title": { "type": "string" },
"articleId": { "type": "string" }
}
}
},
"required": ["contentType", "content"]
}
}Response Templates
Pre-defined responses for template mode. The gateway fills in values from agentData:
{
"responseTemplates": {
"success": { "text": "I found {{count}} articles about {{topic}}." },
"empty": { "text": "I couldn't find any articles about {{topic}}." },
"error": { "text": "Something went wrong while searching." }
}
}The template field in agentData selects which template to use.
Capabilities
Declare what your Trik can do:
{
"capabilities": {
"tools": [],
"session": {
"enabled": true,
"maxDurationMs": 1800000,
"maxHistoryEntries": 10
},
"storage": {
"enabled": true,
"maxSizeBytes": 10485760
}
}
}| Field | Description |
|---|---|
tools | External tools the Trik can use |
session.enabled | Enable cross-turn memory |
session.maxDurationMs | Session timeout (default: 30 minutes) |
session.maxHistoryEntries | Max stored history items |
storage.enabled | Enable persistent storage |
storage.maxSizeBytes | Maximum storage size (default: 100MB) |
Limits
Safety constraints on execution:
{
"limits": {
"maxExecutionTimeMs": 5000
}
}| Field | Description |
|---|---|
maxExecutionTimeMs | Maximum runtime before timeout |
Next: Learn about Response Modes to understand template vs passthrough.