Skip to content

Commit c648e16

Browse files
committed
Add System Prompt Override to agent call
1 parent 39b0f57 commit c648e16

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

bun.lock

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,5 @@
2929
"prettier": "^3.6.2",
3030
"ts-jest": "^29.4.1",
3131
"typescript": "^5.9.2"
32-
},
33-
"dependencies": {
34-
"@bitte/core": "."
3532
}
3633
}

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)