Skip to content

Commit c648e16

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

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

bun.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
"workspaces": {
44
"": {
55
"name": "@bitte/core",
6-
"dependencies": {
7-
"@bitte/core": ".",
8-
},
96
"devDependencies": {
107
"@duneanalytics/client-sdk": "^0.2.5",
118
"@types/bun": "latest",
@@ -107,8 +104,6 @@
107104

108105
"@bitte-ai/agent-sdk": ["@bitte-ai/agent-sdk@workspace:packages/agent-sdk"],
109106

110-
"@bitte/core": ["@bitte/core@file:", { "devDependencies": { "@duneanalytics/client-sdk": "^0.2.5", "@types/bun": "latest", "@types/jest": "^30.0.0", "@typescript-eslint/eslint-plugin": "^8.43.0", "@typescript-eslint/parser": "^8.43.0", "csv-parser": "^3.2.0", "dotenv": "^17.2.2", "eslint": "^9.35.0", "jest": "^30.1.3", "next": "^15.5.2", "prettier": "^3.6.2", "ts-jest": "^29.4.1", "typescript": "^5.9.2" } }],
111-
112107
"@duneanalytics/client-sdk": ["@duneanalytics/client-sdk@0.2.5", "", { "dependencies": { "deprecated": "^0.0.2", "loglevel": "^1.8.0" } }, "sha512-ftE9sLIuzcxX0g9nhOA0pN/uxTvPwa88CVXpgU2sSRGnN43Kb5ZuaexetVNcNidapdIV95bWW+VpnoSvpMJUXw=="],
113108

114109
"@emnapi/core": ["@emnapi/core@1.4.3", "", { "dependencies": { "@emnapi/wasi-threads": "1.0.2", "tslib": "^2.4.0" } }, "sha512-4m62DuCE07lw01soJwPiBGC0nAww0Q+RY70VZ+n49yDIO13yyinhbWCeNnaob0lakDtWQzSdtNWzJeOJt2ma+g=="],

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)