---
title: "Non-TypeScript backends"
description: "Use the AI Toolkit CLI to generate tool definitions and workflow configurations as JSON for non-TypeScript backends like Python, Go, or Ruby."
canonical_url: "https://tiptap.dev/docs/content-ai/capabilities/ai-toolkit/advanced-guides/non-typescript-backends"
---

# Non-TypeScript backends

Use the AI Toolkit CLI to generate tool definitions and workflow configurations as JSON for non-TypeScript backends like Python, Go, or Ruby.

Use the AI Toolkit with any backend language. The `@tiptap-pro/ai-toolkit-tool-definitions` package includes a CLI that outputs tool definitions and workflow configurations as JSON, so you can use them in Python, Go, Ruby, or any other language.

## Setup

Configure authentication for Tiptap's private npm registry. Follow the [private registry guide](https://tiptap.dev/docs/guides/pro-extensions.md) to set up your `.npmrc` file with your access token.

> **Node.js required:**
>
> The CLI requires Node.js 18 or later. You only need Node.js to run the CLI and generate the JSON files — your backend can use any language.

## Generate tool definitions

Run the CLI to generate a `tool-definitions.json` file with all default tools:

```bash
npx @tiptap-pro/ai-toolkit-tool-definitions@latest tool-definitions > tool-definitions.json
```

The output is a JSON array. Each entry contains:

- `name`: unique identifier of the tool
- `description`: instructions for the AI model
- `inputSchema`: [JSON Schema](https://json-schema.org/) describing the tool's input parameters

### Use in your backend

Load the JSON file in your backend and convert the tool definitions to your AI provider's format. For example, in Python with the OpenAI SDK:

```python
import json

with open("tool-definitions.json") as f:
    tool_definitions = json.load(f)

# Convert to OpenAI tool format
tools = [
    {
        "type": "function",
        "function": {
            "name": tool["name"],
            "description": tool["description"],
            "parameters": tool["inputSchema"],
        },
    }
    for tool in tool_definitions
]
```

## Generate workflow configurations

Each workflow command outputs a JSON object with a `systemPrompt` (and optionally a `jsonOutputSchema`) that you pass to your AI provider.

### Insert content workflow

```bash
npx @tiptap-pro/ai-toolkit-tool-definitions@latest insert-content-workflow > insert-content-workflow.json
```

Output:

- `systemPrompt`: instructions for the AI model

### Proofreader workflow

```bash
npx @tiptap-pro/ai-toolkit-tool-definitions@latest proofreader-workflow > proofreader-workflow.json
```

Output:

- `systemPrompt`: instructions for the AI model
- `jsonOutputSchema`: [JSON Schema](https://json-schema.org/) for validating the AI output

### Tiptap Edit workflow

```bash
npx @tiptap-pro/ai-toolkit-tool-definitions@latest tiptap-edit-workflow > tiptap-edit-workflow.json
```

Output:

- `systemPrompt`: instructions for the AI model
- `jsonOutputSchema`: [JSON Schema](https://json-schema.org/) for validating the AI output

### Comments workflow

```bash
npx @tiptap-pro/ai-toolkit-tool-definitions@latest edit-threads-workflow > edit-threads-workflow.json
```

Output:

- `systemPrompt`: instructions for the AI model
- `jsonOutputSchema`: [JSON Schema](https://json-schema.org/) for validating the AI output

### Template workflow

The template workflow requires an HTML template as input:

```bash
npx @tiptap-pro/ai-toolkit-tool-definitions@latest template-workflow --html-template '<p _templateslot="title">Title</p><p _templateslot="body">Body</p>' > template-workflow.json
```

Output:

- `systemPrompt`: instructions for the AI model (includes the template)
- `jsonOutputSchema`: [JSON Schema](https://json-schema.org/) for validating the AI output

### Use workflows in your backend

Load the JSON file and pass the system prompt and schema to your AI provider. For example, in Python with the OpenAI SDK:

```python
import json

with open("proofreader-workflow.json") as f:
    workflow = json.load(f)

response = client.chat.completions.create(
    model="gpt-5.4-mini",
    messages=[
        {"role": "system", "content": workflow["systemPrompt"]},
        {"role": "user", "content": json.dumps({
            "content": "<p _hash='abc123'>Document content here</p>",
            "task": "Correct all grammar and spelling mistakes",
        })},
    ],
    response_format={
        "type": "json_schema",
        "json_schema": {
            "name": "proofreader_output",
            "schema": workflow["jsonOutputSchema"],
        },
    },
)
```

## CLI reference

### `tool-definitions`

Generate tool definitions as JSON.

```bash
npx @tiptap-pro/ai-toolkit-tool-definitions@latest tool-definitions [options]
```

| Option                           | Description                                                                                                                                                                       |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--tools <names...>`             | Space-separated list of tool names to enable. When omitted, the default set is used. Valid names: `tiptapRead`, `tiptapEdit`, `tiptapReadSelection`, `getThreads`, `editThreads`. |
| `--operation-meta <description>` | Description for the `meta` field in edit operations.                                                                                                                              |

### `tiptap-edit-workflow`

Generate the Tiptap Edit workflow configuration as JSON.

```bash
npx @tiptap-pro/ai-toolkit-tool-definitions@latest tiptap-edit-workflow [options]
```

| Option                           | Description                                          |
| -------------------------------- | ---------------------------------------------------- |
| `--operation-meta <description>` | Description for the `meta` field in edit operations. |

### `proofreader-workflow`

Generate the Proofreader workflow configuration as JSON.

```bash
npx @tiptap-pro/ai-toolkit-tool-definitions@latest proofreader-workflow [options]
```

| Option                           | Description                                     |
| -------------------------------- | ----------------------------------------------- |
| `--operation-meta <description>` | Description for the `meta` field in operations. |

### `template-workflow`

Generate the Template workflow configuration as JSON.

```bash
npx @tiptap-pro/ai-toolkit-tool-definitions@latest template-workflow --html-template <html>
```

| Option                   | Description                              |
| ------------------------ | ---------------------------------------- |
| `--html-template <html>` | **(Required)** The HTML template string. |

### `edit-threads-workflow`

Generate the Comments workflow configuration as JSON.

```bash
npx @tiptap-pro/ai-toolkit-tool-definitions@latest edit-threads-workflow
```

No options.

### `insert-content-workflow`

Generate the Insert content workflow configuration as JSON.

```bash
npx @tiptap-pro/ai-toolkit-tool-definitions@latest insert-content-workflow
```

No options.
