Skip to content
Closed
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
8 changes: 6 additions & 2 deletions npm-packages/docs/docs/agents/playground.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ There is also a [hosted version here](https://get-convex.github.io/agent/).
**Note**: You must already have a Convex project set up with the Agent. See the
[docs](./getting-started.mdx) for setup instructions.

```sh
npm i @convex-dev/agent-playground
```

In your agent Convex project, make a file `convex/playground.ts` with:

```ts
import { definePlaygroundAPI } from "@convex-dev/agent";
import { definePlaygroundAPI } from "@convex-dev/agent-playground";
import { components } from "./_generated/api";
import { weatherAgent, fashionAgent } from "./example";

`
/**
* Here we expose the API so the frontend can access it.
* Authorization is handled by passing up an apiKey that can be generated
Expand Down