Skip to main content

Module worker

Module worker 

Source
Expand description

A2A Worker - connects to an A2A server to process tasks

Structs§

CognitionHeartbeatConfig
HeartbeatState
Heartbeat state shared between the heartbeat task and the main worker

Enums§

AutoApprove
Approval policy used by the worker when deciding whether to execute tools automatically.
WorkerStatus
Worker status for heartbeat

Constants§

DEFAULT_A2A_SERVER_URL
Default A2A server URL when none is configured

Functions§

generate_worker_id
register_worker
run
run_with_state
Run the A2A worker with shared state for HTTP server integration This variant accepts a WorkerServerState to communicate with the HTTP server
start_heartbeat
Start the heartbeat background task Returns a JoinHandle that can be used to cancel the heartbeat