Skip to content
Open
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
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,37 @@ def vegetarian_recipe_agent(messages) -> scenario.AgentReturnTypes:
<details>
<summary><strong>Quick Start - TypeScript</strong></summary>

Setup `scenario.config.js` or `scenario.config.mjs` at the root of your project.

```typescript
import { openai } from "@ai-sdk/openai";
import { defineConfig } from "@langwatch/scenario";

export default defineConfig({
defaultModel: {
model: openai("gpt-4.1"),
},
});
```

Setup `vitest.config.ts` or `vitest.config.mts` at the root of your project. This is important to enable autopilot simulation.

```typescript
import { withScenario } from "@langwatch/scenario/integrations/vitest/config";
import VitestReporter from "@langwatch/scenario/integrations/vitest/reporter";
import { defineConfig } from "vitest/config";

export default withScenario(
defineConfig({
test: {
testTimeout: 180_000, // 3 minutes
setupFiles: ["dotenv/config"],
reporters: ["default", new VitestReporter()],
},
})
);
```

Save it as `tests/vegetarian-recipe-agent.test.ts`:

```typescript
Expand Down