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

FieldRequiredDescription
idYesUnique identifier (e.g., publisher/trik-name)
nameYesHuman-readable name
descriptionYesWhat this Trik does
versionYesSemantic 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 file
  • export - 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

FieldRequiredDescription
descriptionYesWhat this action does
responseModeYes"template" or "passthrough"
inputSchemaYesJSON Schema for input validation
agentDataSchemaDependsSchema for data the agent receives (template mode)
userContentSchemaDependsSchema for content sent to user (passthrough mode)
responseTemplatesDependsPre-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 } } }
FieldDescription
toolsExternal tools the Trik can use
session.enabledEnable cross-turn memory
session.maxDurationMsSession timeout (default: 30 minutes)
session.maxHistoryEntriesMax stored history items
storage.enabledEnable persistent storage
storage.maxSizeBytesMaximum storage size (default: 100MB)

Limits

Safety constraints on execution:

{ "limits": { "maxExecutionTimeMs": 5000 } }
FieldDescription
maxExecutionTimeMsMaximum runtime before timeout

Next: Learn about Response Modes to understand template vs passthrough.