Inspect Swe is a library for software engineering agents, built on top of Inspect AI. It provides tools and workflows for creating AI agents that can interact with code, run tests, and perform software engineering tasks. Version 0.2.50 is current, with active development.
pip install inspect-sweVerified import paths — ran on the pinned version, not inferred.
Basic usage: create a SweAgent and run it on a simple coding task.
Change SweAgent(model='gpt-4') to SweAgent(config=SweConfig(model='gpt-4'))
Replace agent.run(task) with agent.solve(task) or agent.execute(task)
Ensure Docker Desktop or daemon is running before creating SweEnvironment.
Use 'persistent' backend if state across tasks is needed.