from raysurfer import AsyncRaySurfer
rs = AsyncRaySurfer()
# First call — agent creates files from scratch
response = await rs.chat(
"Create hello.py with a greet(name) function",
user="user-123",
org="acme-corp",
)
print(response.output)
print(response.changed_files) # ["hello.py"]
# Second call — agent sees hello.py already in its workspace
response = await rs.chat(
"Import greet from hello.py and create main.py",
user="user-123",
org="acme-corp",
)
print(response.workspace_files) # ["hello.py", "main.py"]