From 3c4e0473b93e42cd5fab69fa23e287911a9d7d7d Mon Sep 17 00:00:00 2001 From: Tushar <47842976+tusharmagar@users.noreply.github.com> Date: Fri, 12 Sep 2025 18:32:23 +0530 Subject: [PATCH] fix: remove no-agent message that was incorrectly triggering for pipeline start agents (#245) - Removed 'Hi! To get started with chatting with your Assistant please create an agent first!' message feature - Pipelines can now be set as start agents without triggering this error message - Removed checks from emitGreetingTurn() and streamResponse() functions - System now handles all agent types properly as start agents --- .../application/lib/agents-runtime/agents.ts | 42 ------------------- 1 file changed, 42 deletions(-) diff --git a/apps/rowboat/src/application/lib/agents-runtime/agents.ts b/apps/rowboat/src/application/lib/agents-runtime/agents.ts index d6cc0b2a..a974dc4f 100644 --- a/apps/rowboat/src/application/lib/agents-runtime/agents.ts +++ b/apps/rowboat/src/application/lib/agents-runtime/agents.ts @@ -379,20 +379,6 @@ function mapConfig(workflow: z.infer): { } async function* emitGreetingTurn(logger: PrefixLogger, workflow: z.infer): AsyncIterable> { - // Check if there are no agents or no start agent - if (workflow.agents.length === 0 || !workflow.startAgent) { - logger.log(`no agents available, emitting no-agent message`); - - // emit no-agent message - yield* emitEvent(logger, { - role: 'assistant', - content: 'Hi! To get started with chatting with your Assistant please create an agent first!', - agentName: 'System', - responseType: 'external', - }); - return; - } - // find the greeting prompt const prompt = workflow.prompts.find(p => p.type === 'greeting')?.prompt || 'How can I help you today?'; logger.log(`greeting turn: ${prompt}`); @@ -1288,20 +1274,6 @@ export async function* streamResponse( logger.log(`start agent: ${workflow.startAgent}`); logger.log(`=== END CONFIGURATION ===`); - // Check if there are no agents or no start agent - if (Object.keys(agentConfig).length === 0 || !workflow.startAgent) { - logger.log(`no agents available, emitting no-agent message`); - - // emit no-agent message - yield* emitEvent(logger, { - role: 'assistant', - content: 'Hi! To get started with chatting with your Assistant please create an agent first!', - agentName: 'System', - responseType: 'external', - }); - return; - } - const stack: string[] = []; logger.log(`initialized stack: ${JSON.stringify(stack)}`); @@ -1324,20 +1296,6 @@ export async function* streamResponse( const startOfTurnAgentName = getStartOfTurnAgentName(logger, messages, agentConfig, pipelineConfig, workflow); logger.log(`🎯 START AGENT DECISION: ${startOfTurnAgentName}`); - // Additional safety check - if startOfTurnAgentName is empty or invalid, return no-agent message - if (!startOfTurnAgentName || !agentConfig[startOfTurnAgentName]) { - logger.log(`invalid start agent name: ${startOfTurnAgentName}, emitting no-agent message`); - - // emit no-agent message - yield* emitEvent(logger, { - role: 'assistant', - content: 'Hi! To get started with chatting with your Assistant please create an agent first!', - agentName: 'System', - responseType: 'external', - }); - return; - } - let agentName: string | null = startOfTurnAgentName; // start the turn loop