smolagents makes code an action—and execution a choice
Tool composition becomes more flexible, while the executor still determines access to the surrounding environment.
CodeAgent in smolagents can emit code that combines tools, conditions and loops, rather than requesting each tool through a separate structured message. That changes what the executor must run. This is the architecture described in the documentation, not a new-release announcement.
That difference is useful when a task calls for composing operations. Code can organize a sequence rather than representing every decision as an isolated tool call. The framework also offers ToolCallingAgent for a different interaction style, so adopting the project does not require every application to use code-based actions.
The important deployment decision is the executor. The documentation describes execution options and isolated environments, but generated code does not become safe simply because a familiar framework produced it. File access, network access and credentials remain properties of the environment and permissions supplied.
Define the operations before choosing the executor, then check representative tasks and tool failures against that boundary. Generated code runs with the file, network and credential access supplied by its environment. The remaining engineering decision is which execution option permits the required composition while keeping resources outside that task out of reach.