from agents import Agent, ApplyPatchTool, Runner, ShellTool
from mirage import MountMode, Workspace
from mirage.agents.openai_agents import (
MirageEditor,
MirageShellExecutor,
build_system_prompt,
)
from mirage.resource.ram import RAMResource
ws = Workspace({"/": RAMResource()}, mode=MountMode.WRITE)
agent = Agent(
name="Mirage RAM Agent",
model="gpt-5.5-mini",
instructions=build_system_prompt(
mount_info={"/": "In-memory filesystem (read/write)"},
),
tools=[
ShellTool(executor=MirageShellExecutor(ws)),
ApplyPatchTool(editor=MirageEditor(ws)),
],
)