Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

4 changes: 4 additions & 0 deletions docs/ai/features.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Zuplo AI Features
sidebar_label: Features
---
10 changes: 10 additions & 0 deletions docs/ai/gateway/apps.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: AI Gateway Apps
sidebar_label: Overview
---

Apps are in the Zuplo AI Gateway represent any app or intergration that will
call the AI Gateway. For example, you might have a custom support chatbot on
your website - that chatbot would be an App in the AI Gateway. Each App has its
own API Key so that usage is tracked independently. Apps are owned by a specific
[team](./teams.mdx) and can access the AI Providers assigned to that team.
4 changes: 4 additions & 0 deletions docs/ai/gateway/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Zuplo AI Gateway Getting Started
sidebar_label: Getting Started
---
4 changes: 4 additions & 0 deletions docs/ai/gateway/information-architecture.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: AI Gateway Information Architecture
sidebar_label: Information Architecture
---
65 changes: 65 additions & 0 deletions docs/ai/gateway/managing-providers.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
title: Managing AI Providers
sidebar_label: Managing Providers
---

Zuplo's AI Gateway supports integration with various
[AI providers](./providers.mdx), allowing you to leverage different models and
services for your AI applications.

## Adding a New AI Provider

To add a new AI provider to your Zuplo AI Gateway, follow these steps:

<Stepper>

