improve agent api

This commit is contained in:
David Blass
2025-10-31 03:15:51 -04:00
parent 15a7154aea
commit 681e08557c
7 changed files with 51 additions and 70 deletions
+2 -3
View File
@@ -1,12 +1,11 @@
import { query, type SDKMessage } from "@anthropic-ai/claude-agent-sdk";
import { log } from "../utils/cli.ts";
import { instructions } from "./shared.ts";
import type { Agent } from "./types.ts";
import { type Agent, instructions } from "./shared.ts";
export const claude: Agent = {
run: async ({ prompt, mcpServers, apiKey }) => {
process.env.ANTHROPIC_API_KEY = apiKey;
// Create the query with SDK options
const queryInstance = query({
prompt: `${instructions}\n\n${prompt}`,
options: {