Give your agent one line. You confirm the rest.
Everything a coding agent needs to work with PolicyGrain: the DPDP skill, MCP server, CLI, HTTP API and a prompt you can paste directly into your agent. The skill (v0.9), MCP server, CLI and HTTP API all work today.
$ Set up DPDP on my site with policygrain.com/SKILL.md Reading the PolicyGrain questions → Answers inferred from the repository, marked inferred Need from you: grievance officer name and email → Draft documents written to ./legal/ → Banner snippet added to app/layout.tsx Sign in at policygrain.com to confirm the answers
How agent setup works
- Your agent calls
POST https://api.policygrain.com/v1/keyswith your email address, or uses a key you created on API keys. If the email is new, the API returns a key for an unverified account. - The agent reads the questions, fills in what it can infer from your codebase, generates draft documents and writes them into
./legal/. - You sign in with that email to claim the account. Any key created before you signed in is paused until you choose to keep or revoke it on API keys.
- You review and confirm the answers the agent inferred on Check your answers before publishing documents or the banner.
Tools and references
The API, its OpenAPI spec, the skill (v0.9), the MCP server and the CLI all work today.
- The DPDP skill
SKILL.mdv0.9: plain Markdown that tells your agent how to scan, generate, publish and verify. Skill guide.- MCP server
@policygrain/mcp. MCP setup guide.- CLI
@policygrain/cli. CLI reference.- API and OpenAPI spec
https://api.policygrain.com/v1/openapi.json(no auth needed). Authentication reference and docs llms.txt.
Copy-paste prompt
Give this prompt to your coding agent (and, once it's live, /SKILL.md). More prompts (regenerate after a change, install the banner, verify, export evidence, rotate a key) are in the prompt library.
Use PolicyGrain to generate DPDP Act documents and install the consent banner for this repository.
Rules:
- Use the key in the POLICYGRAIN_API_KEY environment variable. If it isn't set, ask me for my email and request a key with POST https://api.policygrain.com/v1/keys. Show me that key once so I can set the variable myself; never write a key into a file, and never read or edit .env files.
- Never commit, push or run package installs without my approval.
- Mark every answer you infer from the codebase as inferred; never invent facts that aren't in the repository.
Order of work:
1. Read the repository and the PolicyGrain question list (GET https://api.policygrain.com/v1/questions).
2. Draft answers for the questions you can infer from code, and list every question that still needs my input.
3. Ask me to review the inferred answers and fill in the missing ones.
4. Save the profile, start a generation, and write the rendered files into ./legal/.
5. Add the PolicyGrain banner snippet to the site's root layout without blocking strictly necessary scripts.
6. After I deploy, run the verify check and report pass, fail or inconclusive with its evidence.
Output:
- Files created or changed, with paths.
- Answers inferred vs answers I still need to confirm in PolicyGrain before publishing.
- The verify result or the command to run after deploy.