home / skills / openclaw / skills / intent-router

intent-router skill

/skills/daisuke134/intent-router

This skill classifies text into your custom intents with confidence scores and entity extraction to power routing and multi-agent orchestration.

npx playbooks add skill openclaw/skills --skill intent-router

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
1.6 KB
---
name: intent-router
description: "Classify text into custom intents with confidence scoring and entity extraction. Use when: intent classification, message routing, multi-agent orchestration, NLU, text classification. Triggers: intent, classify, route, NLU, categorize."
version: "1.0.0"
author: "Daisuke134"
---

# intent-router

Classify text into your custom intent list with confidence scoring and entity extraction. Powered by x402 — no API keys needed.

## Prerequisites

```bash
npm install -g [email protected]
awal auth login
```

## Usage

```bash
npx [email protected] x402 pay \
  https://anicca-proxy-production.up.railway.app/api/x402/intent-router \
  -X POST \
  -d '{"text":"I want to book a flight to Tokyo next week","intents":["booking","complaint","question","feedback","cancellation"],"language":"en"}'
```

## Price

$0.005 USDC per request (Base network)

## Input Schema

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| text | string (max 2000) | Yes | Text to classify |
| intents | string[] (2-20 items) | Yes | Candidate intent list |
| language | enum (en\|ja\|es\|fr\|de\|zh\|ko) | No (default: en) | Language hint |
| context | string (max 500) | No | Additional context |

## Output Schema

```json
{
  "intent_id": "int_a1b2c3",
  "matched_intent": "booking",
  "confidence": 0.95,
  "reasoning": "The text explicitly mentions wanting to book a flight.",
  "secondary_intent": "question",
  "secondary_confidence": 0.12,
  "entities": [
    {"type": "location", "value": "Tokyo"},
    {"type": "datetime", "value": "next week"}
  ],
  "language_detected": "en"
}
```

Overview

This skill classifies user text into a custom list of intents, returns confidence scores, and extracts relevant entities. It provides a compact NLU endpoint that needs no external API keys and supports language hints and simple context. Use it to route messages, orchestrate multi-agent workflows, or power lightweight chatbots and automation logic. The output includes primary and secondary intent predictions, reasoning, entity extraction, and detected language.

How this skill works

Submit text along with a candidate list of intents and optional language and context hints. The service scores each intent, selects a primary and optional secondary intent, and extracts entities like locations and datetimes. It also returns a brief reasoning string explaining the top decision and a detected language tag. Responses include confidence values so you can threshold or cascade routing decisions.

When to use it

  • Routing incoming messages to specialized agents or microservices based on intent.
  • Lightweight NLU in chatbots without setting up large ML models or API keys.
  • Pre-classifying support tickets, feedback, or contact forms for workflow automation.
  • Adding intent confidence to fallback or escalation logic in conversational flows.
  • Rapid prototyping of intent-driven features with entity extraction for slots.

Best practices

  • Provide a focused list of 2–20 candidate intents to improve accuracy and speed.
  • Include short context when available to disambiguate similar intents.
  • Use confidence thresholds to decide automatic routing vs. human review.
  • Normalize entities after extraction (e.g., canonicalize dates and locations).
  • Monitor low-confidence and misclassified examples to refine intent labels.

Example use cases

  • A support hub routes messages to billing, technical, or account teams based on predicted intent.
  • A travel assistant detects booking intent and extracts destination and date slots for booking flows.
  • An orchestration layer dispatches specialized agents (sales, legal, complaints) depending on intent and confidence.
  • A feedback pipeline categorizes user comments into complaint, praise, and feature request buckets for analytics.
  • A chatbot uses secondary intent and confidence to trigger clarifying questions before executing actions.

FAQ

How many intents should I provide?

Provide between 2 and 20 candidate intents; fewer, focused options usually yield better precision.

How should I handle low-confidence results?

Use a threshold to route low-confidence cases to human review or ask a clarifying question in the conversation.