Answer your agent from Slack
You started a hosted agent on a long job and went to a meeting. Twenty minutes in, it stops on a permission request and waits. With Slack connected, the request reaches you in Slack with the answer buttons on it, and a thread keeps you up to date on what the agent says, so the job keeps moving while you are away from your desk. This works for a hosted agent from any vendor; the example uses Grok Build. It needs the kcap Slack app, which an admin installs for the workspace, and notifications turned on. On the local edition notifications are off unless turned on in the server’s environment
1. Connect your Slack account
Section titled “1. Connect your Slack account”You do this once. In the web app, open Chat accounts from your avatar menu and choose Connect Slack. kcap finds your Slack account by email; if it cannot, it asks for your Slack member ID, which is in Slack under your profile → More → Copy member ID. It then sends you a link in a direct message from the kcap app. Open the link. The panel then reads Linked to your kcap account
The link confirms the Slack account is yours. Anything you do from Slack is carried out as you, with your permissions, so an account that is not linked can do nothing
2. Follow the agent
Section titled “2. Follow the agent”On the agent’s page in the web app, choose Follow in Slack. Or in Slack:
/kcap follow agent <link or id>kcap starts a thread in your direct message with the app. Each time the agent finishes a turn, what it said is posted there, with Open in kcap to go to the agent’s page
While you follow an agent, its prompts arrive in that thread. You do not need to follow an agent to be asked: a prompt from any other hosted agent you may answer arrives in your direct message with the app as an Agent waiting on you message, as long as that notification’s Slack switch is on
3. Answer what it asks
Section titled “3. Answer what it asks”When the agent stops, the message quotes what it asked and carries the answers:
- Approve and Deny for a permission request
- One button per option for a single-choice question with up to five options
- Reply for a question that needs typed text
Your answer reaches the agent as if you had given it on its page, under your name. Once a prompt is answered, by you, by a teammate or in the agent’s terminal, the buttons say it is no longer waiting
Some prompts must be answered in kcap. An approval kcap rates as irreversible offers Deny alone in Slack, and a multi-select question or a series of questions opens on the agent’s page
4. Redirect it from the thread
Section titled “4. Redirect it from the thread”In the thread, choose Reply to the agent and type:
Skip the integration tests for now and open the pull request as a draftThe message reaches the agent exactly as typing on its page would. If the agent is someone else’s, its owner has message approval on and you do not have Send without approval, yours waits for the owner to approve it
5. Stop following
Section titled “5. Stop following”The follow ends by itself when the agent stops. To end it sooner, choose Unfollow on the thread’s first message, Stop following in Slack on the agent’s page, or run:
/kcap unfollow agent <link or id>Troubleshooting
Section titled “Troubleshooting”- Chat accounts says to ask my admin: the Slack app is not installed for the workspace. An admin sets it up under Administration → Workspace → Integrations
- kcap tells me to link first: open Chat accounts, choose Send a new link, and open the link it sends you in Slack
- I cannot follow an agent: you can follow only an agent you could send messages to in kcap
- Nothing arrives: check the Slack switch for Agent waiting on you in your notification settings
Further reading
Section titled “Further reading”- Slack: everything the Slack app does
- Hosted agents: starting an agent and who may answer it
- Notifications: choosing what reaches you in Slack