Skip to content

Commit 0e302a7

Browse files
committed
have agent only return result.message
1 parent 9a96298 commit 0e302a7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/tools/agent.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type { ToolActionResult } from "../types/types.js";
1313

1414
const AgentInputSchema = z.object({
1515
prompt: z.string().describe(
16-
`The task prompt describing what you want the agent to accomplish.
16+
`The task prompt describing what you want the sub-agent to accomplish.
1717
Be clear and specific about the goal. For example:
1818
'Go to Hacker News and find the most controversial post from today, then summarize the top 3 comments'.
1919
The agent will autonomously navigate and interact with web pages to complete this task.`,
@@ -42,9 +42,9 @@ async function handleAgent(
4242
model: {
4343
modelName: "google/gemini-2.5-computer-use-preview-10-2025",
4444
apiKey:
45-
process.env.GOOGLE_GENERATIVE_AI_API_KEY ||
45+
process.env.GEMINI_API_KEY ||
4646
process.env.GOOGLE_API_KEY ||
47-
process.env.GEMINI_API_KEY,
47+
process.env.GOOGLE_GENERATIVE_AI_API_KEY,
4848
},
4949
});
5050

@@ -58,7 +58,7 @@ async function handleAgent(
5858
content: [
5959
{
6060
type: "text",
61-
text: `Agent execution completed:\n${JSON.stringify(result, null, 2)}`,
61+
text: `${result.message}`,
6262
},
6363
],
6464
};

0 commit comments

Comments
 (0)