Skip to content

Commit 76761e8

Browse files
committed
Don't require a system prompt
1 parent e167359 commit 76761e8

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

backend/src/run-agent-step.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -322,16 +322,14 @@ export const runAgentStep = async (
322322

323323
const iterationNum = agentState.messageHistory.length
324324

325-
const system = await getAgentPrompt(
326-
agentTemplate,
327-
{ type: 'systemPrompt' },
328-
fileContext,
329-
agentState,
330-
agentRegistry
331-
)
332-
if (!system) {
333-
throw new Error(`System prompt is required for agent type: ${agentType}`)
334-
}
325+
const system =
326+
(await getAgentPrompt(
327+
agentTemplate,
328+
{ type: 'systemPrompt' },
329+
fileContext,
330+
agentState,
331+
agentRegistry
332+
)) ?? ''
335333
const systemTokens = countTokensJson(system)
336334

337335
// Possibly truncated messagesWithUserMessage + cache.

0 commit comments

Comments
 (0)