AgentToolsAgent::sendProviderRequest()
Send request to agent using an AgentToolsRequest object (advanced)
Prefer this over sendRequest() for new code — the request object is self-documenting, hookable, and extensible without signature changes.
Example
$request = new AgentToolsRequest($agent);
$request->systemPrompt = 'You are a concise assistant.';
$request->messages = [['role' => 'user', 'content' => 'List templates.']];
$request->options = ['openai' => ['reasoning_effort' => 'high']];
$response = $agent->sendProviderRequest($request);Usage
$array = $agentToolsAgent->sendProviderRequest(AgentToolsRequest $request);Arguments
| Name | Type(s) | Description |
|---|---|---|
$request | AgentToolsRequest |
Return value
arrayRaw provider response — check provider docs for structure
AgentToolsAgent methods and properties
API reference based on ProcessWire core version 3.0.263