AgentToolsRequest
Agent Tools Request
Encapsulates all parameters for a single provider request. Pass an instance
to AgentToolsAgent::sendProviderRequest() or AgentToolsEngineer::sendProviderRequest().
$agent = $at->getPrimaryAgent();
create a new request
$request = new AgentToolsRequest($agent);
$request->systemPrompt = 'You are a concise assistant.';
$request->messages = [['role' => 'user', 'content' => 'List the top 3 templates.']];
$request->options = ['openai' => ['reasoning_effort' => 'high']];
send the request and get a response
$response = $agent->sendProviderRequest($request); Hook example — modify the request before dispatch:
$wire->addHookBefore('AgentToolsEngineer::sendProviderRequest', function(HookEvent $e) {
$request = $e->arguments(0); // AgentToolsRequest
$request->options['openai']['temperature'] = 0.2;
}); Copyright 2026 Ryan Cramer and Claude (Anthropic) | MIT
Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the Agent class also inherits all the methods and properties of: WireData and Wire.
Common
| Name | Return | Summary | |
|---|---|---|---|
Agent Agent Agent | AgentToolsAgent null | Get the agent this request was populated from, if any | |
Agent Agent Agent | Wire | Set a property, normalizing 'endpointUrl' to 'endpoint' for AgentToolsAgent compatibility | |
Agent Agent Agent | self | Populate connection properties from an AgentToolsAgent |
Properties
| Name | Return | Summary | |
|---|---|---|---|
| Agent | string | API key for the provider | |
| Agent | string | Base endpoint URL (OpenAI-compatible providers only) | |
| Agent | array | Array of message objects: [['role' => 'user'|'assistant', 'content' => '...'], ...] | |
| Agent | string | Model ID to use | |
| Agent | array | Request options: timeout (int), anthropic (array), openai (array) | |
| Agent | string | Provider name: 'anthropic' or 'openai' | |
| Agent | string | System prompt, or empty string for none | |
| Agent | array | Tool definitions in provider format |
Additional methods and properties
In addition to the methods and properties above, Agent
API reference based on ProcessWire core version 3.0.263