Configure It Yourself
Use this page to build the Wayfinder AI agent setup manually instead of importing the declarative bundle from Try It Out. Pick this path when you want to see exactly what gets created, adapt the setup to your own project, or learn the moving parts step by step. The end state is identical — every walkthrough works against either path.
The first section is the shared foundation — required regardless of which walkthroughs you plan to exercise. The remaining sections build on it.
- Set Up the Foundation — resource servers, roles, demo users, and the
WAYFINDERapplication. - Register the Wayfinder Concierge Agent — needed for Acting on Its Own and Acting on Behalf of a User.
- Build the Agent Authentication Flow — drives the OBO consent screen used by Acting on Behalf of a User.
Set Up the Foundation
The foundation creates the two resource servers, three roles, two demo users, and the OAuth application that Wayfinder Web uses to sign users in.
-
Create the
wayfinder-agentresource server.Invoke the Resource Management API to create the resource server. Set the identifier to
wayfinder-agent. Replace<organization-unit-id>with the ID of your default organization unit (look it up viaGET /organization-units):curl -kL -X POST https://localhost:8090/resource-servers \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access-token>' \
-d '{
"name": "Wayfinder Agent",
"description": "Controls access to the Wayfinder Concierge agent",
"identifier": "wayfinder-agent",
"ouId": "<organization-unit-id>",
"delimiter": ":"
}'Add a resource with handle
agentunder it:curl -kL -X POST https://localhost:8090/resource-servers/<wayfinder-agent-rs-id>/resources \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access-token>' \
-d '{ "name": "Agent", "handle": "agent" }'Then add one action under the resource:
curl -kL -X POST https://localhost:8090/resource-servers/<wayfinder-agent-rs-id>/resources/<agent-resource-id>/actions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access-token>' \
-d '{ "name": "Access", "handle": "access" }'Action Generated permission accessagent:accessSee Resource Servers.
-
Create the
wayfinder-bookingresource server.Invoke the Resource Management API again. The identifier is
http://localhost:8787/mcp— a URL-shaped identifier per RFC 8707 that matches what the Wayfinder MCP server advertises in/.well-known/oauth-protected-resource. MCP Inspector reads that metadata and passes the value back asresource=...on/oauth2/token; ThunderID would reject the request withinvalid_targetotherwise. This resource server protects both the REST surface (/api/*) and the MCP surface (/mcp) of the Wayfinder server — both check the samebooking:*permissions:curl -kL -X POST https://localhost:8090/resource-servers \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access-token>' \
-d '{
"name": "Wayfinder Booking",
"description": "Protects the Wayfinder booking domain (REST and MCP surfaces)",
"identifier": "http://localhost:8787/mcp",
"ouId": "<organization-unit-id>",
"delimiter": ":"
}'Add a resource with handle
booking:curl -kL -X POST https://localhost:8090/resource-servers/<wayfinder-booking-rs-id>/resources \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access-token>' \
-d '{ "name": "Booking", "handle": "booking" }'Then add four actions under the resource — repeat the call below for each handle (
read,create,cancel,recommend):curl -kL -X POST https://localhost:8090/resource-servers/<wayfinder-booking-rs-id>/resources/<booking-resource-id>/actions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access-token>' \
-d '{ "name": "Read", "handle": "read" }'Action Generated permission readbooking:readcreatebooking:createcancelbooking:cancelrecommendbooking:recommend -
Create the
Chat Userrole.Send a
POSTto/roles. The role grantsagent:accesson thewayfinder-agentresource server:curl -kL -X POST https://localhost:8090/roles \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access-token>' \
-d '{
"name": "Chat User",
"description": "Grants access to use the Wayfinder Concierge agent",
"ouId": "<organization-unit-id>",
"permissions": [
{
"resourceServerId": "<wayfinder-agent-rs-id>",
"permissions": ["agent:access"]
}
]
}' -
Create the
Booking Userrole.Grant it
booking:read,booking:create, andbooking:cancelonwayfinder-booking:curl -kL -X POST https://localhost:8090/roles \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access-token>' \
-d '{
"name": "Booking User",
"description": "Grants booking permissions for the Wayfinder sample",
"ouId": "<organization-unit-id>",
"permissions": [
{
"resourceServerId": "<wayfinder-booking-rs-id>",
"permissions": ["booking:read", "booking:create", "booking:cancel"]
}
]
}' -
Create the
Recommenderrole.Grant it
booking:recommendonwayfinder-booking. This role will be assigned to the Wayfinder Concierge in a later step, not to a user:curl -kL -X POST https://localhost:8090/roles \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access-token>' \
-d '{
"name": "Recommender",
"description": "Grants the booking:recommend permission to the Wayfinder Concierge",
"ouId": "<organization-unit-id>",
"permissions": [
{
"resourceServerId": "<wayfinder-booking-rs-id>",
"permissions": ["booking:recommend"]
}
]
}'See Authorization.
-
Create the
Customeruser type.Navigate to User Types → Add User Type. Name it
Customerand define the schema with the attributes the agent needs to issue claims for:Attribute Type Required Notes usernamestring Yes Unique passwordstring No Marked as a credential emailstring Yes Unique given_namestring No family_namestring No See User Types.
-
Create the two demo users.
Navigate to Users → Add User. Select the
Customeruser type and create:Username Password john.doejohn.doejane.smithjane.smithSee Manage Users.
-
Assign user roles.
- Roles → Chat User → Assignments tab → Add Assignment. Pick User and assign
john.doe. - Roles → Booking User → Assignments tab → Add Assignment. Pick User and assign both
john.doeandjane.smith.
- Roles → Chat User → Assignments tab → Add Assignment. Pick User and assign
-
Register the
WAYFINDERapplication.Navigate to Applications → Add Application and choose Browser App as the type. Configure:
Setting Value Client ID WAYFINDERRedirect URI http://localhost:5173Allowed grants authorization_codePKCE Required Allowed user types CustomerSee Manage Applications.
Register the Wayfinder Concierge Agent
The Concierge runs as a first-class agent in ThunderID. It needs its own credentials, the right OAuth grants enabled, and a role assignment so its machine-to-machine token can call browsing tools.
-
Add the agent.
Navigate to Agents → Add Agent. Name the agent
WAYFINDER-CONCIERGE, then:- Capture the client secret. ThunderID prints it only once. You will use it in
ai-agent/.env. - Under Protocol settings, enable the Authorization Code grant. Client Credentials is on by default for agents.
- Add the redirect URI
http://localhost:5173/agent-callback.
See Manage Agents and Agent Authentication.
- Capture the client secret. ThunderID prints it only once. You will use it in
-
Assign the
Recommenderrole to the agent.With the agent created, complete the role assignment:
- Roles → Recommender → Assignments tab → Add Assignment. Pick Agent and assign
WAYFINDER-CONCIERGE.
- Roles → Recommender → Assignments tab → Add Assignment. Pick Agent and assign
Build the Agent Authentication Flow
The Wayfinder Concierge needs a separate authentication flow that drives the on-behalf-of (OBO) consent screen when a chat request triggers a mutating tool. The flow authenticates the user with username and password, then shows a consent screen listing the booking:* permissions the agent is requesting.
Navigate to Flows and create a flow with these steps:
- A
PROMPTstep asking for username and password. - A
TASK_EXECUTIONstep running theBasicAuthExecutor. - A
TASK_EXECUTIONstep running theAuthorizationExecutor. - A
TASK_EXECUTIONstep running theConsentExecutor, with aPROMPTstep for the consent screen on itsonIncompletebranch. - A
TASK_EXECUTIONstep running theAuthAssertExecutoron success.
Attach the flow to the WAYFINDER-CONCIERGE agent (set auth_flow_handle on the agent to the flow's handle).
The complete flow definition is in the Wayfinder sample distribution at thunderid-config/thunderid-config.yaml under the wayfinder-agent-auth-flow entry — copy it as a reference.
See Build a Flow.
Start the Sample
With every resource in place, follow the commands in the Wayfinder sample's README, passing the agent client secret you captured when you registered the agent.