# Problem in AI Agents course - Smolagents

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fproblem-in-ai-agents-course-smolagents%2F151299%3E%5C
**Category:** Beginners\
**Created:** [April 19, 2025, 1:57pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fproblem-in-ai-agents-course-smolagents%2F151299 "2025-04-19T13:57:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbkaracan](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sbkaracan/32/45888_2.png) [@sbkaracan](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsbkaracan)%5C
**Post date:** [April 19, 2025, 1:57pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fproblem-in-ai-agents-course-smolagents%2F151299%2F1 "2025-04-19T13:57:53Z")

</div>

When I am trying to duplicate and build the Let’s Create Our First Agent Using smolagents’ template, I get this error:  
runtime error  
Exit code: 1. Reason:

tool.py: 0%| | 0.00/635 [00:00\<?, ?B/s]e[A  
tool.py: 100%|██████████| 635/635 [00:00\<00:00, 3.55MB/s]  
Traceback (most recent call last):  
File “/home/user/app/app.py”, line 56, in   
agent = CodeAgent(  
File “/usr/local/lib/python3.10/site-packages/smolagents/agents.py”, line 1204, in **init**  
super(). **init** (  
File “/usr/local/lib/python3.10/site-packages/smolagents/agents.py”, line 207, in **init**  
assert not missing\_keys, (  
AssertionError: Some prompt templates are missing from your custom `prompt_templates`: {‘final\_answer’}

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [April 20, 2025, 1:59am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fproblem-in-ai-agents-course-smolagents%2F151299%2F2 "2025-04-20T01:59:11Z")

</div>

The new version of smolagents seems to have a bug. Change it like this and it should work.

**requirements.txt**

```auto
markdownify
smolagents==1.13.0
requests
duckduckgo_search
pandas

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsystem)%5C
**Post date:** [April 20, 2025, 2:00pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fproblem-in-ai-agents-course-smolagents%2F151299%2F3 "2025-04-20T14:00:03Z")

</div>

Closed on April 20, 2025, 2:00pm UTC

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
