Skip to content

feat(tools): support IPython persistent shell for variable sharing#240

Merged
Lightblues merged 2 commits intomainfrom
feat/ipython
Feb 3, 2026
Merged

feat(tools): support IPython persistent shell for variable sharing#240
Lightblues merged 2 commits intomainfrom
feat/ipython

Conversation

@Lightblues
Copy link
Collaborator

Summary

  • Add persistent IPython shell instance in PythonExecutorToolkit for local mode
  • Enable variable sharing across multiple code executions
  • Provide true interactive IPython experience with stateful execution

Changes

  • Modified utu/tools/local_env/python.py:
    • Added create_ipython_shell() and cleanup_ipython_shell() helper functions
    • Updated execute_python_code_sync() to support optional shell parameter for reuse
    • Updated execute_python_code_async() to pass shell instance through
  • Modified utu/tools/python_executor_toolkit.py:
    • Added _ipython_shell instance variable to maintain persistent shell in local mode
    • Updated execute_python_code() to pass shell instance for variable sharing
    • Added cleanup() method to properly clean up shell resources
  • Added comprehensive tests in tests/tools/test_python_executor_toolkit.py

Closes #239

@Lightblues Lightblues merged commit 608615b into main Feb 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: support IPython persistent shell for variable sharing | easons_agent

1 participant