Skip to main content
Guardrails specify constraints on an agent’s behavior. Use them to identify actions it should avoid, conditions that should stop its work, or situations that require help from your team. Pass guardrails as a string in the agent’s configuration. The agent interprets these instructions while it works.

Set guardrails

This example keeps tCell’s configuration and adds constraints for testing your application:
Combining the existing guardrails with your instructions preserves the constraints exposed in the original configuration. Passing a new string without the existing value replaces those configurable guardrails.

Write specific constraints

Describe the action or condition and what the agent should do in response. Guardrails can apply to offensive testing, triage, or remediation. Choose instructions that match the work your agent performs. Use skills to explain procedures and provide context. Use guardrails to constrain how the agent carries out that work.

Update saved guardrails

Use antigen.agents.update() to change a registered agent’s guardrails. The string you provide becomes its saved value.

Add constraints

Retrieve the agent and combine its existing guardrails with the new instructions:

Replace the guardrails

Pass a new string containing the configurable guardrails you want the agent to use:
Replacing this field changes the configurable instructions. It does not remove a pre-built agent’s internal restrictions or the platform’s enforced controls.

Guardrails and enforced restrictions

Guardrails guide the agent through natural-language instructions. They are not a substitute for access controls or isolation. Target approval and sandbox restrictions are enforced separately. A guardrail cannot authorize testing an unapproved target or grant access the agent does not have.