A modern HR assistant is usually not a standalone chatbot anymore. Teams want a small widget inside the employee portal that understands company policies, opens HR workflows, and works with the employee context already present in the app.
This pattern fits Cognipeer Client SDK well: Studio owns the peer and conversation behavior, while your product keeps the UI shell, user session, and business actions.
When to reach for this recipe
If your team needs the capabilities described above and you'd rather build on proven primitives than wire one from scratch — this is the shape to start from.
Architecture
Client SDK connects your portal to a Studio peer by using a PAT and a hook ID. The widget can read the current peer, channel, and user context, then start conversations without exposing Studio internals to employees.
Use client tools when the peer needs to trigger real actions such as opening a leave request modal, checking leave balance, or creating an HR helpdesk case in your product.
1. Connect The Portal Widget To Studio
Initialize the SDK once inside your portal shell and inspect the peer attached to the widget channel.
5content:'How many leave days do I have left, and can you open a vacation request for next Thursday and Friday?',
6},
7],
8clientTools: hrTools,
9});
10
11console.log(response.content);
12console.log(response.conversationId);
Result
You get an HR widget that:
- Answers policy and onboarding questions in context
- Uses existing employee identity from your portal
- Triggers leave and HR workflows through client tools
- Keeps Studio logic behind the peer instead of duplicating it in the frontend