Skip to content

Conversation

@zhangzx-uiuc
Copy link

@zhangzx-uiuc zhangzx-uiuc commented Feb 10, 2026

Supporting Async CodeInterpreterToolkit

This PR updates the existing synchronous CodeInterpreterToolkit to an async implementation.

At the moment, aioboto3 does not support BedrockAgentCore. As a temporary solution, we wrap the synchronous Code Interpreter and terminal execution logic using asyncio.to_thread, exposing an async interface while preserving existing behavior. This allows the toolkit to integrate cleanly with async agent pipelines without blocking the event loop.


Testing

We tested the async implementation on AIME-2024 using Qwen3-8B, hosted on a single H200 node.

Command used:

strands-env eval aime-2024 \
    --env examples/eval/aime_code/code_sandbox_env.py \
    --backend sglang \
    --base-url http://localhost:30000 \
    --n-samples-per-prompt 1 \
    --temperature 0.0 \
    --max-concurrency 30

Results

Version Running Time Performance
Async 193s 53.3%
Sync 205s 53.3%

Summary

  • The async implementation is slightly faster than the synchronous version under this setting.
  • While the AIME evaluation set is relatively small, the async design is expected to yield larger efficiency gains in large-scale coding agent training and higher-concurrency scenarios.

Copy link
Author

@zhangzx-uiuc zhangzx-uiuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi team, please review this PR to enable async code interpreter toolkit. Feel free to leave any comments and suggestions. Thanks!

@Lawhy Lawhy requested review from Lawhy and removed request for Lawhy February 10, 2026 22:32
@Lawhy Lawhy self-assigned this Feb 10, 2026
@Lawhy Lawhy added the enhancement New feature or request label Feb 10, 2026
@zhangzx-uiuc zhangzx-uiuc force-pushed the refactor/async_code_interpreter branch from 5b743d0 to e8948e8 Compare February 10, 2026 22:37
@zhangzx-uiuc zhangzx-uiuc marked this pull request as ready for review February 10, 2026 22:39
@Lawhy Lawhy merged commit 17bbbca into horizon-rl:main Feb 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants