Mikyo King, head of open source at Arize AI, explains Phoenix’s code-mode architecture in this 14:38 AI Engineer talk.

Discover tools, then compose them

  • A large tool catalog and repeated raw results consume the model’s working context.
  • Code mode gives the agent tool discovery plus a programming environment for calling those tools.
  • Generated code can sequence calls, run independent work in parallel, filter results and return a compact answer.
  • The agent can also write task-specific helpers, such as a transformation for redacting sensitive records.

Phoenix uses several execution surfaces

  • Bash combines command-line tools and saves intermediate results in files.
  • A Python sandbox exposes the platform’s create, read, update and delete operations.
  • SQL handles targeted searches and aggregates without paging every trace through the model.
  • A browser web worker can interact with application state and change controls such as the selected time range.

Execution needs boundaries

  • Bound CPU, memory and sandbox lifetimes; handle startup failures and partial executions.
  • Restrict network access, protect credentials and check permissions across composed operations.
  • Keep secrets and unnecessary sensitive output out of the model’s context.
  • Nested code-mode environments add serialization, parsing and debugging overhead.
  • Mid-program recovery, binary-artifact handoff and smaller-model reliability remain open problems in King’s account.

Test the whole task

  • Arize uses Harbor, a framework for running agents in isolated task environments, with task-specific outcome checks.
  • King describes repeated trials with network access disabled, plus recorded execution paths for investigating failures.
  • Arize reports 43% fewer tokens and 31% lower cost after code mode, with roughly unchanged latency.
  • The talk leaves the comparison’s task count, model mix and success-rate detail unspecified; these are vendor-reported results for its setup.

“You can call multiple tools in one turn, and also return only what’s necessary.” — Mikyo King, 03:38