The application provides a task execution method for an agent, an agent, a device, a medium and a product, wherein the task execution method for the agent comprises: in response to receiving an evidence task
package, generating an original plan based on the evidence task
package and a corresponding formal constraint specification, and compiling the original plan into a structured
execution plan; performing static
verification on the structured
execution plan based on the formal constraint specification; after the static
verification is passed, scheduling the execution of the structured
execution plan; recording evidence information during the execution of the structured execution plan, and outputting a task execution result comprising the evidence information. The above scheme defines a
decision boundary through the formal constraint specification, cooperates with the compiled structured execution plan and the pre-execution
verification mechanism, converts the agent from an open free reasoning mode to a constrained verifiable execution mode, improves the flexibility of task execution, and ensures that the execution process conforms to the predetermined
safety policy.