better-agents
Standards for building agents, better
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:
- Install the Better Agents CLI globally (recommended):
npm install -g @langwatch/better-agents
- Initialize a new agent project (example in current directory):
better-agents init .
- If you prefer to bootstrap via npx without global install:
npx @langwatch/better-agents init my-agent-project
-
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.).
-
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
mcp-agent
Build effective agents using Model Context Protocol and simple workflow patterns
ai-trader
Backtrader-powered backtesting framework for algorithmic trading, featuring 20+ strategies, multi-market support, CLI tools, and an integrated MCP server for professional traders.
ultimate_mcp_client
Async Python client for the Model Context Protocol with interactive CLI and reactive Web UI, connecting AI models to MCP servers via stdio and SSE
mcp -js
MCP server that exposes YepCode processes as callable tools for AI platforms. Securely connect AI assistants to your YepCode workflows, APIs, and automations.
mcp-agent
Lightweight, focused utilities to manage connections and execute MCP tools with minimal integration effort. Use it to directly call tools or build simple agents within your current architecture.
akyn-sdk
Turn any data source into an MCP server in 5 minutes. Build AI-agents-ready knowledge bases.