You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/evals.md
+3-23Lines changed: 3 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# Running Benchmarks
1
+
# Running Evals
2
2
3
-
<emclass="wags-brand">wags</em> includes evaluation support for the [Berkeley Function Call Leaderboard (BFCL)](https://gorilla.cs.berkeley.edu/leaderboard.html), enabling systematic testing of LLM function calling capabilities across multi-turn conversations.
3
+
Here's how to run BFCL multi-turn evaluations with <spanclass="wags-brand">wags</span>.
Copy file name to clipboardExpand all lines: docs/index.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,20 @@ The <span class="wags-brand">wags</span> toolkit is based on state-of-the-art re
10
10
11
11
<divclass="grid cards"markdown>
12
12
13
-
-**[Getting Started](quickstart.md)**
13
+
-**[Quick Start](quickstart.md)**
14
14
15
-
Install <spanclass="wags-brand">wags</span> and create your first <spanclass="wags-brand">wags</span> enhanced server in minutes. See [`servers/github/`](https://github.com/chughtapan/wags/tree/main/servers/github) for a complete example.
15
+
Connect to existing <spanclass="wags-brand">wags</span> servers and start using enhanced MCP features immediately.
16
+
17
+
-**[Onboarding New Servers](onboarding.md)**
18
+
19
+
Create your first <spanclass="wags-brand">wags</span> enhanced server with middleware. See [`servers/github/`](https://github.com/chughtapan/wags/tree/main/servers/github) for a complete example.
16
20
17
21
-**[Middleware](middleware/overview.md)**
18
22
19
-
Learn about available middleware and how to use them
23
+
Learn about available middleware and how to use them.
24
+
25
+
-**[Running Evals](evals.md)**
26
+
27
+
Execute BFCL benchmarks to evaluate agent performance with <spanclass="wags-brand">wags</span> servers.
{"content": "Fix error in utils.py", "status": "in_progress"},
37
-
{"content": "Fix error in api.py", "status": "pending"},
38
-
{"content": "Fix error in models.py", "status": "pending"}
39
-
])
40
-
41
-
# 5. Agent fixes each error, updating status after each one
42
-
# ... continues until all completed
43
-
```
16
+
When todo integration is enabled, the target MCP server is provided TodoWrite tools which help track the detailed tasks to be done and the current progress. Additionally, detailed instructions are provided to break down task into actionable steps, update status before and after each task, maintain exactly one task as `in_progress`, mark completed immediately after finishing, etc.
44
17
45
-
## How it works?
18
+
For example, when an agent receives the task "Build project and fix errors":
19
+
20
+
1. Agent calls `TodoWrite` to create initial todos:
21
+
- "Build project" (pending)
22
+
- "Fix errors" (pending)
23
+
24
+
2. Agent starts first task by updating status to `in_progress`
25
+
26
+
3. Agent runs build tool, finds 3 errors
27
+
28
+
4. Agent updates todos to reflect discovered errors:
29
+
- "Build project" (completed)
30
+
- "Fix error in utils.py" (in_progress)
31
+
- "Fix error in api.py" (pending)
32
+
- "Fix error in models.py" (pending)
33
+
34
+
5. Agent fixes each error, updating status after each one until all completed
46
35
47
-
When todo integration is enabled, the target MCP server is provided TodoWrite tools which help track the detailed tasks to be done and the current progress. Additionally, detailed instructions are provided to break down task into actionable steps, update status before and after each task, maintain exactly one task as `in_progress`, mark completed immediately after finishing, etc. See `src/wags/middleware/todo.py` for the full instruction text.
36
+
See `src/wags/middleware/todo.py` for the full instruction text.
48
37
49
38
**Note:** Instructions from proxy server must be included in the agent prompt. For `fast-agent` the `{{serverInstructions}}` macro enables this feature.
Learn how to create a <spanclass="wags-brand">wags</span> proxy server that wraps existing MCP servers with middleware.
4
+
5
+
## Prerequisites
6
+
7
+
- <spanclass="wags-brand">wags</span> installed (see [Quick Start](quickstart.md) for installation)
8
+
- Basic understanding of [MCP (Model Context Protocol)](https://modelcontextprotocol.io/docs/getting-started/intro)
9
+
- An existing MCP server to work with
10
+
11
+
## Creating a <spanclass="wags-brand">wags</span> Proxy Server
12
+
13
+
<spanclass="wags-brand">wags</span> provides the `quickstart` command to generate proxy servers that wrap existing MCP servers with middleware.
14
+
15
+
!!! tip "Complete Example Available"
16
+
The complete implementation for the [GitHub MCP Server](https://github.com/github/github-mcp-server) is in `servers/github/`.
17
+
18
+
### Step 1: Prepare Your MCP Server Configuration
19
+
20
+
Create a configuration file that describes your MCP server. Save it as `config.json`:
21
+
22
+
```json title="config.json"
23
+
--8<-- "snippets/quickstart/config.json"
24
+
```
25
+
26
+
### Step 2: Generate the Proxy Server
27
+
28
+
Use the `quickstart` command to generate middleware handlers and main file:
29
+
30
+
```bash
31
+
# Generate both handlers and main files
32
+
wags quickstart config.json
33
+
34
+
# Or with custom file names
35
+
wags quickstart config.json \
36
+
--handlers-file github_handlers.py \
37
+
--main-file github_proxy.py
38
+
```
39
+
40
+
### Step 3: Add Middleware Decorators
41
+
42
+
Edit the generated handlers file to add middleware decorators:
43
+
44
+
```python linenums="1" title="handlers.py"
45
+
--8<--"snippets/quickstart/handlers.py"
46
+
```
47
+
48
+
### Step 4: Attach Middleware to your MCP Server
49
+
50
+
The automatically generated main.py includes (commented) code to attach <spanclass="wags-brand">wags</span> middleware to your MCP server. You should edit the file to uncomment the middleware you need:
51
+
52
+
```python linenums="1" title="main.py"
53
+
--8<--"snippets/quickstart/main.py"
54
+
```
55
+
56
+
### Step 5: Run Your Proxy Server
57
+
58
+
```bash
59
+
# Run directly
60
+
python main.py
61
+
62
+
# Or use wags start-server
63
+
wags start-server servers/your-server
64
+
```
65
+
66
+
Your proxy server is now running!
67
+
68
+
### Step 6 (Optional): Add to Shared Configuration
69
+
70
+
To use your server with `wags run`, add it to `servers/fastagent.config.yaml`:
71
+
72
+
```yaml
73
+
mcp:
74
+
servers:
75
+
your-server:
76
+
transport: stdio
77
+
command: wags
78
+
args:
79
+
- start-server
80
+
- servers/your-server
81
+
env:
82
+
API_KEY: ${YOUR_API_KEY}
83
+
roots:
84
+
- uri: https://example.com/allowed
85
+
name: "Allowed Resources"
86
+
```
87
+
88
+
Now you can connect to your server with:
89
+
90
+
```bash
91
+
wags run --servers your-server
92
+
```
93
+
94
+
## Learn More
95
+
96
+
-**[Middleware Overview](middleware/overview.md)** - Understand how middleware works
97
+
-**[Roots](middleware/roots.md)** - Access control with URI templates
98
+
-**[Elicitation](middleware/elicitation.md)** - Parameter review and collection
Get up and running with <spanclass="wags-brand">wags</span> in just a few minutes. This guide will walk you through installation and creating a proxy server with middleware for existing MCP servers.
3
+
Get started with <spanclass="wags-brand">wags</span> by connecting to existing wags servers.
4
4
5
5
## Prerequisites
6
6
7
7
- Python 3.13.5 or higher
8
-
-[`uv` package manager](https://docs.astral.sh/uv/getting-started/installation/) (recommended) or `pip`
9
-
- Basic understanding of [MCP (Model Context Protocol)](https://modelcontextprotocol.io/docs/getting-started/intro)
> ⚠️ **Warning**: <spanclass="wags-brand">wags</span> is based on ongoing research and is under active development. Features and APIs may change.
12
+
> ⚠️ **Warning**: <spanclass="wags-brand">wags</span> is based on ongoing research and is under active development. Features and APIs may change. Some experimental MCP features are only supported in our fork of [fast-agent](https://github.com/chughtapan/fast-agent) included with <spanclass="wags-brand">wags</span>.
15
13
16
14
```bash
17
15
# Clone the repository
@@ -38,61 +36,24 @@ WAGS version 0.1.0
38
36
FastMCP version x.x.x
39
37
```
40
38
41
-
## Creating a <spanclass="wags-brand">wags</span> Proxy Server
39
+
## Getting Started
42
40
43
-
<spanclass="wags-brand">wags</span> provides the `quickstart` command to generate proxy servers that wrap existing MCP servers with middleware.
44
-
45
-
!!! tip "Complete Example Available"
46
-
The complete implementation for the [GitHub MCP Server](https://github.com/github/github-mcp-server) is in `servers/github/`.
47
-
48
-
### Step 1: Prepare Your MCP Server Configuration
49
-
50
-
Create a configuration file that describes your MCP server. Save it as `config.json`:
51
-
52
-
```json title="config.json"
53
-
--8<-- "snippets/quickstart/config.json"
54
-
```
55
-
56
-
### Step 2: Generate the Proxy Server
57
-
58
-
Use the `quickstart` command to generate middleware handlers and main file:
41
+
The easiest way to connect to wags servers is using the `wags run` command:
59
42
60
43
```bash
61
-
# Generate both handlers and main files
62
-
wags quickstart config.json
63
-
64
-
# Or with custom file names
65
-
wags quickstart config.json \
66
-
--handlers-file github_handlers.py \
67
-
--main-file github_proxy.py
68
-
```
44
+
# Connect to all configured servers
45
+
wags run
69
46
70
-
### Step 3: Add Middleware Decorators
47
+
# Connect to specific servers only
48
+
wags run --servers github
71
49
72
-
Edit the generated handlers file to add middleware decorators:
73
-
74
-
```python linenums="1" title="handlers.py"
75
-
--8<--"snippets/quickstart/handlers.py"
76
-
```
77
-
78
-
### Step 4: Attach Middleware to your MCP Server
79
-
80
-
The automatically generated main.py includes (commented) code to attach <spanclass="wags-brand">wags</span> middleware to your MCP server. You should edit the file to uncomment the middleware you need:
81
-
82
-
```python linenums="1" title="main.py"
83
-
--8<--"snippets/quickstart/main.py"
84
-
```
85
-
86
-
### Step 5: Run Your Proxy Server
87
-
88
-
```bash
89
-
python main.py
50
+
# Use a different model
51
+
wags run --model claude-3-5-sonnet-20241022
90
52
```
91
53
92
-
Your proxy server is now running!
54
+
`wags run` invokes fast-agent with a configuration file ([`servers/fastagent.config.yaml`](https://github.com/chughtapan/wags/blob/main/servers/fastagent.config.yaml)) and basic instructions ([`src/wags/utils/agent_instructions.txt`](https://github.com/chughtapan/wags/blob/main/src/wags/utils/agent_instructions.txt)), and connects to all servers by default. You can configure which servers to connect to using the `--servers` flag or create your own configuration and instruction files - see the [fast-agent documentation](https://github.com/chughtapan/fast-agent) for more details.
93
55
94
-
## Learn More
56
+
## Next Steps
95
57
96
-
-**[Middleware Overview](middleware/overview.md)** - Understand how middleware works
97
-
-**[Roots](middleware/roots.md)** - Access control with URI templates
98
-
-**[Elicitation](middleware/elicitation.md)** - Parameter review and collection
58
+
-**[Onboarding New Servers](onboarding.md)** - Create your own wags server with middleware
59
+
-**[Middleware Overview](middleware/overview.md)** - Understand available middleware features
0 commit comments