Isorun Docs
Integrations

CrewAI

Run agent code inside Isorun sandboxes from CrewAI tasks.

Preview. CrewAI is a Python framework, and the drop-in tools below will ship with the Isorun Python SDK (in development).

Terminal
pip install isorun[crewai]   # coming soon

The integration ships two CrewAI-native tools:

  • IsorunCodeInterpreterTool - runs Python in a Firecracker microVM
  • IsorunShellTool (alias IsorunSandboxTool) - runs shell commands

Both tools follow the standard CrewAI BaseTool shape and cache one sandbox per tool instance.

Example crew

Python
from crewai import Agent, Task, Crew
from isorun.integrations.crewai import IsorunCodeInterpreterTool, IsorunShellTool

code  = IsorunCodeInterpreterTool()
shell = IsorunShellTool()

researcher = Agent(
    role="Data scientist",
    goal="Analyze the user's data and produce findings.",
    backstory="You're an experienced analyst who runs everything in a sandbox.",
    tools=[code, shell],
)

task = Task(
    description=(
        "Download the latest IMDB top-100 dataset, compute the average rating "
        "by decade, and report the decade with the highest average."
    ),
    expected_output="A short paragraph with the decade and the average rating.",
    agent=researcher,
)

try:
    Crew(agents=[researcher], tasks=[task]).kickoff()
finally:
    code.close()
    shell.close()

Tool lifecycle

Each tool instance owns one sandbox. The sandbox is created lazily on first call and destroyed when you call tool.close() (or use the tool as a context manager). The tool resets the sandbox's idle timer on every call so it stays alive across multiple agent turns.

Tip

If your crew's agents need to share state, files, installed packages, in-memory caches, give them the same tool instance. For isolation, give each agent its own tool instance.

Next steps

On this page