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
agents/system/slug/
Quick Start
Generate a basic slug using the default nanoid strategy:Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
strategy | string | No | nanoid | Slug generation strategy. Must be one of: nanoid, uuid, base62, timestamp |
length | integer | No | 7 | Length of generated slug. Minimum: 4, Maximum: 32 |
alphabet | string | No | - | Custom alphabet for nanoid/base62 generation |
prefix | string | No | - | Prefix to prepend to the generated slug |
Output Schema
| Field | Type | Description |
|---|---|---|
success | boolean | Whether slug generation succeeded |
slug | string | The generated URL-safe slug |
strategy | string | The strategy that was used for generation |
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
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
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
timestamp
Generates slugs based on current timestamp. Useful for time-ordered identifiers. Characteristics:- Length: Configurable
- Format: Base62-encoded timestamp
- Naturally sortable by creation time
Examples
Basic Slug Generation
Generate a simple 7-character slug:Prefixed Slug
Generate a slug with a custom prefix:UUID Generation
Generate a standard UUID: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:Related Documentation
Redirects Agent
Manage URL redirects and short links
Starter Kit Overview
Explore all starter kit agents

