Better Agents is a CLI tool and agent project harness developed by LangWatch. It acts as a standardized reliability layer for building, testing, and evaluating AI agents, serving as a framework-agnostic scaffold that works alongside libraries like Agno, Mastra, LangGraph, and the Vercel AI SDK. Day-to-day development revolves around a structured project layout containing agent runtime code (`app/` or `src/`), scenario-based conversational tests, component evaluations, and version-controlled YAML prompts. Better Agents integrates with coding assistants such as Claude Code, Cursor, and Kilocode via Model Context Protocol configurations (`.mcp.json`) and repository guidelines (`AGENTS.md`), providing the assistant with architectural context and testing standards. Unlike standalone coding agents or isolated agent SDKs, Better Agents functions as an orchestrating harness. It standardizes conversational regression testing using simulated user agents and evaluation judges, verifying multi-turn conversational flows, tool invocations, and state transitions through standard test runners like pytest and Vitest while syncing run metrics directly to the LangWatch platform. The CLI package is distributed freely via npm for local project scaffolding and execution, integrating with LangWatch's hosted and self-hosted tiers for simulation visualization and observability.
Tags: agent harness, ai agent, cli, developer tools, Generative AI
.mcp.json and AGENTS.md context files so coding assistants like Claude Code and Cursor understand project conventions. - Versioned prompt management — Maintains YAML-formatted prompt templates tracked through a local prompts.json registry synced with LangWatch. - Native test runner execution — Executes end-to-end multi-agent simulations and deterministic assertions directly through pytest (Python) or Vitest/npm test (TypeScript). - LangWatch platform synchronization — Automatically streams scenario execution traces, evaluation metrics, and test run outcomes to the LangWatch Simulations dashboard.AGENTS.md). This provides tools like Claude Code or Cursor with explicit framework best practices and scaffolding rules from the start.Designed for AI engineers and software developers building production-grade conversational agents in Python or TypeScript who need structured testing, prompt versioning, and CI/CD validation. It is less relevant for developers looking for an autonomous terminal code-editing agent or teams instrumenting legacy codebases who only need LangWatch's direct observability SDKs.
bash npm install -g @langwatch/better-agents Alternatively, you can initialize a project directly using npx without a global installation: bash npx @langwatch/better-agents init my-agent-projectbash better-agents init my-better-agent cd my-better-agent 2. Configure your environment variables in .env with your LLM provider API keys and LangWatch API credentials: bash cp .env.example .env # Populate OPENAI_API_KEY, ANTHROPIC_API_KEY, and LANGWATCH_API_KEYbash # For Python projects pytest tests/scenarios/ -v # For TypeScript projects npm testPart of CLI Coding Agents
Categories: AI Coding Agents, Chatbot Development, Developer Tools