Langchain Debater banner
VelimirMueller VelimirMueller

Langchain Debater

Development community

Description

A multi-role debate agent built with LangGraph + Claude Sonnet 4.6, instrumented with dual tracing to LangSmith and Langfuse. A personal learning playground for getting hands-on with LangChain / LangGraph and modern LLM observability.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

LangChain Debate Agent

A multi-role debate agent built with **LangGraph** + **Claude Sonnet 4.6**. The proposer and critic have **web research tools** (Tavily search + extract) and use them via a hand-rolled ReAct loop — arguments are grounded in live web evidence rather than model memory alone. Dual tracing to **LangSmith** and **Langfuse** captures every tool call, every ReAct iteration, every decision. A personal learning playground for getting hands-on with LangChain / LangGraph, agent tool use, and modern LLM observability.


What it does

Given a proposition, it runs a structured Oxford-Union-style debate. Five roles share one Claude model; each has its own system prompt and temperature:

  • Setup — initialises the state.
  • Moderator (opening) — frames a sharp focus question from the topic.
  • Proposer — argues for the proposition, engages directly with the critic's previous turn. Has research tools.
  • Critic — argues against, must steelman the proposer's position before attacking. Has research tools.
  • Moderator (distillation) — between rounds, distils agreement/disagreement and poses a sharper follow-up.
  • Judge — at the end of each round, decides whether to continue or emit a verdict. Honors an optional max_rounds cap.

The graph loops through proposer → critic → moderator-distill → judge until the judge rules or the cap is hit. Inside `proposer` and `critic`, each turn runs a **ReAct tool-call loop**: the LLM can call `tavily_search` / `tavily_extract` up to `MAX_TOOL_CALLS=4` times before producing its final prose. Sources appear inline as markdown links `[claim](https://url)`.

Example output (excerpt)

TOPIC: Is transparent algorithmic curation preferable to editorial human curation...
[MODERATOR, round 0]
Should news platforms be required to replace editorial human curation with
transparent algorithmic curation, given that algorithms can be audited for bias
while human editors cannot be held to th