Skip to main content
Starter Kit - Ships with your template. You own it - modify freely.

Overview

The Slug Agent generates unique URL-safe slugs using multiple generation strategies. Perfect for creating short links, unique identifiers, or custom URLs for your application. Key Features:
  • Multiple generation strategies (nanoid, UUID, base62, timestamp)
  • Configurable length and custom alphabets
  • Optional prefix support
  • Fast edge-native generation
Location: agents/system/slug/

Quick Start

Generate a basic slug using the default nanoid strategy:
Output:

Input Schema

Output Schema

Configuration

The agent supports these configuration options:

Strategies

nanoid (Default)

Generates compact, URL-safe IDs using a custom alphabet. Fast and collision-resistant. Characteristics:
  • Length: 7 characters (configurable)
  • Alphabet: 0-9, a-z, A-Z (62 characters)
  • Collision probability: ~1 billion years to have 1% probability of collision
Example:
Output: xK9mPq2A

uuid

Generates standard UUID v4 identifiers. Best for systems requiring universally unique identifiers. Characteristics:
  • Length: 36 characters (fixed)
  • Format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
  • Collision probability: Virtually impossible
Example:
Output: 550e8400-e29b-41d4-a716-446655440000

base62

Generates numeric IDs encoded in base62. Useful for sequential or counter-based systems. Characteristics:
  • Length: Configurable
  • Alphabet: 0-9, a-z, A-Z
  • Compact numeric representation
Example:

timestamp

Generates slugs based on current timestamp. Useful for time-ordered identifiers. Characteristics:
  • Length: Configurable
  • Format: Base62-encoded timestamp
  • Naturally sortable by creation time
Example:

Examples

Basic Slug Generation

Generate a simple 7-character slug:
Output:

Prefixed Slug

Generate a slug with a custom prefix:
Output:

UUID Generation

Generate a standard UUID:
Output:

Custom Length

Generate a longer slug for increased uniqueness:

Custom Alphabet

Generate a slug with a custom character set:

URL Shortener Pattern

Combine slug generation with storage:

Unique Content ID Pattern

Generate a prefixed content identifier:

Redirects Agent

Manage URL redirects and short links

Starter Kit Overview

Explore all starter kit agents