Skip to content

Commit e21025b

Browse files
committed
Add System Prompt Override to agent call
1 parent d604d5b commit e21025b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/agent-sdk/src/autonomous.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export interface ChatMessage {
2626
export interface ChatConfig {
2727
mode: "debug" | "production";
2828
agentId: string;
29+
promptOverride?: string;
2930
}
3031

3132
export interface ChatPayload {
@@ -45,6 +46,7 @@ export async function callAgent<T = Record<string, unknown>>(
4546
evmAddress: string = "",
4647
suiAddress: string = "",
4748
solanaAddress: string = "",
49+
systemPrompt?: string,
4850
): Promise<AgentResponse<T>> {
4951
const chatId = `chat_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
5052

@@ -61,7 +63,11 @@ export async function callAgent<T = Record<string, unknown>>(
6163
messageId: Math.random().toString(36).substr(2, 9),
6264
},
6365
],
64-
config: { mode: "debug", agentId },
66+
config: {
67+
mode: "debug",
68+
agentId,
69+
...(systemPrompt ? { promptOverride: systemPrompt } : {}),
70+
},
6571
};
6672

6773
const response = await fetch(BITTE_API_URL, {

0 commit comments

Comments
 (0)