create-mf2-app
Version:
The stack AI moves fast with.
20 lines (18 loc) • 559 B
text/typescript
import { Agent } from "@convex-dev/agent";
import { components } from "../_generated/api";
import { getGeocoding, getWeather } from "../tools/weather";
import { usageHandler } from "../usage_tracking/usageHandler";
import { chat, textEmbedding } from "../models";
export const weatherAgent = new Agent(components.agent, {
name: "Weather Agent",
chat,
textEmbedding,
instructions:
"You describe the weather for a location as if you were a TV weather reporter.",
tools: {
getWeather,
getGeocoding,
},
maxSteps: 3,
usageHandler,
});