Build a custom agent
Create, configure, test, and publish a custom AgentForce agent for your org.
Admins only. Members can run and observe; only admins can edit.
What you'll build
By the end of this guide you'll have published version 1 of a custom AgentForce agent for an internal role. We'll use Onboarding Buddy — an agent that helps new hires find docs and answer policy questions — as the running example. You'll give it identity, instructions, two tools, test it, and publish it for the org.
Prerequisites
- You're an admin of the org.
- Your org is below the 20-custom-agent cap (check the counter on
/admin/agents). - You know which role you're building for and roughly what tools it needs.
Steps
Open the admin agents page
Go to /admin/agents. You'll see the catalog agents and any existing custom agents. Click + New agent.
Fill the create dialog
Enter display name Onboarding Buddy, pick an icon and color, write a one-line description ("Helps new hires find docs and answer policy questions"), and pick a model (Sonnet is a good default). Click Create.
Write instructions
In the editor's Instructions section, write a short prompt covering: role, audience (new hires in their first 30 days), tone (warm and concise), constraint (cite docs by name when you quote them), and a tool hint (use search_kb for policy lookups). The editor auto-saves on edit.
Add tools
Open the Tools section. Confirm search_kb is enabled. Use Add tool to add search_org_contacts so the agent can look up team members. Skip Composio and MCP for this guide.
Test in the side panel
Open the test panel from the editor. Send: "What's our parental leave policy?" Validate the agent calls search_kb and quotes the policy doc by name. If the response is generic, tighten the instructions and re-send in the same test thread.
Publish
Click Publish, review the confirmation dialog summarizing the diff, confirm. The agent is now live on /agentforce.
Verify on the hub
Open /agentforce as a regular member (or in another browser session). Confirm Onboarding Buddy shows up alongside the catalog agents.
What's next?
- Iterate on instructions — every member's first conversation is a free signal of where the agent misunderstands the role.
- Add Composio actions if the agent should reach into Slack, Notion, etc. — see Tools and integrations (builder).
- Set up a workflow with a Schedule trigger that calls this agent — see Workflows.