AI Support Guide

Simpli Macro

Smart macro and workflow automation engine with Jinja2 templates.

Agents often type the same responses with minor variations. Macro lets you create reusable templates with smart variables that auto-fill from ticket context — consistent messaging with zero copy-paste.

Simpli Macro manages reusable response templates with dynamic variable injection, Jinja2 rendering, and usage analytics.

Configuration

VariableDefaultDescription
APP_PORT8000Server port
LITELLM_MODELopenai/gpt-5-miniLLM model (for future AI suggestions)

Start the server

simpli-macro serve

API endpoints

Macro CRUD

MethodEndpointDescription
POST/macrosCreate a macro
GET/macrosList macros (optional ?tag= filter)
GET/macros/{id}Get a macro
PUT/macros/{id}Update a macro (partial)
DELETE/macros/{id}Delete a macro

Create a macro:

{
  "name": "Refund confirmation",
  "template": "Hi {{ customer_name }}, your refund of ${{ amount }} has been processed. It should appear in your account within {{ days }} business days.",
  "variables": ["customer_name", "amount", "days"],
  "tags": ["billing", "refunds"]
}

POST /execute

Render a macro with variable substitution.

Request:

{
  "macro_id": "M-a1b2c3d4",
  "variables": {
    "customer_name": "Jane",
    "amount": "49.99",
    "days": "3-5"
  },
  "ticket_id": "T-123"
}

Response:

{
  "rendered": "Hi Jane, your refund of $49.99 has been processed. It should appear in your account within 3-5 business days.",
  "actions_executed": []
}

Templates use Jinja2 sandboxed rendering for safety — arbitrary code execution is blocked.

GET /suggestions

Get auto-suggested macros based on repetitive patterns in conversations.

GET /analytics

Macro usage analytics, sorted by most used.

Response:

[
  {
    "macro_id": "M-a1b2c3d4",
    "name": "Refund confirmation",
    "usage_count": 142,
    "last_used": "2025-01-17T14:30:00Z"
  }
]

GET /health

Health check.

Next steps

On this page