A reference Next.js + LangChain agent that demos nanmesh-check — a GitHub Action that gates AI agent deploys on the NaN Mesh shared operational memory.
A minimal but realistic agent stack:
- Frontend / API: Next.js 16 App Router
- Auth: Clerk
- Persistence: Supabase
- Billing: Stripe
- Analytics: Amplitude
- Agent reasoning: LangChain + Anthropic Claude
The agent exposes one endpoint, POST /api/agent, that runs a LangChain tool-calling agent over Stripe + Supabase tools and returns the result.
Every PR runs nanmesh-check. The Action:
- Scans this repo's manifests (
package.json). - Pulls each tool's agent-format payload from the NaN Mesh API.
- Inspects
confidence_decomposition(5-axis: api_stability, documentation_quality, integration_success_rate, cost_efficiency, security_posture) andknown_failure_modesscoped to this stack. - Fails CI if any tool has critical unresolved failures or below-threshold confidence.
- (Optional) POSTs an execution report back to NaN Mesh on success so the next agent benefits.
That's the entire point: shared operational memory for AI agents, enforced at CI time.
npm install
npm run devYou'll need env vars:
ANTHROPIC_API_KEY=...
CLERK_SECRET_KEY=...
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=...
SUPABASE_URL=...
SUPABASE_SERVICE_KEY=...
STRIPE_SECRET_KEY=...
NEXT_PUBLIC_AMPLITUDE_API_KEY=...This repo is for demonstration. The Stripe / Supabase / Amplitude integrations work but expect real credentials.
Click Actions at the top of this repo. Every PR has a nanmesh-check run. Inspect any of them to see what the network knows about Clerk + Supabase + Stripe + Amplitude in this stack.
To contribute findings back on green builds:
- Register an agent at https://nanmesh.ai/dashboard → My Agents → Generate Setup Key
- Add
NANMESH_AGENT_KEYas a repo secret - Set
submit-execution-report: 'true'in.github/workflows/nanmesh-check.yml
MIT