Technical Spec v1.0 Audience: Client Engineering Team

Skills Engine
Integration Specification

This document specifies everything your engineering team needs to register and operate Skills within the customer engagement platform. A Skill is a client-defined action — described in plain language, backed by your API — that the AI can invoke autonomously when a customer interaction calls for it.

Contents
01

What is a Skill

A Skill is the bridge between the AI and your business systems. You define it once — with a plain-language description and an API endpoint — and the platform's Skills Engine decides when to invoke it based on what a customer is asking for.

You do not write any prompts. You do not instruct the AI when to call the Skill. The AI reads the customer's message, matches intent against your registered Skills, and invokes the correct one. Your only responsibility is to provide a well-described Skill and a reliable API endpoint that returns the correct response shape.

💡
Design principle: Write your Skill description the way a customer would describe their problem, not the way your system names the function. "Issue a reprint for a damaged order" will match far better than "POST /v2/fulfillment/reprint".
02

How Skills are Invoked

Skills only activate when the AI detects action-intent in a message — a customer asking for something to be done, not just answered. Pure information queries (tracking a shipment, asking about a policy) skip the Skills Engine entirely to keep response times fast.

Customer messageaction-intent detected
Skills Lookup Agentsemantic search
Shortlist returnedranked by relevance
Decider Agentselects + risk-checks
Risk tier gateauto / confirm / hold
Your API calledskill executed
⚠️
Two-agent model: The Lookup Agent uses semantic similarity — not keyword matching — to find candidate Skills. This means your description quality directly determines match accuracy. Vague descriptions produce false positives. Specific descriptions produce reliable matches.
03

Skill Registration Fields

Each Skill is registered via the client dashboard or the Management API. The following fields are required for every Skill.

Field Type Required Description
name string Required A short internal identifier. Used in audit logs and dashboards. Not seen by the AI. E.g. issue_reprint
description string Required Plain-language description of what this Skill does and when it should be used. This is what the AI reads. Write it from the customer's perspective. Max 300 characters.
endpoint string (URL) Required The HTTPS endpoint the platform will call when this Skill is invoked. Must be publicly reachable. IP allowlisting available on request.
method enum Required HTTP method. Accepted values: POST GET PATCH. Use POST for all actions with side effects.
auth object Required Authentication config. See auth object schema below.
payload_schema object (JSON Schema) Required JSON Schema defining the expected request body. The AI uses this to construct the correct payload from conversation context.
risk_tier enum Required Determines how invocation is gated. Values: low medium high. See Section 04.
timeout_ms integer Optional Maximum wait time in milliseconds before the platform treats the call as failed. Default: 5000. Max: 15000.
enabled boolean Optional Toggle the Skill on or off without deleting it. Default: true.

Auth Object Schema

Supported authentication types:

JSON Bearer token
{
  "type": "bearer",
  "token": "your-secret-token"
}
JSON API key header
{
  "type": "api_key",
  "header": "X-API-Key",
  "value": "your-api-key"
}
JSON HMAC signature
{
  "type": "hmac",
  "secret": "your-signing-secret",
  "header": "X-Signature"  // platform signs each request body
}
🔒
Security: All auth credentials are encrypted at rest and never logged. Rotate credentials via the dashboard at any time — changes take effect immediately with no downtime.
04

Risk Tiers

Every Skill must declare a risk tier. This controls whether the platform executes the Skill automatically, pauses for customer confirmation, or holds for a human agent. Assign the tier that reflects the real-world consequence of the action being performed.

Low

Read-only or low-consequence actions. Executed automatically with no confirmation step.

  • Check order status
  • Retrieve account details
  • Look up delivery estimate
  • Fetch product information
Medium

Reversible actions with customer impact. The AI confirms intent with the customer before calling your API.

  • Issue a reprint
  • Update delivery address
  • Apply a discount code
  • Reschedule an order
High

Irreversible or financially significant actions. Routed to the Human Approval Queue before execution.

  • Process a refund
  • Cancel a subscription
  • Close an account
  • Issue store credit
📌
When in doubt, go higher. You can always lower a tier after observing real invocation patterns. Starting too low on an action with financial consequences is harder to recover from operationally.
05

