1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: "Basic Agent Tool Usage"
description: "Verify agent uses write_file to create a file via mock LLM."
sequential: true
setup:
- name: "Prepare workspace + RECURSIVE_HOME"
exec:
container: recursive-e2e
command: |
rm -rf /workspace/test-01
rm -rf /tmp/recursive-home-01
rm -rf /tmp/sessions-01
mkdir -p /workspace/test-01
mkdir -p /tmp/recursive-home-01
echo prepared
- name: "Run agent (act): create hello.txt via write_file"
exec:
container: recursive-e2e
command: |
unset RECURSIVE_SESSIONS_DIR # container-wide override would write the session outside RECURSIVE_HOME
RECURSIVE_HOME=/tmp/recursive-home-01 \
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."
SESSION_DIR=$(find /tmp/recursive-home-01 -name '.meta.json' -exec dirname {} \; 2>/dev/null | head -1)
if [ -n "$SESSION_DIR" ]; then
mkdir -p /tmp/sessions-01
cp -r "$SESSION_DIR/." /tmp/sessions-01/
fi
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: /tmp/sessions-01
status:
hasRoles:
hasToolCalls:
minMessages: 3
teardown:
- name: "Clean workspace + RECURSIVE_HOME + session copy"
ignoreError: true
exec:
container: recursive-e2e
command: |
rm -rf /workspace/test-01
rm -rf /tmp/recursive-home-01
rm -rf /tmp/sessions-01