You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -76,7 +82,9 @@ In code, this breaks down into three phases :
76
82
77
83
The key insight is that we use the same AI model for both phases. What changes is the system prompt we give it. The AI does not "know" it is an agent. We create that behavior through prompt design.
@@ -98,7 +106,9 @@ AI models do not process words, they process tokens. A token is roughly three qu
98
106
99
107
An environment variable is a value stored in your operating system, outside of your code. We use one called `ANTHROPIC_API_KEY` to store the API key. This is the standard practice for secrets. If you write the key directly in your Python file and push it to GitHub, it becomes public. Environment variables prevent that.
@@ -280,7 +298,9 @@ Notice that the whole system makes N+1 API calls where N is the number of steps
280
298
281
299
More advanced agents add memory (storing past actions), tool use (calling external APIs), and error recovery (retrying failed steps). Those are the next things to explore once you understand this baseline.
This project is licensed under the MIT License. See [LICENSE](LICENSE) for the full text.
333
357
334
358
MIT means : you can use, copy, modify, and distribute this code freely, for any purpose, as long as you include the original license notice. You do not need to ask permission.
0 commit comments