If you want to overwrite the run prompt template, you can do as follows: template = """ [] """ agent = HfAgent(your_endpoint, run_prompt_template=template) Please make sure to have the <> string and the <> defined somewhere in the template so that the agent can be aware of the tools, it has available to it as well as correctly insert the user's prompt.