Skip to main content
An agent whose settings entry says ask: true is offered the built-in ask_person tool. Each question is a task to the ask performer you pass to agents({ ask }), with the settings’ questionDeadline. The turn is awaiting while it is pending. An expired or declined question is a result the model reads. The performer takes a Question and returns an Answer, both exported by @bijectionhq/app-agents:
subject names the asking turn. summary is the question and request the answer it wants.

Nobody answers

askNobody(transcript) from @bijectionhq/app-agents/install settles every question at once as unanswered. Place it in your tree and pass it as ask.

People holding a role answer

A target whose performer is a list of roles waits for a principal holding one of them to answer the task:
List the pending questions for reviewers by reading sys.tasks for the target. ctx.withdraw(task, { message }) settles a question Withdrawn, and the model reads why it went unanswered.

Through the Approvals app

An adapter mutation of your own can be the ask performer. It forwards a confirmation to the Approvals app’s ask(ctx, review, …) and, from that task’s continuation, answers the agents app’s question with ctx.answer(task, { ok: true, value: { approved, value: null, by: [] } }). Text and choice answers need a performer that collects them, such as the role target above. See Operation review.