Automation guide

Video encoding workflows for agents, MCP tools, and automation systems

Design agent-friendly video encoding workflows with the Convertrilo MCP server, scoped API keys, deterministic job payloads, idempotency, polling, and signed webhooks.

Agents and workflow builders need narrow, predictable tools. Convertrilo works best when an agent can use MCP or a small backend wrapper to create one explicit job, inspect status, and react to terminal events without owning the media pipeline.

Agent MCP instructionsguide
Use the Convertrilo MCP tools this way:
1. call get_token_balance before creating paid jobs
2. call create_encode_job with explicit codec, resolution, and quality
3. save the returned jobId
4. call wait_for_job before publishing or notifying users
5. call cancel_job only when the user explicitly asks

convertrilo-mcp installed and configured in an MCP client, or a narrow backend tool wrapper.

A scoped API key with only the permissions the agent needs.

Strict input validation before an agent can submit source URLs or storage destinations.

Stable workflow ids for idempotency keys.

A polling or webhook path for terminal status.

Recipe

Build the workflow with stable API primitives

These guides focus on primitives that can be reused by dashboards, queue workers, scripts, CLIs, MCP tools, and agent runtimes.

  1. Step 1

    Expose convertrilo-mcp or a narrow create-job tool instead of raw arbitrary API access.

  2. Step 2

    Validate codec, resolution, priority, source, and destination inputs before submission.

  3. Step 3

    Use idempotency keys derived from workflow and asset ids.

  4. Step 4

    Let the agent read status or respond to webhook events before taking the next action.

Least-privilege tools

Give agents create/status access for encoding workflows instead of broad account or billing permissions.

Deterministic payloads

Make the tool schema explicit so agents choose from allowed codecs, resolutions, priorities, and output destinations.

Terminal-state automation

Run follow-up tasks only after completed, failed, or canceled states are observed through status checks or webhooks.

Developer questions

Does Convertrilo need a separate agent API?

No. Agents can use convertrilo-mcp or the same scoped API and SDK primitives through a narrower tool wrapper that validates inputs.

What is the safest agent pattern?

Expose a small tool that creates jobs with allowed settings, attaches metadata, uses idempotency keys, and returns job ids for later status checks.

Can an agent prioritize jobs?

Yes, but priority should be allowed only when your product policy or billing state permits it.

Related developer paths

Start with a real estimate

Choose your codec, resolution, FPS, bitrate, quality, and optimization settings. Convertrilo shows the NEU estimate before credits are reserved, and failed jobs release reserved credits back to your balance.