> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Mastra

> Give a Mastra agent product search and live retailer offers with @channel3/agent-toolkit.

Mastra agents accept Vercel AI SDK tools, so `@channel3/agent-toolkit/ai-sdk` works in any [Mastra](https://mastra.ai) v1 agent. It provides the same two tools as the [Channel3 MCP](/docs/mcp-overview.md): `search_products` and `get_products`.

## Install

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
npm install @mastra/core @channel3/agent-toolkit
```

Set `CHANNEL3_API_KEY` in your environment. [Create a free API key](https://channel3.ai/sign-up/developer) if you don't have one yet.

## Use the tools

```typescript theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Agent } from "@mastra/core/agent";
import { channel3Tools } from "@channel3/agent-toolkit/ai-sdk";

const agent = new Agent({
  id: "shopping-agent",
  name: "Shopping Agent",
  instructions: "You are a shopping assistant. Find products and compare retailer offers.",
  model: "anthropic/claude-sonnet-5-5",
  tools: channel3Tools(),
});

const result = await agent.generate(
  "Find me a leather golf glove under $40 and tell me which retailer has it cheapest.",
);
```

> [!NOTE]
>
> Requires `@channel3/agent-toolkit` 0.1.1 or later.

## Tools and options

The tools, credit costs and options are the same as on the [Vercel AI SDK page](/docs/ai-sdk.md#tools). For `search_products`, the model receives a one-line summary per product; the full structured result is in the tool result for your UI.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.