Skip to content

Commit a2052f0

Browse files
authored
Add default context resolution for custom agents (#15571)
* Add default context resolution for custom agents
1 parent 4963312 commit a2052f0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

packages/ai-core/src/browser/frontend-prompt-customization-service.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,17 @@ const templateEntry = {
3030
id: 'my_agent',
3131
name: 'My Agent',
3232
description: 'This is an example agent. Please adapt the properties to fit your needs.',
33-
prompt: 'You are an example agent. Be nice and helpful to the user.',
33+
prompt: `{{!-- Note: The context section below will resolve all context elements (e.g. files) to their full content
34+
in the system prompt. Context elements can be added by the user in the default chat view (e.g. via DnD or the "+" button).
35+
If you want a more fine-grained, on demand resolvement of context elements, you can also resolve files to their paths only
36+
and equip the agent with functions so that the LLM can retrieve files on demand. See the Coder Agent prompt for an example.--}}
37+
38+
# Role
39+
You are an example agent. Be nice and helpful to the user.
40+
41+
## Current Context
42+
Some files and other pieces of data may have been added by the user to the context of the chat. If any have, the details can be found below.
43+
{{contextDetails}}`,
3444
defaultLLM: 'openai/gpt-4o'
3545
};
3646

0 commit comments

Comments
 (0)