API Contract

When a Skill is invoked, the platform sends a POST request (or your configured method) to your endpoint. The request body contains two top-level keys: the payload constructed from your payload_schema, and a platform-provided context block.

JSON Inbound request body from platform to your API
{
  "skill_name": "issue_reprint",
  "invocation_id": "inv_01j9k2m3n4p5q6r7",  // unique per call, use for idempotency
  "payload": {
    // fields you defined in payload_schema, populated from conversation context
    "order_id": "ORD-88291",
    "reason": "damaged_in_transit",
    "customer_confirmed": true
  },
  "context": {
    "conversation_id": "conv_7f3a9c",
    "customer_id": "cust_19283",   // your customer identifier if known
    "channel": "chat",             // chat | email
    "timestamp": "2025-04-13T14:22:05Z"
  }
}

Payload Schema Definition

Define payload_schema as a standard JSON Schema object. The AI uses this schema to extract and validate the required fields from the conversation before calling your endpoint.

JSON Schema Example: issue_reprint payload schema
{
  "type": "object",
  "required": ["order_id", "reason"],
  "properties": {
    "order_id": {
      "type": "string",
      "description": "The customer's order reference number"
    },
    "reason": {
      "type": "string",
      "enum": ["damaged_in_transit", "print_quality", "wrong_item", "other"],
      "description": "Reason for the reprint request"
    },
    "customer_confirmed": {
      "type": "boolean",
      "description": "Whether the customer confirmed the reprint action"
    }
  }
}
💡
Description fields matter: The AI reads the description on each property to understand what value to extract from the conversation. Write them clearly — "The customer's order reference number" is better than "order_id".
06

Response Envelope

Your API must return a response matching the platform's standard envelope. This normalisation is what allows the AI to re-enter its reasoning loop reliably regardless of what your underlying system returns.

JSON Required response shape from your API
{
  "status": "success",         // "success" | "failure" | "pending"
  "data": {                   // any object — returned to AI for context
    "reprint_id": "RPT-44123",
    "estimated_dispatch": "2025-04-15"
  },
  "summary": "Reprint issued successfully. Estimated dispatch 15 April."
  // Human-readable sentence the AI can use directly in its response to the customer.
}
FieldTypeRequiredDescription
status enum Required success — action completed. failure — action could not be completed. pending — action queued, not yet complete.
data object Required Structured result data. Can be an empty object {} if there is nothing to return. The AI uses this to reason about follow-up actions.
summary string Required A single plain-English sentence describing the outcome. The AI may use this verbatim in its response to the customer. Write it customer-facing.
🚫
Non-compliant responses will fail the Skill invocation. If your API returns a shape that does not match this envelope, the platform treats it as an error, logs it for your review, and routes the conversation to the human queue. There is no silent fallback.
07

Error Handling

The platform handles Skill failures gracefully — the customer conversation is never abandoned. Below are the failure modes and platform behaviour for each.

ScenarioPlatform behaviourYour action
HTTP 4xx Skill marked failed. AI informs customer the action could not be completed and offers to escalate. Check your API logs. Common cause: malformed payload from schema mismatch.
HTTP 5xx Platform retries once after 1s. On second failure, routes to human queue with full context. Check endpoint health. Platform will alert via webhook if 5xx rate exceeds threshold.
Timeout After timeout_ms, platform treats as failure. Routes to human queue. Optimise endpoint response time or increase timeout_ms in Skill config (max 15s).
status: "pending" AI informs customer the action is in progress and they will be updated. No escalation. Send a follow-up via the platform's outbound API when the action completes.
status: "failure" AI reads your summary field and communicates the failure reason to the customer, then offers alternatives. Write a clear, customer-facing summary that explains why the action failed.
Invalid envelope Skill fails immediately. Routed to human queue. Logged as schema violation. Review response envelope spec in Section 06. Use sandbox to validate before go-live.

Idempotency

Every invocation includes a unique invocation_id in the request body. You should use this as an idempotency key on your side to prevent duplicate actions if the platform retries on a 5xx. Store the invocation_id against the action outcome and return the same response if you receive the same ID twice.

