Agent Creation
- TypeScript
- Python
Agent Configuration
AI provider for agent functionality.Options:
"anthropic"
, "openai"
Specific model for agent execution.Anthropic:
"claude-sonnet-4-20250514"
, "claude-3-5-sonnet-20241022"
OpenAI: "computer-use-preview"
, "gpt-4o"
System instructions defining agent behavior.
Provider-specific configuration.Common:
apiKey
, baseURL
, organization
MCP (Model Context Protocol) integrations for external tools and services.Array of: MCP server URLs (strings) or connected Client objects
Custom tool definitions to extend agent capabilities.Format: Object with tool name keys and tool definition values
Execute Method
- TypeScript
- Python
Execute Parameters
High-level task description in natural language.
Maximum number of actions the agent can take.Default:
20
Whether to take screenshots before each action.Default:
true
Delay in milliseconds between actions.Default:
0
Additional context or constraints for the agent.
Response
Returns:Promise<AgentResult>
AgentResult Interface:
- TypeScript
- Python
Whether the task was completed successfully.
Description of the execution result and status.
Array of individual actions taken during execution.
Whether the agent believes the task is fully complete.
Additional execution metadata and debugging information.
Token usage and performance metrics.