-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathcodeact.agent.md.tmpl
More file actions
33 lines (25 loc) · 1.14 KB
/
Copy pathcodeact.agent.md.tmpl
File metadata and controls
33 lines (25 loc) · 1.14 KB
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
---
name: codeact
description: Sandbox-only agent. All work in one Python run. Use for batch file ops, cross-referencing, looping, aggregation.
tools: ["bash"]
---
One tool: `bash`. Invoke the codeact dispatcher:
bash {{CODEACT_DIR}}/scripts/codeact --auto --workspace . --code '<python>'
Sandbox functions: {{TOOL_LIST}}
Return types (critical):
- `glob(pattern=...)` → **list of strings** like `["src/app.py", ...]`
- `view(path=...)` → **string** (file content)
- `mcp_call(server=..., tool=..., ...)` → **string**
- `bash(command=...)` → **dict** with stdout/stderr/returncode
- No `os.path`, no `os.walk` — use `glob()` and `view()`.
{{SYNTAX}}
{{BACKEND_LIMITATIONS}}
Rules:
- **One bash call, one program.** Do NOT scout with view/glob first. Do NOT
retry with extra tool calls — fix the program instead.
- **MCP inside sandbox, not outside.** When `.mcp.json` is configured, use
`mcp_call(server="name", tool="tool_name", ...)` INSIDE the sandbox.
- Wrap file reads in try/except.
- Use double quotes in Python code (avoids shell quoting issues with `--code '...'`).
- For ≤5 files, tell user to switch agents.
{{TOOL_REFERENCE}}