aws / aws/bedrock-agentcore-sdk-python

[FEATURE] Support offline custom dependencies for Code Interpreter sessions

オープン
#657 コメント 0 件 リアクション 4 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Python
スター
761
フォーク
147
平均マージ
1日 23時間
マージ済み PR(30日)
7

説明

**Is your feature request related to a problem? Please describe.**

AgentCore Code Interpreter provides a fixed set of pre-installed libraries. The
SDK's `install_packages()` helper runs a normal `pip install`, which requires
access to PyPI or another package index.

Code Interpreter sessions running in an isolated VPC without NAT cannot use
this mechanism. Enabling public internet access solely to install dependencies
increases cost and weakens the sandbox's network isolation.

Code Interpreter supports mounting S3 Files and EFS through
`filesystemConfigurations`, but there is no first-class way to declare an
offline dependency bundle or initialization step. Applications must currently:

1. Mount or upload a wheelhouse.
2. Execute `pip install --no-index` manually after every session starts.
3. Configure `sys.path` and `PYTHONPATH` separately for `executeCode` and
`executeCommand`.
4. Detect initialization failures themselves before allowing agent code to run.

This creates duplicated bootstrap logic and makes session readiness ambiguous.

**Describe the solution you'd like**

Add first-class support for application-defined, offline dependencies when
creating a Code Interpreter or starting a session.

One possible API shape would be:

```python
client.start(
identifier=interpreter_id,
filesystem_configurations=[dependency_mount],
dependency_configuration={
"python": {
"requirementsPath": "/mnt/dependencies/requirements.txt",
"wheelhousePath": "/mnt/dependencies/wheels",
"offline": True,
}
},
)

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Code Interpreter のセッション作成パスと SDK の install_packages() ヘルパーから始め、filesystemConfigurations がセッションにどのように渡されるかを比較します。アプリケーションでオフラインの依存関係設定を宣言でき、セッションが公開パッケージインデックスにアクセスせずにそれを初期化し、エージェントコードの実行前に初期化の失敗が通知されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
backend
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。