npm package: @sitelevelai/n8n-nodes-sitelevel
Description: AI agent node that can handle structured output
Author: Daniel Holzmann
Latest version: 0.2.8

# n8n Agent Node

**⚠️ NOTICE: This node is not intended for public use and there is no support provided.**

## Overview

This n8n node provides a specialized agent integration for processing and structuring data according to a predefined schema. The node accepts input data and returns structured output that conforms to a hard-coded JSON schema format.

## Usage

If you understand the node's functionality and can work with its current implementation, you are welcome to use it as-is. Please note that:

- The output schema is hard-coded and cannot be modified through the node interface
- No documentation or support is provided beyond this README
- The node is designed for specific internal use cases

## Output Schema

The node returns structured data according to the following hard-coded JSON schema:

```json
{
  "type": "json_schema",
  "name": "response_format",
  "strict": true,
  "schema": {
    "type": "object",
    "properties": {
      "content": {
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "markdown"
                },
                "content": {
                  "type": "string",
                  "description": "Markdown formatted text content"
                }
              },
              "required": [
                "type",
                "content"
              ],
              "additionalProperties": false,
              "description": "Use for rich text content with formatting like headers, bold, italic, lists, etc."
            },
            {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "chart"
                    },
                    "chartType": {
                      "type": "string",
                      "enum": [
                        "line",
                        "bar",
                        "scatter",
                        "area"
                      ],
                      "description": "Chart visualization type"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Series name displayed in the legend"
                          },
                          "data": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "x": {
                                  "type": "string",
                                  "description": "X-axis value - can be a category name, number, or date in UNIX seconds"
                                },
                                "y": {
                                  "type": "number",
                                  "description": "Y-axis numeric value"
                                },
                                "tooltipLabel": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Custom tooltip label to display for this data point"
                                }
                              },
                              "required": [
                                "x",
                                "y",
                                "tooltipLabel"
                              ],
                              "additionalProperties": false
                            },
                            "description": "Array of data points for this series"
                          }
                        },
                        "required": [
                          "name",
                          "data"
                        ],
                        "additionalProperties": false
                      },
                      "description": "Array of data series - each series appears as a separate line/bar set"
                    }
                  },
                  "required": [
                    "type",
                    "chartType",
                    "data"
                  ],
                  "additionalProperties": false,
                  "description": "Charts that display data series over continuous or categorical axes"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "chart"
                    },
                    "chartType": {
                      "type": "string",
                      "enum": [
                        "pie",
                        "donut"
                      ],
                      "description": "Chart visualization type"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "Segment label"
                          },
                          "value": {
                            "type": "number",
                            "description": "Numeric value determining segment size"
                          },
                          "color": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Optional color override for this segment (hex, rgb, or color name)"
                          }
                        },
                        "required": [
                          "label",
                          "value",
                          "color"
                        ],
                        "additionalProperties": false
                      },
                      "description": "Array of segments/slices"
                    }
                  },
                  "required": [
                    "type",
                    "chartType",
                    "data"
                  ],
                  "additionalProperties": false,
                  "description": "Charts that display proportional data as segments of a whole"
                }
              ],
              "description": "Chart content block - choose appropriate chart type based on data characteristics"
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "table"
                },
                "data": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "entries": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "key": {
                              "type": "string",
                              "description": "Column key matching a header key"
                            },
                            "value": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Cell value for this column"
                            }
                          },
                          "required": [
                            "key",
                            "value"
                          ],
                          "additionalProperties": false
                        },
                        "description": "Array of key-value pairs representing cells in this row"
                      }
                    },
                    "required": [
                      "entries"
                    ],
                    "additionalProperties": false
                  },
                  "description": "Array of row data"
                },
                "meta": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "number",
                          "description": "Total number of rows across all pages"
                        },
                        "page": {
                          "type": "number",
                          "description": "Current page number (1-indexed)"
                        },
                        "pageSize": {
                          "type": "number",
                          "description": "Number of rows per page"
                        },
                        "totalPages": {
                          "type": "number",
                          "description": "Total number of pages"
                        },
                        "hasNextPage": {
                          "type": "boolean",
                          "description": "Whether there is a next page"
                        },
                        "hasPrevPage": {
                          "type": "boolean",
                          "description": "Whether there is a previous page"
                        }
                      },
                      "required": [
                        "total",
                        "page",
                        "pageSize",
                        "totalPages",
                        "hasNextPage",
                        "hasPrevPage"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Pagination and metadata information"
                },
                "headers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "description": "Unique identifier for this column - must match keys in row data"
                      },
                      "label": {
                        "type": "string",
                        "description": "Display text for the column header"
                      },
                      "sortable": {
                        "type": [
                          "boolean",
                          "null"
                        ],
                        "description": "Whether the column can be sorted by clicking the header"
                      },
                      "filterable": {
                        "type": [
                          "boolean",
                          "null"
                        ],
                        "description": "Whether the column can be filtered"
                      },
                      "searchable": {
                        "type": [
                          "boolean",
                          "null"
                        ],
                        "description": "Whether the column content is searchable"
                      }
                    },
                    "required": [
                      "key",
                      "label",
                      "sortable",
                      "filterable",
                      "searchable"
                    ],
                    "additionalProperties": false
                  },
                  "description": "Column definitions in display order"
                }
              },
              "required": [
                "type",
                "data",
                "meta",
                "headers"
              ],
              "additionalProperties": false,
              "description": "Tabular data display with pagination - use for structured data with consistent columns"
            }
          ],
          "description": "Content segment - split your response into appropriate content types"
        },
        "description": "Array of content segments - structure your response as multiple content blocks of appropriate types"
      }
    },
    "required": [
      "content"
    ],
    "additionalProperties": false,
    "$schema": "http://json-schema.org/draft-07/schema#"
  }
}
```

## License

[MIT](https://github.com/n8n-io/n8n-nodes-starter/blob/master/LICENSE.md)