Skip to content

Commit 24c2b31

Browse files
authored
✨ feat: add react agent (#209)
1 parent 3a023dd commit 24c2b31

File tree

7 files changed

+942
-403
lines changed

7 files changed

+942
-403
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ pip install -e .
7171
playwright install
7272
```
7373

74+
MCPMark defaults to the built-in orchestration agent (`MCPMarkAgent`). To experiment with the ReAct-style agent, pass `--agent react` to `pipeline.py` (other settings stay the same).
75+
7476
Docker
7577
```bash
7678
./build-docker.sh

pipeline.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
from src.logger import get_logger
1616
from src.evaluator import MCPEvaluator
17+
from src.agents import AGENT_REGISTRY
1718
from src.factory import MCPServiceFactory
1819
from src.model_config import ModelConfig
1920

@@ -41,6 +42,13 @@ def main():
4142
required=True,
4243
help="Comma-separated list of models to evaluate (e.g., 'o3,k2,gpt-4.1')",
4344
)
45+
46+
parser.add_argument(
47+
"--agent",
48+
default="mcpmark",
49+
choices=sorted(AGENT_REGISTRY.keys()),
50+
help="Agent implementation to use (default: mcpmark)",
51+
)
4452
parser.add_argument(
4553
"--tasks",
4654
default="all",
@@ -138,6 +146,7 @@ def main():
138146
exp_name=run_exp_name,
139147
output_dir=run_output_dir,
140148
reasoning_effort=args.reasoning_effort,
149+
agent_name=args.agent,
141150
)
142151

143152
pipeline.run_evaluation(args.tasks)

src/agents/__init__.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@
22
MCPMark Agent Module
33
====================
44
5-
Provides a unified agent implementation using LiteLLM for model interactions
6-
and minimal MCP server management.
5+
Provides agent implementations and registry for MCPMark.
76
"""
87

8+
from .base_agent import BaseMCPAgent
99
from .mcpmark_agent import MCPMarkAgent
10+
from .react_agent import ReActAgent
11+
12+
AGENT_REGISTRY = {
13+
"mcpmark": MCPMarkAgent,
14+
"react": ReActAgent,
15+
}
16+
17+
__all__ = ["BaseMCPAgent", "MCPMarkAgent", "ReActAgent", "AGENT_REGISTRY"]
1018

11-
__all__ = ["MCPMarkAgent"]

0 commit comments

Comments
 (0)