08

Sandbox & Testing

Every client account has an isolated sandbox environment. Skills registered in sandbox are never invoked in production. Use sandbox to validate your endpoint, response envelope, and payload schema before enabling a Skill in production.

1

Register the Skill in sandbox

Use the dashboard or Management API with environment: "sandbox". Point the endpoint at your staging environment.

2

Run a test invocation

Use the Skills Tester in the dashboard to send a synthetic payload to your endpoint. Review the full request and response logged in real time.

3

Validate the response envelope

The tester validates your response against the required envelope schema and flags any mismatches before they cause production failures.

4

Test the AI match accuracy

Submit test customer messages via the sandbox chat widget. Verify that your Skill description triggers the correct match and that the AI constructs the payload correctly from the conversation.

5

Promote to production

Once all tests pass, toggle environment: "production" in the dashboard. The Skill becomes live immediately.

09

Worked Example: Issue Reprint

A complete end-to-end example of a Skill registration, invocation, and response for a reprint request.

Skill Registration

JSON POST /v1/skills
{
  "name": "issue_reprint",
  "description": "Issue a free reprint for a customer whose order arrived damaged, had a print quality problem, or contained the wrong item. Use when a customer reports a problem with a received order and wants it resent.",
  "endpoint": "https://api.yourcompany.com/fulfillment/reprint",
  "method": "POST",
  "auth": {
    "type": "bearer",
    "token": "sk-live-xxxxxxxxxxxx"
  },
  "risk_tier": "medium",
  "timeout_ms": 6000,
  "payload_schema": {
    "type": "object",
    "required": ["order_id", "reason"],
    "properties": {
      "order_id": { "type": "string", "description": "Customer order reference" },
      "reason":   { "type": "string", "enum": ["damaged_in_transit", "print_quality", "wrong_item", "other"] }
    }
  }
}

Customer Interaction

💬
Customer: "Hi, my order ORD-88291 arrived and the photos are completely blurry — unusable. Can you sort this out?"

AI (after confirming intent): "I'm sorry to hear that — blurry photos are not acceptable. I can issue a free reprint right away. Just to confirm: you'd like a reprint of order ORD-88291 due to a print quality issue. Shall I go ahead?"

Customer: "Yes please."

AI (after Skill executes): "Done — your reprint has been issued and will be dispatched by 15 April. You'll receive a confirmation email shortly."

Platform Request to Your API

JSONPOST https://api.yourcompany.com/fulfillment/reprint
{
  "skill_name": "issue_reprint",
  "invocation_id": "inv_01j9k2m3n4p5q6r7",
  "payload": {
    "order_id": "ORD-88291",
    "reason": "print_quality"
  },
  "context": {
    "conversation_id": "conv_7f3a9c",
    "customer_id": "cust_19283",
    "channel": "chat",
    "timestamp": "2025-04-13T14:22:05Z"
  }
}

Your API Response

JSONHTTP 200
{
  "status": "success",
  "data": {
    "reprint_id": "RPT-44123",
    "estimated_dispatch": "2025-04-15"
  },
  "summary": "Reprint issued successfully. Estimated dispatch 15 April."
}
10

Go-Live Checklist

Complete all items before enabling a Skill in production.

Skill description written from customer perspective

Describes the customer problem, not the internal function name. Reviewed for clarity against real customer phrasing.

Endpoint is HTTPS and publicly reachable

Tested from an external network. Response time consistently under your configured timeout_ms.

Response envelope validated in sandbox

Platform Skills Tester confirms status, data, and summary fields present and correctly typed on all response paths (success, failure, pending).

Idempotency implemented

invocation_id stored and checked on your side. Duplicate calls return the same response without re-executing the action.

Risk tier confirmed with operations team

Tier assignment reviewed by someone with operational authority, not just the engineering team.

AI match accuracy tested

At least five real customer message variants tested in sandbox chat. Skill triggers correctly on genuine requests and does not trigger on unrelated messages.

Error paths tested

4xx, 5xx, and timeout scenarios tested in sandbox. Confirmed that conversation routes gracefully without customer-facing errors.