Skip to content

Commit 80dcbfd

Browse files
committed
fixes
1 parent 5c6ba25 commit 80dcbfd

File tree

11 files changed

+17
-25
lines changed

11 files changed

+17
-25
lines changed

cli/templates/agent/{{kebabCase name}}.agent.ts.hbs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,3 @@ export const {{camelCase name}}Agent = pickaxe.agent({
4141
}
4242
},
4343
});
44-
45-
export default [{{camelCase name}}Agent, {{camelCase name}}Toolbox];

cli/templates/geo/src/agents/{{kebabCase name}}.agent.ts.hbs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,3 @@ export const {{camelCase name}}Agent = pickaxe.agent({
6565
};
6666
},
6767
});
68-
69-
export default [{{camelCase name}}Agent, {{camelCase name}}Toolbox];

scaffolds/src/agents/effective-agent-patterns/1.prompt-chaining/prompt-chaining.agent.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,3 @@ export const promptChainingAgent = pickaxe.agent({
7777
}
7878
},
7979
});
80-
81-
export default [promptChainingAgent];

scaffolds/src/agents/effective-agent-patterns/2.routing/routing.agent.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,3 @@ export const routingAgent = pickaxe.agent({
8787
}
8888
},
8989
});
90-
91-
export default [routingAgent];

scaffolds/src/agents/effective-agent-patterns/2.routing/tools/classification.tool.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ export const classificationTool = pickaxe.tool({
2323
const classification = await generateObject({
2424
model: pickaxe.defaultLanguageModel,
2525
prompt: `Classify the following text into one of the following categories: ${Object.values(Classification).join(", ")}: ${input.message}`,
26-
schema: z.nativeEnum(Classification),
26+
schema: z.object({
27+
classification: z.nativeEnum(Classification),
28+
}),
2729
});
2830

2931
return {
30-
classification: classification.object,
32+
classification: classification.object.classification,
3133
};
3234
},
3335
});

scaffolds/src/agents/effective-agent-patterns/3.parallelization/1.sectioning/sectioning.agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ export const sectioningAgent = pickaxe.agent({
7878
},
7979
});
8080

81-
export default [sectioningAgent];
81+
[sectioningAgent];

scaffolds/src/agents/effective-agent-patterns/3.parallelization/2.voting/voting.agent.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,3 @@ export const votingAgent = pickaxe.agent({
101101
};
102102
},
103103
});
104-
105-
export default [votingAgent];

scaffolds/src/agents/effective-agent-patterns/4.evaluator-optimizer/evaluator-optimizer.agent.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const EvaluatorOptimizerAgentInput = z.object({
3838

3939
const EvaluatorOptimizerAgentOutput = z.object({
4040
post: z.string(),
41+
iterations: z.number(),
4142
});
4243

4344
export const evaluatorOptimizerAgent = pickaxe.agent({
@@ -50,13 +51,14 @@ export const evaluatorOptimizerAgent = pickaxe.agent({
5051

5152
let post: string | undefined;
5253
let feedback: string | undefined;
54+
let iterations = 0;
5355

5456
// ITERATIVE IMPROVEMENT LOOP
5557
// The loop continues until either:
5658
// 1. The evaluator determines the output is satisfactory (complete = true)
5759
// 2. We reach the maximum number of iterations (prevents infinite loops)
5860
for (let i = 0; i < 3; i++) {
59-
61+
iterations++;
6062
// GENERATION STEP: Create or improve the content
6163
// The generator takes into account:
6264
// - Original requirements (topic, target audience)
@@ -86,6 +88,7 @@ export const evaluatorOptimizerAgent = pickaxe.agent({
8688
if (evaluatorResult.complete) {
8789
return {
8890
post: post,
91+
iterations: iterations,
8992
};
9093
}
9194

@@ -98,8 +101,7 @@ export const evaluatorOptimizerAgent = pickaxe.agent({
98101

99102
return {
100103
post: post,
104+
iterations: iterations,
101105
};
102106
},
103107
});
104-
105-
export default [evaluatorOptimizerAgent];

scaffolds/src/agents/multi-agent.agent.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const salesAgent = pickaxe.agent({
3232
});
3333

3434

35-
const multiAgentToolbox = pickaxe.toolbox({
35+
export const multiAgentToolbox = pickaxe.toolbox({
3636
tools: [supportAgent, salesAgent],
3737
});
3838

@@ -56,5 +56,3 @@ export const rootAgent = pickaxe.agent({
5656
},
5757
});
5858

59-
60-
export default [rootAgent, multiAgentToolbox];

scaffolds/src/agents/simple.agent.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,3 @@ export const simpleAgent = pickaxe.agent({
4545
}
4646
},
4747
});
48-
49-
50-
export default [simpleAgent, simpleToolbox];

0 commit comments

Comments
 (0)