agentbot-opensource
AGENTS.md17 starsChanged 5 months agoMITView on GitHub
Agentbot is an open-source AI agent platform. Monorepo managed by Turborepo with three workspaces: Build order: lint → typecheck → test → build. Turborepo handles workspace dependencies automatically. Pre-commit hooks: ESLint + Prettier + secret detection (via .pre-commit-config.yaml). Run bash scripts/check-secrets.sh . before pushing. Copy .env.example to .env in both web/ and agentbot-backend/. Web requires: DATABASE_URL, NEXTAUTH_SECRET, NEXTAUTH_URL, DISCORD_CLIENT_ID/SECRET, TELEGRAM_BOT_TOKEN, STRIPE_SECRET_KEY Backend requires: PORT (default 4000), DATABASE_URL, JWT_SECRET When shaping, editing, or reviewing user-facing UI, load .agents/skills/product-design/SKILL.md as the single…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository84 other files it gives its agents.
- skills/AGENTS.mdAGENTS.md
- .cursor/rules/codegraph.mdcCursor rule
- 0xworkSkill
- aeon-autoresearchSkill
- aeon-deal-flowSkill
- aeon-deep-researchSkill
- aeon-defi-monitorSkill
- aeon-defi-overviewSkill
- aeon-distribute-tokensSkill
- aeon-hacker-news-digestSkill
- aeon-huggingface-trendingSkill
- aeon-last30Skill
- aeon-monitor-kalshiSkill
- aeon-monitor-polymarketSkill
- aeon-monitor-runnersSkill
- aeon-narrative-trackerSkill
- aeon-on-chain-monitorSkill
- aeon-paper-pickSkill
- aeon-reg-monitorSkill
- aeon-rss-digestSkill
- aeon-skill-evalsSkill
- aeon-skill-repairSkill
- aeon-skill-security-scanSkill
- aeon-token-moversSkill
- aeon-token-pickSkill
- aeon-unlock-monitorSkill
- aeon-vuln-scannerSkill
- agenticbetsSkill
- agent-wormholeSkill
- alchemySkill
- bankr-shopifySkill
- bankrSkill
- token-scam-analysisSkill
- twitter-agentSkill
- baseSkill
- blueagent-x402Skill
- botchanSkill
- botcoin-minerSkill
- capacitrSkill
- cattownSkill
- checkrSkill
- clankerSkill
- codegridSkill
- darksol-random-oracleSkill
- endaomentSkill
- ens-primary-nameSkill
- erc-8004Skill
- gem-minerSkill
- get-api-docsSkill
- gitlawbSkill
- helixaSkill
- hydrexSkill
- litcoin-minerSkill
- megapotSkill
- moltycashSkill
- nexusSkill
- neynarSkill
- nookplotSkill
- onchainkitSkill
- opensea-apiSkill
- The first 60 shown.
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 1 is common, 2 are distinctive, and 1 is very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 83
Prefer real Prisma-backed data over mock/placeholder data in production routes
- Very specific: line 87
When shaping, editing, or reviewing user-facing UI, load .agents/skills/product-design/SKILL.md as the single entry point.
- Distinctive: line 131
Do not reintroduce Turbopack-only assumptions without verifying Vercel build
- Common: line 158
Never commit secrets (CI runs GitLeaks + TruffleHog)
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — Agentbot
Project Overview
Agentbot is an open-source AI agent platform. Monorepo managed by Turborepo with three workspaces:
| Workspace | Tech | Purpose |
web/ | Next.js 16 (App Router) | Frontend + API routes (~140 handlers) |
agentbot-backend/ | Express + TypeScript | Agent lifecycle, webhooks, payments |
gateway/ | Gateway service | Routing |
Commands
# Root (Turborepo)
npm run build # Build all workspaces
npm run dev # Dev servers in parallel
npm run lint # Lint all
npm run test # Test all
# Web
cd web && npm run dev # Dev server :3000
cd web && npm run build # Production build
cd web && npm run test # Playwright E2E
cd web && npm run lint # ESLint
cd web && npx prisma generate # Regenerate Prisma client
# Backend
cd agentbot-backend && npm run dev # Dev server :4000
cd agentbot-backend && npm run build # TypeScript compile
cd agentbot-backend && npm test # Jest tests
# Type check (CI equivalent)
cd agentbot-backend && npx tsc --noEmitBuild order: lint → typecheck → test → build. Turborepo handles workspace dependencies automatically.
Pre-commit hooks: ESLint + Prettier + secret detection (via .pre-commit-config.yaml). Run bash scripts/check-secrets.sh . before pushing.
Architecture
agentbot/
├── web/ # Next.js 16 frontend
│ ├── app/ # App Router pages + API routes
│ │ ├── api/ # ~140 route handlers
│ │ ├── lib/hashline/ # Content-addressed file editing (anti-stale-line)
│ │ └── lib/init-deep.ts # Hierarchical AGENTS.md generation
│ ├── components/ # React components
│ └── prisma/ # Database schema + migrations
├── agentbot-backend/ # Express API
│ └── src/services/ # Business logic (underground, bus, wallet, etc.)
├── gateway/ # Gateway service
├── skills/ # AI skill definitions
└── scripts/ # Dev + ops utilitiesRuntime Facts
webbuilds withnext build --webpack(NOT Turbopack)- Production runtime:
node .next/standalone/server.js - Deployed on Vercel (frontend) + Railway (backend, x402-gateway, browser)
- Some public pages are
force-dynamic— they render live Prisma counts - Node.js ≥ 22 required
Environment Setup
Copy .env.example to .env in both web/ and agentbot-backend/.
Web requires: DATABASE_URL, NEXTAUTH_SECRET, NEXTAUTH_URL, DISCORD_CLIENT_ID/SECRET, TELEGRAM_BOT_TOKEN, STRIPE_SECRET_KEY
Backend requires: PORT (default 4000), DATABASE_URL, JWT_SECRET
Code Conventions
- TypeScript strict — no
anywhere avoidable spawn()notexec()— no shell injection- Fail-closed security patterns (auth defaults to deny)
- Zod for validation, Prisma for ORM
- Server components preferred over client components
- Prefer real Prisma-backed data over mock/placeholder data in production routes
Product Design
When shaping, editing, or reviewing user-facing UI, load
.agents/skills/product-design/SKILL.md as the single entry point. It routes to
the canonical visual source (web/app/design-system.css), shadcn/ui, and the
web-design-guidelines / vercel-composition-patterns skills.
Applies to: pages and components under web/ (App Router pages,
web/components/, web/app/components/), product copy, interaction,
accessibility, responsive behavior, and reachable states (loading, empty,
error, permission, provisioning, billing, destructive). Also load it when
backend behavior changes a user-visible outcome (provisioning, wallet balance,
quota).
Skip: backend-only work in agentbot-backend//gateway/ with no
user-visible effect, telemetry, generated files (Prisma client, out/), docs,
marketing, the agent-runtime skills/ directory, and tests with no shipped UI
impact.
Report which surfaces and references the skill loaded so findings can be traced to their canonical source.
Key Integrations
| Service | Purpose |
| NextAuth.js | Auth (Discord, etc.) |
| Stripe | Subscriptions |
| Prisma + PostgreSQL (Neon) | Database |
| OpenAI / Anthropic / OpenRouter | AI models |
| Wagmi/Viem | Base network (blockchain) |
| Telegram / Discord / WhatsApp | Bot messaging |
| Mux | Live video streaming |
| Coinbase CDP | Agent wallets (USDC) |
External References
- Mastercard Agent Toolkit — Payment integration patterns for AI agents
Known Gotchas
web/app/api/provision/route.tsis legacy-heavy — may succeed without creating a PrismaAgentrow- Public stats must distinguish "deployed agents" (total rows) from "live agents" (status
activeorrunning) User.openclawUrl≠Agentrecord/api/deploymentsis compatibility-oriented, not source of truth for metrics- Build warnings that affect Vercel output are serious; warning-only noise is secondary
- Do not reintroduce Turbopack-only assumptions without verifying Vercel build
Review Priorities
- Security: auth, webhook verification, SSRF, secret handling
- Provisioning drift between
web, Prisma, andagentbot-backend - Public page data integrity (
/marketplace,/demo,/dashboard/fleet,/dashboard/colony) - Vercel build/start regressions
- Fallback behavior hiding production failures
CI/CD
GitHub Actions runs on push to main and PRs:
- Backend: TypeScript check → build → Jest tests
- Frontend: Prisma generate → build (with stub env) → Playwright E2E
- Pre-deploy validation (main only)
- Deploy → Vercel + Railway (auto-triggered)
- Smoke tests against production endpoints
Common Tasks
Add a bot platform: skills/add-[platform].md → web/app/api/bot/[platform]/route.ts → web/components/bot/[Platform]Config.tsx
Add an API endpoint: web/app/api/[feature]/route.ts + Zod schema + API docs
Security
- Never commit secrets (CI runs GitLeaks + TruffleHog)
- Bearer token auth with
timingSafeEqual(fail-closed) - SHA-256 hashed API keys (raw keys never stored)
- SSRF blocklist: IPv4 private + IPv6 ULA + CGN
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