1. Navigate to the **Settings** > **AI Providers** section of your AI Gateway
project in the [Zuplo Portal](https://portal.zuplo.com).

1. Click on the **Add Provider** button.

1. Select the desired provider from the list of
[supported providers](./providers.mdx).

1. Specify a label for the provider instance to easily identify it later. You
can change the label later if required.

1. Enter the API Key for the selected provider. For instructions on how to
create an API key for each provider see the
[provider documentation](./providers.mdx).

1. Select the model or models you want to use with this provider. The available
models will depend on the selected provider. This can be changed later.

:::tip

Click "Select All" to enable all models.

:::

1. Click save

</Stepper>

## Editing an AI Provider

Existing providers can be modified by navigating to the **Settings** > **AI
Providers** section and clicking the **Edit** button next to the provider you
want to modify.

You can modify the label, API key, and selected models for the provider. After
making your changes, click **Save** to apply them. Changes are effective
immediately.

:::caution

Be careful removing models from an provider that is in use as it may break
existing applications that rely on the provider.

:::

## Deleting an AI Provider

Providers that are no longer used within your project can be deleted. To delete
a provider, navigate to the **Settings** > **AI Providers** section and click
the **Delete** button next to the provider you want to remove.
63 changes: 63 additions & 0 deletions docs/ai/gateway/managing-teams.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: Managing Teams
---

Teams in the Zuplo AI Gateway are how users are granted access to AI Providers
and Apps. Teams are hiearcical with access propogating downword. Teams are also
where you define usage limits.

## Creating a Team

<Stepper>

1. Navigate to the **Teams** tab of your AI Gateway project in the
[Zuplo Portal](https://portal.zuplo.com).

1. Click on the **Create Team** button.

1. Enter the name of your team.

1. Click **Create**

</Stepper>

## Adding Team Members

Team members are the users who belong to a team and can access the AI Providers
and Apps associated with that team.

<Stepper>

1. Navigate to the **Teams** tab of your AI Gateway project in the
[Zuplo Portal](https://portal.zuplo.com).

1. Select the team you want to add members to.

1. Click the **Members** tab.

1. Click **Add Member**.

1. Type the email address of the user you want to add. If the user is already a
member of your Zuplo account they will be directly added to the team. If they
don't have an account, they will be invited to join the account and then
added to the team.

1. Select the role for the user (if your plan supports RBAC). The available
roles are:
- **Member**: Can access AI Providers and Apps assigned to the team.
- **Admin**: Can manage team settings, members, and access AI Providers and
Apps assigned to the team.

:::note

RBAC is an optional enterprise add-on. For more information see the
[document on roles and permissions](../../articles/accounts/roles-and-permissions.mdx).

:::

1. Click **Add Member** to confirm.

1. The user will receive an email notification if they are being invited to the
Zuplo account.

</Stepper>
6 changes: 6 additions & 0 deletions docs/ai/gateway/overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Zuplo AI Gateway
sidebar_label: Overview
---

Introduction
4 changes: 4 additions & 0 deletions docs/ai/gateway/provider-anthropic.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Anthropic Provider
sidebar_label: Anthropic
---
4 changes: 4 additions & 0 deletions docs/ai/gateway/provider-google.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Google Provider
sidebar_label: Google
---
4 changes: 4 additions & 0 deletions docs/ai/gateway/provider-minstral.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Minstral Provider
sidebar_label: Minstral
---
4 changes: 4 additions & 0 deletions docs/ai/gateway/provider-openai.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: OpenAI Provider
sidebar_label: OpenAI
---
13 changes: 13 additions & 0 deletions docs/ai/gateway/providers.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: AI Providers
sidebar_label: Overview
---

Zuplo's AI Gateway supports integration with various AI providers, allowing you
to leverage different models and services for your AI applications.

## Supported Providers

Zuplo currently supports the following AI providers:

|
4 changes: 4 additions & 0 deletions docs/ai/gateway/teams.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: AI Gateway Teams
sidebar_label: Overview
---
8 changes: 8 additions & 0 deletions docs/ai/gateway/universal-api.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: AI Gateway Universal API
sidebar_label: Universal API
---

Zuplo AI Gateway provides a universal API that standardizes interactions with
various AI providers. This API follows the OpenAI API specification, making it
easy to integrate with existing applications that already use OpenAI's API.
4 changes: 4 additions & 0 deletions docs/ai/gateway/usage-limits.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: "Usage Limits & Threasholds"
sidebar_label: "Usage Limits"
---
4 changes: 4 additions & 0 deletions docs/ai/guardrails.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Zuplo AI Guardrails
sidebar_label: Overview
---
125 changes: 125 additions & 0 deletions docs/ai/mcp-server/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
---
title: Zuplo MCP Server Getting Started
sidebar_label: Getting Started
---

#### Getting Started

1. Set up your APIs in Zuplo using OpenAPI specifications
2. Add the MCP Server Handler to a route
3. Configure your server name, version, and which APIs to expose as tools
4. Deploy your project to make the MCP tools available
5. Connect your AI systems to the MCP server endpoint

[Read the full technical documentation on the MCP Server Handler](/docs/handlers/mcp-server)

### 2. MCP Custom Tools: Programmable AI Tools

For more complex scenarios, use MCP Custom Tools to create sophisticated AI
tools with custom business logic, multi-step workflows, and programmatic control
using OpenAPI specifications and custom handler functions.

#### Key Features

- **OpenAPI Standard**: Define tools using standard OpenAPI 3.1 specifications
- **Custom Logic**: Implement complex business workflows that go beyond simple
API calls to enable powerful AI workloads
- **Multi-Step Operations**: Chain multiple API calls, data transformations, and
conditional logic
- **Type Safety**: Built-in JSON Schema validation for inputs and outputs
- **Runtime Integration**: Full access to your gateway through
`context.invokeRoute()`

#### Example Use Case

The following shows a powerful workflow that can enable an AI agent to interface
with a process ordering system: instead of an agent calling each of your APIs
manually, this workflow can be used as a single "aggregate" process to validate
the provided customer, check that items are in stock, determine pricing, and
place orders for those items.

**OpenAPI Tool Definition:**

```json
{
"/process-order": {
"post": {
"summary": "Process customer order",
"description": "Process a customer order with inventory validation and pricing",
"operationId": "processCustomerOrder",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["customerId", "orderNum"],
"properties": {
"customerId": {
"type": "string",
"description": "Unique customer identifier"
},
"orderNum": {
"type": "number",
"description": "Order number to process"
}
}
}
}
}
},
"x-zuplo-route": {
"handler": {
"export": "default",
"module": "$import(./modules/process-order)"
}
}
}
}
}
```

**Custom Handler Implementation:**

```typescript
// modules/process-order.ts
import { ZuploContext, ZuploRequest } from "@zuplo/runtime";

export default async function (request: ZuploRequest, context: ZuploContext) {
const args = await request.json();

// 1. Validate customer exists and is active
const customerRes = await context.invokeRoute(
`/customers/${args.customerId}`,
);
if (!customerRes.ok) {
throw new Error("Customer not found or inactive");
}
const customer = await customerRes.json();

// 2. Check the customer's order
const orderResponse = await context.invokeRoute(`/orders/${args.orderNum}`);

if (!orderResponse.ok) {
throw new Error("Order not found");
}
const order = await orderResponse.json();

// 3. Return structured response
return {
orderNum: order.id,
items: order.items,
status: "processed",
customerId: args.customerId,
};
}
```

#### Getting Started with Custom Tools

1. Create an OpenAPI specification defining your tools as POST endpoints
2. Implement custom handler functions for complex business logic
3. Configure the MCP Server Handler with your OpenAPI specification
4. Deploy and test with MCP clients

[Read the full documentation on MCP Custom Tools](/docs/handlers/mcp-server-custom-tools)
Loading
Loading