What are Triks?

Triks are secure, typed skills for AI agents. These come in a format of full conversational Agents or simple Tools agents can consume.

Think of them as npm packages for agent capabilities - but designed from the ground up for security and composability.

Skills, Not Just Tools

A Trik isn’t a simple function call. It can be a complete Agent that can:

  • Handle complex workflows - Multi-step operations, retries, error handling
  • Maintain state - Sessions track context across conversation turns
  • Integrate deeply - Full access to external APIs, databases, services
  • Self-describe - Agent mode, tools, and capabilities declared in a manifest
  • Run in complete isolation - Access to storage, file creation, server launching - All within an isolated container.

Triks come in two modes, each suited to different problems:

Conversational: Hand off a conversation to a specialized agent that handles the entire workflow autonomously. Tool: Add native tools to your agent — implemented by the trik, called directly by your agent.

Agents Inside Agents

The most powerful triks are conversational agents — full LLM agents that your main agent can hand off to:

Your Agent └── Hands off to: @publisher/research-assistant (conversational trik) └── Has its own LLM, tools, state └── Processes the conversation autonomously └── Transfers back when done

The framework handles:

  • Orchestration - Deterministic handoff routing between agents
  • Security - Output validation, constrained types, TDPS enforcement
  • Distribution - Versioning, discovery, installation

The Manifest

Every Trik has a manifest.json that declares its contract:

{ "schemaVersion": 2, "id": "@publisher/my-trik", "name": "My Trik", "version": "1.0.0", "agent": { "mode": "conversational", "handoffDescription": "Research assistant for finding articles", "domain": ["research", "articles"], "systemPromptFile": "./system-prompt.md" }, "tools": { "search": { "description": "Search for articles", "logTemplate": "Searched for {{topic}}, found {{count}} results", "logSchema": { "topic": { "type": "string", "maxLength": 100 }, "count": { "type": "integer" } } } } }

The manifest tells the host agent:

  • What mode the trik operates in (conversational or tool)
  • When to hand off to it (via handoffDescription and domain)
  • What tools the trik uses internally
  • What the main agent will see back (via log templates or output templates)

Manifest Deep Dive

Agent Modes

Triks support two agent modes:

Conversational Mode

The trik is a full LLM agent. Your main agent hands off the conversation, and the trik takes over — processing messages, calling tools, and maintaining state across turns. When it’s done, it transfers the conversation back.

Main Agent: "User wants to research AI safety papers" → hands off to @publisher/research-assistant Trik Agent: Runs autonomously with its own LLM Calls search APIs, filters results, follows up Main agent sees: log entries like "Searched for AI safety, found 12 results" User sees: the trik's full responses directly Trik Agent: → transfers back when the user is done researching Main Agent: Resumes with a summary log of what happened

Best for: Complex workflows, multi-turn interactions, tasks requiring judgment and autonomy.

Tool Mode

The trik exports native tools directly to your main agent. No handoff, no LLM inside the trik — just deterministic functions with strict input/output schemas.

{ "agent": { "mode": "tool", "domain": ["weather"] }, "tools": { "getWeather": { "description": "Get current weather for a city", "inputSchema": { "type": "object", "properties": { "city": { "type": "string" } }, "required": ["city"] }, "outputSchema": { "type": "object", "properties": { "temperature": { "type": "integer" }, "condition": { "type": "string", "enum": ["sunny", "cloudy", "rainy", "snowy"] } } }, "outputTemplate": "Weather in {{city}}: {{temperature}}°C, {{condition}}" } } }

The main agent calls getWeather like any other tool. The trik executes the function and returns structured output through the outputTemplate — the agent never sees raw API responses.

Best for: Stateless operations, API wrappers, data lookups, anything that doesn’t need multi-turn conversation.

How Distribution Works

  • Publishing uses GitHub releases - no proprietary storage - All triks are validated, linted and ranked based on capabilitites.
  • Registry is a metadata index - discovery, versioning, stats
  • Installation fetches directly from GitHub. All triks are validated at installationto asure the manifest declares all capabilitites of the Trik.

Example Triks

TrikModePurpose
@molefas/triksterconversationalCreate, scaffold, and publish new triks interactively
@molefas/trik-demo-notesconversationalSearch, explore, and read articles from a curated library. Available in JS and Python
@molefas/hashtoolGenerate hashes (MD5, SHA-256, etc.) for any input. Available in JS and Python
@molefas/site-builderconversationalBuild and preview static websites with isolated filesystem access
@molefas/ghost-writerconversationalDraft, edit, and refine long-form content with voice profiles

Next Steps