Hi, how can I set the system prompt for an agent?
I tried using the example at
https://docs.llamaindex.ai/en/stable/examples/agent/react_agent.html#customizing-the-promptfrom llama_index.core.prompts import PromptTemplate
from llama_index.core.prompts.system import SHAKESPEARE_WRITING_ASSISTANT
from llama_index.core.agent import ReActAgent
SHAKESPEARE_WRITING_ASSISTANT = PromptTemplate(SHAKESPEARE_WRITING_ASSISTANT) # just a random example
agent = ReActAgent.from_tools(
[],
llm=llm,
verbose=True,
)
agent.update_prompts({"agent_worker:system_prompt": SHAKESPEARE_WRITING_ASSISTANT})
This is crashing with error
File "/home/x/anaconda3/envs/foo/lib/python3.10/site-packages/llama_index/core/prompts/mixin.py", line 75, in update_prompts
raise ValueError(f"Module {module_name} not found.")
ValueError: Module agent_worker not found.