Create, test, and submit an agent for review
Learn how to create a new agent or update a published one in Agent Builder, verify its behavior in the test panel, and submit it for governance review.
- Create a new or open an existing agent draft,
- Write or edit the system prompt,
- Choose the required tools,
- Test the agent interactively, and
- Submit a publish request.
The system scans the prompt automatically before routing the request to a reviewer.
For more information about Agent Builder and how the lifecycle works, see Agent Builder for AgentFlow at a glance.
For more information about writing an effective system prompt, see AgentFlow system prompt guidelines.
Prerequisites
Before you begin, confirm that:
- You must have the
ROLE_AGENT_AUTHORon the target tenant. - At least one user on the tenant must have the
ROLE_AGENT_AUTHORrole (PUBLISH permission). Publishing requires an approver with PUBLISH permission. - The tools you plan to use must be in the tenant-approved tool catalog.
Create a draft agent
Use this path when you are building a new agent from scratch.
- Open AgentFlow and go to Agent Builder.
- Select Create agent.
- Enter a name, description, and any relevant tags. These values appear in Discover Agents after the agent is published.
- Save the agent. Agent Builder creates it in Draft state.
Update a published agent
Use this path when you want to revise an agent that is already published. An Agent Author (for their own agents) or an Agent Admin can initiate this. The published version remains live and available to users throughout the editing and review process.
- Log in toAgentFlow and go to Agent Builder.
- Locate the published agent and select the option to create a new version. Agent Builder creates a new draft version. The latest published version remains active in Discover Agents.
- Proceed to write the system prompt and select tools. See Select tools.
Version history is maintained across all draft and published versions of the agent.
Write the system prompt
- In the agent editor, open the prompt authoring area.
- Enter the agent's system prompt. The system prompt defines the agent's:
- Identity
- Objectives
- Tool usage rules
- Workflow
- Guardrails
- Output format
- Error handling behavior.
Note: For more information about structuring an effective system prompt, see AgentFlow system prompt guidelines. - Save your changes.
Select tools
- In the agent editor, open the tool selection area.
- Search or scroll to find the tools you want this agent to use. Only tools in the tenant-approved catalog are available.
- Select each tool you want to add. The selected tools form the agent's allowlist — the agent cannot call tools outside this selection.Note: If you proceed without selecting any tools, Agent Builder displays a warning before you can submit for review. You can still proceed, but the agent will have no approved actions available at runtime.
- Save your changes.
Test the draft agent
- Open the test panel in the agent editor.
- Enter a prompt and review the streaming response. Note: If a violation is detected in the system prompt, the test run is blocked. Revise the prompt before testing again.
- Review the run summary after each test. It shows latency, tokens used, and tool calls for that run.
- Iterate on the prompt and tool selection as needed. Save your changes and retest.
Submit for review
- When the agent is ready, select the publish action in the agent editor.
- Optionally add version notes. Version notes are visible to the reviewer.
- Confirm the submission.
The system automatically scans the system prompt. Two outcomes are possible:
- If no violations are detected, the agent transitions to Pending review state.
- If a violation is detected, the request is auto-blocked. You receive a notification with the scan result. Revise the system prompt and submit again when ready.
Note: If you need to make changes after submitting, you can withdraw the pending request at any time. Withdrawing returns the agent to Draft state and unlocks the editor. - If this agent already has a published version, that version remains live in Discover Agents while the new version is under review.
Result
The publish request is now in the reviewer queue. For more information about what each state means, see Agent states in Agent Builder.
For more information about what happens next, see Review and act on a publish request.
Validation steps
- Confirm the agent shows Pending review status in Agent Builder.