docs(agents): make Build your first Agent a complete, minimal-setup tutorial - #1133
Conversation
…e it before setup Co-authored-by: Himanshu Garg <garg_himanshu@outlook.com>
✅ Deploy Preview for docs-novu ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThe pull request rewrites the "Build your first Agent" tutorial in Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@content/docs/agents/custom-code-agent/build-your-first-agent.mdx`:
- Around line 31-33: The prerequisites list uses hyphen (-) bullet markers, but
the repository's Vale rule requires asterisk (*) for bullet points. Replace all
three hyphen markers in the prerequisites section (the entries about Novu
account, Node.js 18+, and chat provider) with asterisk markers to comply with
the configured style rule.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 74cc9d3b-6a6a-443c-b527-eb693279abe2
📒 Files selected for processing (2)
content/docs/agents/custom-code-agent/build-your-first-agent.mdxcontent/docs/agents/custom-code-agent/meta.json
|
Looks good to me, you can update the name "Pipelinr" also |
Sure Pawan, I will change that also |
…agent" and update references throughout the documentation
…erences to "Connect your first agent" throughout the documentation
…st agent" tutorial
What & why
The
Build your first Agenttutorial (/agents/custom-code-agent/build-your-first-agent) had two issues that hurt the docs experience:Set up your Agentin the sidebar, even though it's the natural starting tutorial.This PR makes it a self-contained, end-to-end tutorial with the minimum setup needed to get going, and links out to the detailed pages for anyone who wants the full walkthrough.
Changes
content/docs/agents/custom-code-agent/meta.json:Build your first Agentnow comes beforeSet up your Agent(Quickstart → Concepts → Build your first Agent → Set up your Agent → Going to Production).Before you startprerequisites (Novu account, Node.js, a Slack provider).Set up the projectsection with three minimal steps — create the agent + connect a provider, scaffold the bridge app, run it locally — each linking to its detailed page rather than duplicating it.Try it outsection so the tutorial ends with verifying the bot in Slack and viewing the conversation in the dashboard.Step N:prefixes; the Steps component auto-numbers).Testing
pnpm lintpasses.Build your first Agentnow sits aboveSet up your Agent.Note
No Linear ticket reference is included: this environment has no Linear MCP or API access available to create one. Please add a
fixes NV-XXXreference if a ticket is required.Summary by CodeRabbit
Greptile Summary
This PR renames
build-your-first-agent.mdxtoconnect-your-first-agent.mdx, rewrites it into a self-contained end-to-end tutorial, reorders the sidebar so it appears before "Set up your Agent", and adds a 308 redirect from the old URL. All cross-references across the docs are updated to the new slug.meta.jsonmovesconnect-your-first-agentabovesetup-your-agent, placing the tutorial earlier in the learning path.src/middleware.tsadds a permanent redirect for the old URL; all card and inline hrefs across 7 other MDX files are updated to the new slug.Confidence Score: 4/5
Safe to merge after fixing the variable name mismatch in the Step 5 code snippet.
The incremental Step 5 snippet uses
const textto capture the lowercased message, but Step 4 already destructuresconst { text }fromgenerateTextin the same function scope. A reader following the tutorial step by step will produce a duplicateconst textdeclaration and hit a SyntaxError. The complete-agent listing at the bottom of the page avoids this withuserText, but the intermediate snippet does not, leaving the step-by-step path broken. All other changes — the redirect, nav reordering, and link updates — are straightforward and correct.content/docs/agents/custom-code-agent/connect-your-first-agent.mdx — Step 5 code snippet uses a conflicting variable name.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A["/agents/custom-code-agent/build-your-first-agent"] -->|308 redirect| B["/agents/custom-code-agent/connect-your-first-agent"] B --> C[Before you start] C --> D[Set up the project] D --> D1[Create agent + connect Slack] D --> D2[Scaffold bridge app] D --> D3[Run locally with dev:novu] B --> E[Build the agent] E --> E1[Define agent shell] E --> E2[Handle first message] E --> E3[Use metadata for context] E --> E4[Answer follow-ups with LLM] E --> E5[Resolve the conversation] B --> F[Try it out] F --> G[View conversation in dashboard]%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% flowchart TD A["/agents/custom-code-agent/build-your-first-agent"] -->|308 redirect| B["/agents/custom-code-agent/connect-your-first-agent"] B --> C[Before you start] C --> D[Set up the project] D --> D1[Create agent + connect Slack] D --> D2[Scaffold bridge app] D --> D3[Run locally with dev:novu] B --> E[Build the agent] E --> E1[Define agent shell] E --> E2[Handle first message] E --> E3[Use metadata for context] E --> E4[Answer follow-ups with LLM] E --> E5[Resolve the conversation] B --> F[Try it out] F --> G[View conversation in dashboard]Comments Outside Diff (1)
content/docs/agents/custom-code-agent/build-your-first-agent.mdx, line 199-205 (link)The
OPENAI_API_KEY=sk-...block is rendered as a barebashsnippet with no label. In a Next.js project the reader must put this in.env.local— running it as a shell command (export or inline assignment) will work only for the current terminal session and won't be picked up bynext dev. Labelling the blocktitle=".env.local"makes the intent unambiguous for beginners who are unfamiliar with how Next.js loads environment variables.Prompt To Fix With AI
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Reviews (2): Last reviewed commit: "Update middleware redirects to include n..." | Re-trigger Greptile