Get the FREE Ultimate OpenClaw Setup Guide →

better-agents

Standards for building agents, better

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio langwatch-better-agents npx -y @langwatch/better-agents \
  --env BETTER_AGENTS_TELEMETRY="0 to opt out of anonymous usage telemetry"

How to use

Better Agents provides a CLI tool and a standardized project structure to build production-ready coding assistants across frameworks (e.g., Agno, Mastra, LangGraph) and integrations (Claude Code, Cursor, Kilocode, etc.). The MCP setup (via the .mcp.json) preconfigures the server to scaffold and manage agent projects, prompts, tests, and evaluations. You can initialize a new agent project, manage prompts, and run scenario tests to ensure your agent behaves as expected across feature scenarios. Use the CLI to bootstrap new agent projects, select your framework, and generate a prompt registry that is versioned and collaboratively editable. The included scenarios and evaluations notebooks help you measure performance and ensure reliability as you evolve the agent.

To use the capabilities, install the Better Agents CLI globally, initialize a project, and then work with prompts, tests, and AGENTS.md guidelines. The tool supports guiding you through language, framework, coding assistant, and API key setup, and it integrates with your chosen LLM provider and tools. You’ll also be able to run scenario tests to verify agent behavior, and examine structured prompts and AGENTS.md guidelines to maintain production-ready quality.

How to install

Prerequisites:

  • Node.js 22+ installed on your system
  • npm or pnpm (npm is included with Node.js)
  • Access to a terminal/command prompt

Installation steps:

  1. Install the Better Agents CLI globally (recommended):
npm install -g @langwatch/better-agents
  1. Initialize a new agent project (example in current directory):
better-agents init .
  1. If you prefer to bootstrap via npx without global install:
npx @langwatch/better-agents init my-agent-project
  1. Follow the CLI prompts to select your language, agent framework, coding assistant, and API keys. The CLI will scaffold the standard Better Agent structure (prompts, tests, scenarios, AGENTS.md, etc.).

  2. Install project dependencies as needed (per your chosen framework):

cd my-agent-project
npm install

Additional notes

Notes and tips:

  • The project uses a standardized structure (.mcp.json) to configure MCP servers and ensure consistency across agent projects.
  • Telemetry is enabled by default. To opt out, set BETTER_AGENTS_TELEMETRY=0 in your environment.
  • Ensure you have valid API keys for LangWatch and your chosen LLM provider before initializing an agent project.
  • The AGENTS.md and prompts.json manage collaboration-friendly development and versioned prompts. Regularly pull latest tests and scenario changes from the Scenario repository to keep agents aligned with best practices.
  • If you run into issues with prompts or scenarios, verify that the prompts directory is synced with prompts.json and that scenarios include the appropriate test scenarios for your agent framework.

Related MCP Servers

Sponsor this space

Reach thousands of developers