These prompts describe the outcome, not a fixed set of edits. Review the agent’s changes like any other pull request — where things land depends on how your codebase is structured.
Before you start
The agent will need a few things to be true. You can either set these up first or let the prompt ask you for them:- A Hicap API key. Create one in the Hicap Platform dashboard ↗ and make it available as the
HICAP_API_KEYenvironment variable. The agent should never hard-code it. - The base URL and auth header. Requests go to
https://api.hicap.ai/v1, and the key is sent as theapi-keyheader. Any OpenAI-compatible SDK works — see the Developer Quickstart. - A sense of your dimensions. Decide which labels you want to slice spend by. See Tags, Dimensions & Segments for the model; the prompt defaults to a sensible starter set.
Master prompt
Copy this into your agent. It covers Hicap setup and base attribution in one pass.Focused prompts
Prefer smaller steps? Run these in order — each is safe to hand over on its own.1. Point the client at Hicap
1. Point the client at Hicap
2. Add a tagging helper
2. Add a tagging helper
3. Set base dimensions
3. Set base dimensions
4. Tag per-call features
4. Tag per-call features
After the agent runs
- Verify the header. Confirm each request sends a single
x-hicap-tagsheader whose value is one JSON object. See How tags are sent. - Check for untagged traffic. Requests that arrive without your expected dimensions surface as Unattributed Traffic — a signal that a call site still needs the helper. See Segments.
- Grow into segments. Once dimensions are flowing, define segments to slice spend without touching code again.
Related
Developer Quickstart
The minimal client setup the prompts build on.
Tags, Dimensions & Segments
The attribution model these prompts implement.