|
| 1 | + |
| 2 | +# Quickstart Guide for KAgnet Tools |
| 3 | + |
| 4 | +## About this guide |
| 5 | + |
| 6 | +This guide provides a quick overview of how to set up and run KAgent tools using AgentGateway. |
| 7 | + |
| 8 | +For more detaled information on KAgent tools, please refer to the [KAgent Tools Documentation](https://kagent.dev/tools). |
| 9 | + |
| 10 | +To learn more about agentgateway, see [AgentGateway](https://agentgateway.dev/docs/about/) |
| 11 | + |
| 12 | +### Running KAgent Tools using AgentGateway |
| 13 | + |
| 14 | +1. Download tools binary and install it. |
| 15 | +2. Download tools configuration file for agentgateway. |
| 16 | +3. Download the agentgateway binary and install it. |
| 17 | +4. Run the agentgateway with the configuration file. |
| 18 | +5. open http://localhost:15000/ui |
| 19 | + |
| 20 | +```bash |
| 21 | +curl -sL https://raw.githubusercontent.com/kagent-dev/tools/refs/heads/main/scripts/install.sh | bash |
| 22 | +curl -sL https://raw.githubusercontent.com/kagent-dev/tools/refs/heads/main/scripts/agentgateway-config-tools.yaml |
| 23 | +curl -sL https://raw.githubusercontent.com/agentgateway/agentgateway/refs/heads/main/common/scripts/get-agentproxy | bash |
| 24 | + |
| 25 | +export PATH=$PATH:$HOME/.local/bin/ |
| 26 | +agentgateway -f agentgateway-config-tools.yaml |
| 27 | +``` |
| 28 | + |
| 29 | +agentgateway-config-tools.yaml: |
| 30 | +```yaml |
| 31 | +binds: |
| 32 | + - port: 30805 |
| 33 | + listeners: |
| 34 | + - routes: |
| 35 | + - policies: |
| 36 | + cors: |
| 37 | + allowOrigins: |
| 38 | + - "*" |
| 39 | + allowHeaders: |
| 40 | + - mcp-protocol-version |
| 41 | + - content-type |
| 42 | + backends: |
| 43 | + - mcp: |
| 44 | + name: default |
| 45 | + targets: |
| 46 | + - name: kagent-tools |
| 47 | + stdio: |
| 48 | + cmd: kagent-tools |
| 49 | + args: ["--stdio", "--kubeconfig", "~/.kube/config"] |
| 50 | +``` |
| 51 | +Afterwards, you can run it with make command |
| 52 | +```bash |
| 53 | +make run-agentgateway |
| 54 | +``` |
| 55 | + |
| 56 | +### Running KAgent Tools using Cursor MCP |
| 57 | + |
| 58 | + |
| 59 | +1. Download the agentgateway binary and install it. |
| 60 | +``` |
| 61 | +curl -sL https://raw.githubusercontent.com/kagent-dev/tools/refs/heads/main/scripts/install.sh | bash |
| 62 | +``` |
| 63 | + |
| 64 | +2. Create `.cursor/mcp.json` |
| 65 | + |
| 66 | +```json |
| 67 | +{ |
| 68 | + "mcpServers": { |
| 69 | + "kagent-tools": { |
| 70 | + "command": "kagent-tools", |
| 71 | + "args": ["--stdio", "--kubeconfig", "~/.kube/config"] |
| 72 | + } |
| 73 | + } |
| 74 | +} |
| 75 | +``` |
| 76 | + |
| 77 | + |
| 78 | + |
0 commit comments