name: "Basic Agent Tool Usage"
description: "Verify agent uses write_file to create a file via mock LLM."
sequential: true
setup:
- name: "Prepare workspace"
exec:
container: recursive-e2e
command: |
rm -rf /workspace/test-01
mkdir -p /workspace/test-01
echo prepared
- name: "Run agent (act): create hello.txt via write_file"
exec:
container: recursive-e2e
command: >
recursive --workspace /workspace/test-01
--api-base http://aimock:4010/v1
--api-key mock-key
-m mock-chat
--max-steps 10
run "Create a file called hello.txt in the workspace root with exactly the content 'world'. Use write_file tool. Do NOT use any other tool after that."
cases:
- name: "hello.txt exists with content 'world'"
file:
container: recursive-e2e
path: /workspace/test-01/hello.txt
exists: true
contains: "world"
- name: "Session is valid and recorded write_file"
recursive-session:
container: recursive-e2e
input: /workspace/test-01/.recursive/sessions
status: ["completed", "success"]
hasRoles: ["user", "assistant"]
hasToolCalls: ["write_file"]
minMessages: 3
teardown:
- name: "Clean workspace"
ignoreError: true
exec:
container: recursive-e2e
command: rm -rf /workspace/test-01