mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-06-03 19:25:19 +02:00
better pipeline agent fix
This commit is contained in:
parent
f56ee650cf
commit
402cf40203
2 changed files with 5 additions and 8 deletions
|
|
@ -20,13 +20,10 @@ export function validateConfigChanges(configType: string, configChanges: Record<
|
|||
break;
|
||||
}
|
||||
case 'agent': {
|
||||
// Determine if this is a pipeline agent from the config changes
|
||||
const isPipelineAgent = configChanges.type === 'pipeline';
|
||||
|
||||
testObject = {
|
||||
name: 'test',
|
||||
description: 'test',
|
||||
type: isPipelineAgent ? 'pipeline' : 'conversation',
|
||||
type: 'conversation',
|
||||
instructions: 'test',
|
||||
prompts: [],
|
||||
tools: [],
|
||||
|
|
@ -34,9 +31,8 @@ export function validateConfigChanges(configType: string, configChanges: Record<
|
|||
ragReturnType: 'chunks',
|
||||
ragK: 10,
|
||||
connectedAgents: [],
|
||||
// Set correct defaults based on agent type
|
||||
controlType: isPipelineAgent ? 'relinquish_to_parent' : 'retain',
|
||||
outputVisibility: isPipelineAgent ? 'internal' : 'user_facing',
|
||||
controlType: 'retain',
|
||||
outputVisibility: 'user_facing',
|
||||
maxCallsPerParentAgent: 3,
|
||||
} as z.infer<typeof WorkflowAgent>;
|
||||
schema = WorkflowAgent;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ export const WorkflowAgent = z.object({
|
|||
'relinquish_to_start',
|
||||
]).optional().describe('Whether this agent retains control after a turn, relinquishes to the parent agent, or relinquishes to the start agent'),
|
||||
maxCallsPerParentAgent: z.number().default(3).describe('Maximum number of times this agent can be called by a parent agent in a single turn').optional(),
|
||||
}).refine((data) => {
|
||||
});
|
||||
export const StrictWorkflowAgent = WorkflowAgent.refine((data) => {
|
||||
// Pipeline agents should have internal output visibility and relinquish_to_parent control type
|
||||
if (data.type === 'pipeline' && data.outputVisibility !== 'internal') {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue