Thanks for your interest in contributing to AgentLens! This guide will get you from zero to a running dev environment in under 15 minutes.
| Tool | Version | Check |
|---|---|---|
| Node.js | 22+ | node -v |
| pnpm | 9+ | pnpm -v |
| Python | 3.10+ (only for python-sdk) |
python3 --version |
# 1. Fork & clone
git clone https://github.com/<your-username>/agentlens.git
cd agentlens
# 2. Install dependencies
pnpm install
# 3. Build all packages
pnpm build
# 4. Start dev servers (server + dashboard with hot reload)
pnpm devThe server starts at http://localhost:3400 and the dashboard at http://localhost:5173 (proxied to the server).
cp .env.example .env
# Edit .env with your settings — defaults work for local developmentpackages/
├── core/ Shared types, schemas & utilities (@agentlensai/core)
├── server/ Hono API server + SQLite backend (@agentlensai/server)
├── dashboard/ React + Vite web dashboard (@agentlensai/dashboard)
├── cli/ Command-line interface (@agentlensai/cli)
├── sdk/ TypeScript SDK (@agentlensai/sdk)
├── python-sdk/ Python SDK + auto-instrumentation (agentlensai)
├── mcp/ MCP tool server (@agentlensai/mcp)
└── pool-server/ Community pool server (@agentlensai/pool-server)
Use descriptive prefixes:
feat/short-description— new featuresfix/short-description— bug fixesdocs/short-description— documentationchore/short-description— maintenance, deps, CI
# Full stack (server + dashboard)
pnpm dev
# Individual packages
pnpm --filter @agentlensai/server dev
pnpm --filter @agentlensai/dashboard devMost changes only affect one or two packages. Build dependencies first:
# Build core (most packages depend on it)
pnpm --filter @agentlensai/core build
# Then work on your target package
pnpm --filter @agentlensai/server devWe use Vitest for all TypeScript packages.
# Run all tests
pnpm test
# Run tests for a specific package
pnpm --filter @agentlensai/server test
pnpm --filter @agentlensai/core test
# Watch mode
pnpm --filter @agentlensai/server test -- --watchcd packages/python-sdk
pip install -e ".[dev]"
pytest- ESLint + Prettier — run
pnpm lintto check,pnpm lint --fixto auto-fix - TypeScript strict mode — enabled in all packages
- No
any— use proper types orunknownwith type guards - Format on save is recommended — configure your editor for Prettier
# Check everything
pnpm lint
pnpm typecheckWe follow Conventional Commits:
feat: add session export endpoint
fix: correct hash chain validation on empty sessions
docs: update API reference for v0.10
chore: bump vitest to 2.x
feat(dashboard): add cost sparkline to session list
fix(python-sdk): handle missing provider gracefully
Types: feat | fix | docs | chore | refactor | test | ci
Scope (optional): package name — core, server, dashboard, cli, sdk, python-sdk, mcp, pool-server
- Branch off
mainwith proper naming (see above) - Commit with conventional commit messages
- Push and open a PR against
main - Fill in the PR template — describe what and why
- CI must pass — lint, typecheck, tests
- Review — at least one approval required
- Merge — squash merge preferred for clean history
- Tests added/updated for new functionality
-
pnpm typecheckpasses -
pnpm lintpasses -
pnpm testpasses - Documentation updated if applicable
Releases are handled by maintainers:
# Bump versions (follows semver)
pnpm changeset # describe your changes
pnpm changeset version # apply version bumps
pnpm build
pnpm publish -r # publish all changed packagescd packages/python-sdk
# Update version in pyproject.toml
python -m build
twine upload dist/*- Issues — github.com/amitpaz/agentlens/issues
- Discussions — open an issue tagged
question
Thank you for contributing! 🔍