You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 25, 2026. It is now read-only.
Repository navigation
Commit d013b39
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: agent-docs/src/agents/agent-pulse/tools.ts
+3-19Lines changed: 3 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ export async function createTools(context: ToolContext) {
24
24
* Tool for starting a tutorial - adds action to state queue
25
25
*/
26
26
conststartTutorialAtStep=tool({
27
-
description: "Start a specific tutorial for the user. You must call this function in order for the user to see the tutorial step content. The step number should be between 1 and the total number of steps in the tutorial.",
27
+
description: "Start a specific tutorial for the user. You must call this function in order for the user to see the tutorial step content. The tutorial content will be injected to the final response automatically -- you do not have to narrate the tutorial content. The step number should be between 1 and the total number of steps in the tutorial.",
28
28
parameters: z.object({
29
29
tutorialId: z.string().describe("The exact ID of the tutorial to start"),
30
30
stepNumber: z.number().describe("The step number of the tutorial to start (1 to total available steps in the tutorial)")
@@ -53,7 +53,7 @@ export async function createTools(context: ToolContext) {
53
53
});
54
54
55
55
/**
56
-
* Tool for talking to other agents (nong-tutorial functionality)
56
+
* Tool that talks to docs agent.
57
57
* This tool doesn't use state - it returns data directly
58
58
*/
59
59
constaskDocsAgentTool=tool({
@@ -71,28 +71,12 @@ export async function createTools(context: ToolContext) {
71
71
data: agentPayload,
72
72
contentType: 'application/json'
73
73
})
74
-
// TODO: handle the docs referencing and inject it to the frontend response
74
+
// TODO: handle the docs referencing and inject it to the frontend response
75
75
constresponseData=awaitresponse.data.json();
76
76
returnresponseData;
77
77
},
78
78
});
79
79
80
-
/**
81
-
* TODO: This tool allow the agent to get details information about the code execution that the user performed.
82
-
*/
83
-
constfetchCodeExecutionResultTool=tool({
84
-
description: "Fetch code execution results from the frontend",
85
-
parameters: z.object({
86
-
executionId: z.string().describe("The ID of the code execution"),
87
-
}),
88
-
execute: async({ executionId })=>{
89
-
agentContext.logger.info("Fetching execution result for: %s",executionId);
90
-
// This would actually fetch execution results
91
-
// For now, just return a mock response
92
-
return`Result for execution ${executionId}: console.log('Hello, World!');\n// Output: Hello, World!`;
0 commit comments