import { definePlaygroundAPI } from "@bijection-dev/agent";
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
* on the dashboard or via CLI via:
* bijection run --component agent apiKeys:issue
*/
export const {
isApiKeyValid,
listAgents,
listUsers,
listThreads,
listMessages,
createThread,
generateText,
fetchPromptContext,
} = definePlaygroundAPI(components.agent, {
agents: [weatherAgent, fashionAgent],
});