aws / aws/bedrock-agentcore-sdk-python

[FEATURE] Support offline custom dependencies for Code Interpreter sessions

Abierto
#657 0 comentarios 4 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Python
Estrellas
761
Forks
147
Merge medio
1 d 23 h
PR fusionados (30 d)
7

Descripción

**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,
}
},
)

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con el flujo de creación de sesiones de Code Interpreter y el helper install_packages() del SDK, y compara después cómo se pasan filesystemConfigurations a las sesiones. El trabajo estará terminado cuando las aplicaciones puedan declarar una configuración de dependencias sin conexión, las sesiones la inicialicen sin acceso a índices de paquetes públicos y los fallos de inicialización se notifiquen antes de que se ejecute el código del agente.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
backend
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.