HTTP-based agent for connecting to remote AI agents
HttpAgent
extends AbstractAgent
to provide HTTP-based connectivity to
remote AI agents. It handles the request/response cycle and transforms the HTTP
event stream into standard Agent User Interaction Protocol events.
HttpAgentConfig
object:
parameters
argument follows the standard RunAgentParameters
interface.
The optional subscriber
parameter allows you to provide an
AgentSubscriber for handling events during this
specific run.
unsubscribe()
method to remove the subscriber when
no longer needed.
run()
method from AbstractAgent
using HTTP requests.
url
: The endpoint URL for the agent serviceheaders
: HTTP headers to include with requestsabortController
: AbortController instance for request cancellation