Add instructions kwarg to docs

This commit is contained in:
Dillon DuPont
2025-10-20 10:26:42 -04:00
parent 5c2bb2e54c
commit 517d641cc1

View File

@@ -136,6 +136,8 @@ The `ComputerAgent` constructor provides a wide range of options for customizing
Enables prompt caching for repeated prompts (mainly for Anthropic models).
- `max_trajectory_budget` (`float` | `dict`):
If set (float or dict), adds a budget manager callback that tracks usage costs and stops execution if the budget is exceeded. Dict allows advanced options (e.g., `{ "max_budget": 5.0, "raise_error": True }`).
- `instructions` (`str` | `list[str]`):
System instructions for the agent. Can be a single string or multiple strings in a tuple/list for readability; they are concatenated into one system prompt.
- `**kwargs` (`any`):
Any additional keyword arguments are passed through to the agent loop or model provider.
@@ -156,7 +158,11 @@ agent = ComputerAgent(
max_retries=5,
screenshot_delay=1.0,
use_prompt_caching=True,
max_trajectory_budget={"max_budget": 5.0, "raise_error": True}
max_trajectory_budget={"max_budget": 5.0, "raise_error": True},
instructions=(
"You are a helpful computer-using agent"
"Output computer calls until you complete the given task"
)
)
```