[FEATURE] Support offline custom dependencies for Code Interpreter sessions

Open
#657 0 comments 6 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start with the Code Interpreter session-creation path and the SDK's install_packages() helper, then compare how filesystemConfigurations are passed to sessions. Done means applications can declare an offline dependency configuration, sessions initialize it without public package-index access, and initialization failures are surfaced before agent code runs.

Written by the indexing model from the issue text.

Description

enhancement

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:

client.start(
    identifier=interpreter_id,
    filesystem_configurations=[dependency_mount],
    dependency_configuration={
        "python": {
            "requirementsPath": "/mnt/dependencies/requirements.txt",
            "wheelhousePath": "/mnt/dependencies/wheels",
            "offline": True,
        }
    },
)
Dominant language
Python
Stars
786
Forks
163
Avg merge
4h
Merged PRs (30d)
22

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws/bedrock-agentcore-sdk-python

All issues in aws/bedrock-agentcore-sdk-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.