Make your coding agent API-aware.
Reqbook is strongest when a coding agent is part of your API workflow. The agent can read source routes, create markdown specs, validate them, run requests, and build flows. You still keep control because every result is saved as reviewable markdown in the repo.If you only want terminal commands, use the CLI reference. If you want to inspect and run specs visually, use the Web preview. This guide focuses on agent-first development.
Set up the project
Initialise Reqbook
api-docs/, an example endpoint, _shared/env.template.md, local _shared/env.md, and .gitignore protection for .env.local plus local _shared/env.md.Register MCP for your agent
MCP mode gives the agent structured Reqbook tools instead of asking it to parse terminal output.
Prompts that work well
Use prompts that describe the API intent and let the Reqbook skill choose the correct operation.Create one endpoint
Scan existing routes
Run and debug
Create a workflow
Agent responsibilities
When the skills are installed, the agent should follow this pattern:| Task | Reqbook surface | Expected behavior |
|---|---|---|
| Add an endpoint | rqb_author MCP tool | Create api-docs/apis/<resource>/<method>-<slug>.md, validate it, regenerate the index. |
| Run one endpoint | rqb_exec MCP tool | Resolve env variables, path params, and runtime vars; report status, duration, and diff. |
| Diagnose a failed endpoint | rqb_diagnose MCP tool | Return likely cause, next action, inspect targets, and verify commands before broad source reading. |
| Create a workflow | /rqb flow command | Save a markdown flow under api-docs/flows/. |
| Run a workflow | rqb_flow MCP tool | Execute steps, capture values, inject them downstream, and report the first failure. |
| Review in browser | rqb serve | Use the UI for request tweaks, response inspection, and visual flow editing. |
What stays under your control
- Agents should not overwrite existing specs unless you explicitly ask for that exact file to be replaced.
- Secrets belong in
.env.localorRQB_*, not in markdown committed to the repo. - The browser request builder can override params, headers, and body for one run without changing the markdown file.
- Persistent changes happen only when the agent edits markdown or you use the UI edit mode and save.
rqb validate api-docs/is the final safety check before commit.