Async questionnaire system for human-in-the-loop AI workflows. An LLM posts markdown-formatted questions to an HTTP API, a human answers via web UI, and the LLM polls for responses.
bun install
bun run server.tsServer runs on http://localhost:4242.
- LLM posts questions to
/api/conversation/{id}/ask.md - Human answers at
http://localhost:4242/v/{id} - LLM polls
/api/conversation/{id}/wait.mdfor responses
Questions use a markdown-based format:
#architecture #backend
[Database Selection] (single)
**db**: Which database should we use?
Context and background info goes here.
[A] PostgreSQL
> Battle-tested, ACID compliant
[B] MongoDB
> Flexible schema, good for iteration
[C] SQLite
> Embedded, zero config| Element | Syntax | Required |
|---|---|---|
| Tags | #tag |
No |
| Label | [Label] |
No |
| Mode | (single) or (multi) |
No |
| Question ID | **id**: |
No (auto-generated) |
| Question text | After ID | Yes |
| Context | Lines before options | No |
| Option | [A] text |
Yes (at least one) |
| Description | > text under option |
No |
Separate multiple questions with ---.
All endpoints under /api/conversation/{id}/:
| Endpoint | Method | Description |
|---|---|---|
ask.md |
POST | Submit questions (markdown body) |
wait.md |
GET | Long-poll for answers (5 min timeout) |
answers.md |
GET | Get all answers immediately |
curl -X POST http://localhost:4242/api/conversation/my-session/ask.md \
-H "Content-Type: text/plain" \
-d '**q1**: Should we proceed?
[A] Yes
[B] No'curl http://localhost:4242/api/conversation/my-session/wait.mdReturns markdown with YAML frontmatter:
---
conversation: my-session
pending: []
unread: []
---
**q1**: Should we proceed?
- [A] Yes- Click options to select/deselect
- Edit option text for custom responses
- Add new options with
[_] ... - Emoji shortcuts:
\yes,\no,\1-\5for ratings - Ctrl+Enter to send
Tell your agent to fetch the skill documentation:
Fetch http://localhost:4242/skill.md and use it to ask me questions
Or for Claude Code, copy skill.md to your skills directory to enable the /interrogate command.
MIT
