Start a run
Retrieve or assemble an agent, then pass a task toagent.run():
run.id to identify it:
Define the task
A task contains instructions and the resources the agent should work on.
The same task can include targets and vulnerabilities. For example, verification instructions can ask an agent to retest a vulnerability against a specific approved target.
Task instructions apply to that run. Use skills for procedures and knowledge you want to reuse across runs, and guardrails for constraints on the agent’s behavior.
Work on a vulnerability
Retrieve the vulnerability and include it in the task. This example asks the pre-built remediation-agent to prepare a fix:Follow progress
The Run object is an async iterable. Iterate over it to receive events as the agent works:run.wait() resolves when the run completes. If the run fails, it throws an error with the failure details. If the run is stopped, it throws an error indicating that the run was stopped.
Vulnerabilities and evidence already saved remain available even if the run fails or stops.