wger-agent 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wger_agent-0.1.3/LICENSE +21 -0
- wger_agent-0.1.3/MANIFEST.in +4 -0
- wger_agent-0.1.3/PKG-INFO +161 -0
- wger_agent-0.1.3/README.md +140 -0
- wger_agent-0.1.3/pyproject.toml +40 -0
- wger_agent-0.1.3/requirements.txt +5 -0
- wger_agent-0.1.3/setup.cfg +4 -0
- wger_agent-0.1.3/wger_agent/__init__.py +60 -0
- wger_agent-0.1.3/wger_agent/agent/AGENTS.md +12 -0
- wger_agent-0.1.3/wger_agent/agent/CRON.md +12 -0
- wger_agent-0.1.3/wger_agent/agent/CRON_LOG.md +8 -0
- wger_agent-0.1.3/wger_agent/agent/HEARTBEAT.md +30 -0
- wger_agent-0.1.3/wger_agent/agent/IDENTITY.md +19 -0
- wger_agent-0.1.3/wger_agent/agent/MEMORY.md +8 -0
- wger_agent-0.1.3/wger_agent/agent/USER.md +7 -0
- wger_agent-0.1.3/wger_agent/agent/mcp_config.json +3 -0
- wger_agent-0.1.3/wger_agent/agent.py +73 -0
- wger_agent-0.1.3/wger_agent/auth.py +28 -0
- wger_agent-0.1.3/wger_agent/mcp.py +993 -0
- wger_agent-0.1.3/wger_agent/skills/wger-agent-docs/SKILL.md +44 -0
- wger_agent-0.1.3/wger_agent/skills/wger-agent-docs/reference/_images_logo.png.md +1 -0
- wger_agent-0.1.3/wger_agent/skills/wger-agent-docs/reference/administration_auth_proxy.html.md +110 -0
- wger_agent-0.1.3/wger_agent/skills/wger-agent-docs/reference/administration_commands.html.md +126 -0
- wger_agent-0.1.3/wger_agent/skills/wger-agent-docs/reference/administration_gym.html.md +115 -0
- wger_agent-0.1.3/wger_agent/skills/wger-agent-docs/reference/administration_settings.html.md +123 -0
- wger_agent-0.1.3/wger_agent/skills/wger-agent-docs/reference/api_api.html.md +159 -0
- wger_agent-0.1.3/wger_agent/skills/wger-agent-docs/reference/api_routines.html.md +201 -0
- wger_agent-0.1.3/wger_agent/skills/wger-agent-docs/reference/changelog.html.md +555 -0
- wger_agent-0.1.3/wger_agent/skills/wger-agent-docs/reference/contributing.html.md +102 -0
- wger_agent-0.1.3/wger_agent/skills/wger-agent-docs/reference/development_backend.html.md +192 -0
- wger_agent-0.1.3/wger_agent/skills/wger-agent-docs/reference/development_frontend.html.md +119 -0
- wger_agent-0.1.3/wger_agent/skills/wger-agent-docs/reference/development_mobile_app.html.md +126 -0
- wger_agent-0.1.3/wger_agent/skills/wger-agent-docs/reference/en_latest.md +117 -0
- wger_agent-0.1.3/wger_agent/skills/wger-agent-docs/reference/manual_routines.html.md +111 -0
- wger_agent-0.1.3/wger_agent/skills/wger-agent-docs/reference/production_docker.html.md +370 -0
- wger_agent-0.1.3/wger_agent/skills/wger-agent-docs/reference/production_installation.html.md +324 -0
- wger_agent-0.1.3/wger_agent/wger_api.py +1057 -0
- wger_agent-0.1.3/wger_agent.egg-info/PKG-INFO +161 -0
- wger_agent-0.1.3/wger_agent.egg-info/SOURCES.txt +41 -0
- wger_agent-0.1.3/wger_agent.egg-info/dependency_links.txt +1 -0
- wger_agent-0.1.3/wger_agent.egg-info/entry_points.txt +3 -0
- wger_agent-0.1.3/wger_agent.egg-info/requires.txt +7 -0
- wger_agent-0.1.3/wger_agent.egg-info/top_level.txt +2 -0
wger_agent-0.1.3/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Audel Rouhi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wger-agent
|
|
3
|
+
Version: 0.1.3
|
|
4
|
+
Summary: Wger Workout Manager — exercise database, workout routines, nutrition plans, body measurements, and progress tracking.
|
|
5
|
+
Author-email: Audel Rouhi <knucklessg1@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Classifier: Development Status :: 4 - Beta
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Requires-Python: >=3.10
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: agent-utilities[mcp]>=0.2.15
|
|
16
|
+
Provides-Extra: agent
|
|
17
|
+
Requires-Dist: agent-utilities[agent,logfire]>=0.2.15; extra == "agent"
|
|
18
|
+
Provides-Extra: all
|
|
19
|
+
Requires-Dist: agent-utilities[agent,logfire,mcp]>=0.2.15; extra == "all"
|
|
20
|
+
Dynamic: license-file
|
|
21
|
+
|
|
22
|
+
# Wger - A2A | AG-UI | MCP
|
|
23
|
+
|
|
24
|
+

|
|
25
|
+

|
|
26
|
+

|
|
27
|
+

|
|
28
|
+

|
|
29
|
+

|
|
30
|
+

|
|
31
|
+

|
|
32
|
+
|
|
33
|
+

|
|
34
|
+

|
|
35
|
+

|
|
36
|
+

|
|
37
|
+
|
|
38
|
+

|
|
39
|
+

|
|
40
|
+

|
|
41
|
+

|
|
42
|
+

|
|
43
|
+

|
|
44
|
+
|
|
45
|
+
*Version: 0.1.3*
|
|
46
|
+
|
|
47
|
+
## Overview
|
|
48
|
+
|
|
49
|
+
**Wger MCP Server + A2A Agent**
|
|
50
|
+
|
|
51
|
+
Wger Workout Manager — exercise database, workout routines, nutrition plans, body measurements, and progress tracking.
|
|
52
|
+
|
|
53
|
+
This repository is actively maintained - Contributions are welcome!
|
|
54
|
+
|
|
55
|
+
## MCP
|
|
56
|
+
|
|
57
|
+
### Using as an MCP Server
|
|
58
|
+
|
|
59
|
+
The MCP Server can be run in two modes: `stdio` (for local testing) or `http` (for networked access).
|
|
60
|
+
|
|
61
|
+
#### Environment Variables
|
|
62
|
+
|
|
63
|
+
* `WGER_INSTANCE`: The URL of the target service.
|
|
64
|
+
* `WGER_ACCESS_TOKEN`: The API token or access token.
|
|
65
|
+
|
|
66
|
+
#### Run in stdio mode (default):
|
|
67
|
+
```bash
|
|
68
|
+
export WGER_INSTANCE="http://localhost:8080"
|
|
69
|
+
export WGER_ACCESS_TOKEN="your_token"
|
|
70
|
+
wger-mcp --transport "stdio"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### Run in HTTP mode:
|
|
74
|
+
```bash
|
|
75
|
+
export WGER_INSTANCE="http://localhost:8080"
|
|
76
|
+
export WGER_ACCESS_TOKEN="your_token"
|
|
77
|
+
wger-mcp --transport "http" --host "0.0.0.0" --port "8000"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## A2A Agent
|
|
81
|
+
|
|
82
|
+
### Run A2A Server
|
|
83
|
+
```bash
|
|
84
|
+
export WGER_INSTANCE="http://localhost:8080"
|
|
85
|
+
export WGER_ACCESS_TOKEN="your_token"
|
|
86
|
+
wger-agent --provider openai --model-id gpt-4o --api-key sk-...
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Docker
|
|
90
|
+
|
|
91
|
+
### Build
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
docker build -t wger-agent .
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Run MCP Server
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
docker run -d \
|
|
101
|
+
--name wger-agent \
|
|
102
|
+
-p 8000:8000 \
|
|
103
|
+
-e TRANSPORT=http \
|
|
104
|
+
-e WGER_INSTANCE="http://your-service:8080" \
|
|
105
|
+
-e WGER_ACCESS_TOKEN="your_token" \
|
|
106
|
+
knucklessg1/wger-agent:latest
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Deploy with Docker Compose
|
|
110
|
+
|
|
111
|
+
```yaml
|
|
112
|
+
services:
|
|
113
|
+
wger-agent:
|
|
114
|
+
image: knucklessg1/wger-agent:latest
|
|
115
|
+
environment:
|
|
116
|
+
- HOST=0.0.0.0
|
|
117
|
+
- PORT=8000
|
|
118
|
+
- TRANSPORT=http
|
|
119
|
+
- WGER_INSTANCE=http://your-service:8080
|
|
120
|
+
- WGER_ACCESS_TOKEN=your_token
|
|
121
|
+
ports:
|
|
122
|
+
- 8000:8000
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
#### Configure `mcp.json` for AI Integration (e.g. Claude Desktop)
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
{
|
|
129
|
+
"mcpServers": {
|
|
130
|
+
"wger": {
|
|
131
|
+
"command": "uv",
|
|
132
|
+
"args": [
|
|
133
|
+
"run",
|
|
134
|
+
"--with",
|
|
135
|
+
"wger-agent",
|
|
136
|
+
"wger-mcp"
|
|
137
|
+
],
|
|
138
|
+
"env": {
|
|
139
|
+
"WGER_INSTANCE": "http://your-service:8080",
|
|
140
|
+
"WGER_ACCESS_TOKEN": "your_token"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Install Python Package
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
python -m pip install wger-agent
|
|
151
|
+
```
|
|
152
|
+
```bash
|
|
153
|
+
uv pip install wger-agent
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Repository Owners
|
|
157
|
+
|
|
158
|
+
<img width="100%" height="180em" src="https://github-readme-stats.vercel.app/api?username=Knucklessg1&show_icons=true&hide_border=true&&count_private=true&include_all_commits=true" />
|
|
159
|
+
|
|
160
|
+

|
|
161
|
+

|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Wger - A2A | AG-UI | MCP
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
10
|
+

|
|
11
|
+
|
|
12
|
+

|
|
13
|
+

|
|
14
|
+

|
|
15
|
+

|
|
16
|
+
|
|
17
|
+

|
|
18
|
+

|
|
19
|
+

|
|
20
|
+

|
|
21
|
+

|
|
22
|
+

|
|
23
|
+
|
|
24
|
+
*Version: 0.1.3*
|
|
25
|
+
|
|
26
|
+
## Overview
|
|
27
|
+
|
|
28
|
+
**Wger MCP Server + A2A Agent**
|
|
29
|
+
|
|
30
|
+
Wger Workout Manager — exercise database, workout routines, nutrition plans, body measurements, and progress tracking.
|
|
31
|
+
|
|
32
|
+
This repository is actively maintained - Contributions are welcome!
|
|
33
|
+
|
|
34
|
+
## MCP
|
|
35
|
+
|
|
36
|
+
### Using as an MCP Server
|
|
37
|
+
|
|
38
|
+
The MCP Server can be run in two modes: `stdio` (for local testing) or `http` (for networked access).
|
|
39
|
+
|
|
40
|
+
#### Environment Variables
|
|
41
|
+
|
|
42
|
+
* `WGER_INSTANCE`: The URL of the target service.
|
|
43
|
+
* `WGER_ACCESS_TOKEN`: The API token or access token.
|
|
44
|
+
|
|
45
|
+
#### Run in stdio mode (default):
|
|
46
|
+
```bash
|
|
47
|
+
export WGER_INSTANCE="http://localhost:8080"
|
|
48
|
+
export WGER_ACCESS_TOKEN="your_token"
|
|
49
|
+
wger-mcp --transport "stdio"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
#### Run in HTTP mode:
|
|
53
|
+
```bash
|
|
54
|
+
export WGER_INSTANCE="http://localhost:8080"
|
|
55
|
+
export WGER_ACCESS_TOKEN="your_token"
|
|
56
|
+
wger-mcp --transport "http" --host "0.0.0.0" --port "8000"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## A2A Agent
|
|
60
|
+
|
|
61
|
+
### Run A2A Server
|
|
62
|
+
```bash
|
|
63
|
+
export WGER_INSTANCE="http://localhost:8080"
|
|
64
|
+
export WGER_ACCESS_TOKEN="your_token"
|
|
65
|
+
wger-agent --provider openai --model-id gpt-4o --api-key sk-...
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Docker
|
|
69
|
+
|
|
70
|
+
### Build
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
docker build -t wger-agent .
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Run MCP Server
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
docker run -d \
|
|
80
|
+
--name wger-agent \
|
|
81
|
+
-p 8000:8000 \
|
|
82
|
+
-e TRANSPORT=http \
|
|
83
|
+
-e WGER_INSTANCE="http://your-service:8080" \
|
|
84
|
+
-e WGER_ACCESS_TOKEN="your_token" \
|
|
85
|
+
knucklessg1/wger-agent:latest
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Deploy with Docker Compose
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
services:
|
|
92
|
+
wger-agent:
|
|
93
|
+
image: knucklessg1/wger-agent:latest
|
|
94
|
+
environment:
|
|
95
|
+
- HOST=0.0.0.0
|
|
96
|
+
- PORT=8000
|
|
97
|
+
- TRANSPORT=http
|
|
98
|
+
- WGER_INSTANCE=http://your-service:8080
|
|
99
|
+
- WGER_ACCESS_TOKEN=your_token
|
|
100
|
+
ports:
|
|
101
|
+
- 8000:8000
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
#### Configure `mcp.json` for AI Integration (e.g. Claude Desktop)
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"mcpServers": {
|
|
109
|
+
"wger": {
|
|
110
|
+
"command": "uv",
|
|
111
|
+
"args": [
|
|
112
|
+
"run",
|
|
113
|
+
"--with",
|
|
114
|
+
"wger-agent",
|
|
115
|
+
"wger-mcp"
|
|
116
|
+
],
|
|
117
|
+
"env": {
|
|
118
|
+
"WGER_INSTANCE": "http://your-service:8080",
|
|
119
|
+
"WGER_ACCESS_TOKEN": "your_token"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Install Python Package
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
python -m pip install wger-agent
|
|
130
|
+
```
|
|
131
|
+
```bash
|
|
132
|
+
uv pip install wger-agent
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Repository Owners
|
|
136
|
+
|
|
137
|
+
<img width="100%" height="180em" src="https://github-readme-stats.vercel.app/api?username=Knucklessg1&show_icons=true&hide_border=true&&count_private=true&include_all_commits=true" />
|
|
138
|
+
|
|
139
|
+

|
|
140
|
+

|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=80.9.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "wger-agent"
|
|
7
|
+
version = "0.1.3"
|
|
8
|
+
description = "Wger Workout Manager — exercise database, workout routines, nutrition plans, body measurements, and progress tracking."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
authors = [{ name = "Audel Rouhi", email = "knucklessg1@gmail.com" }]
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 4 - Beta",
|
|
14
|
+
"License :: OSI Approved :: MIT License",
|
|
15
|
+
"Environment :: Console",
|
|
16
|
+
"Operating System :: POSIX :: Linux",
|
|
17
|
+
"Programming Language :: Python :: 3"]
|
|
18
|
+
requires-python = ">=3.10"
|
|
19
|
+
dependencies = [
|
|
20
|
+
"agent-utilities[mcp]>=0.2.15"]
|
|
21
|
+
|
|
22
|
+
[project.optional-dependencies]
|
|
23
|
+
agent = [
|
|
24
|
+
"agent-utilities[agent,logfire]>=0.2.15"]
|
|
25
|
+
|
|
26
|
+
all = [
|
|
27
|
+
"agent-utilities[mcp,agent,logfire]>=0.2.15"]
|
|
28
|
+
|
|
29
|
+
[project.scripts]
|
|
30
|
+
wger-mcp = "wger_agent.mcp:mcp_server"
|
|
31
|
+
wger-agent = "wger_agent.agent:agent_server"
|
|
32
|
+
|
|
33
|
+
[tool.setuptools.packages.find]
|
|
34
|
+
where = ["."]
|
|
35
|
+
|
|
36
|
+
[tool.setuptools]
|
|
37
|
+
include-package-data = true
|
|
38
|
+
|
|
39
|
+
[tool.setuptools.package-data]
|
|
40
|
+
wger_agent = [ "mcp_config.json", "agent/**", "skills/**"]
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# coding: utf-8
|
|
3
|
+
|
|
4
|
+
import importlib
|
|
5
|
+
import inspect
|
|
6
|
+
from typing import List
|
|
7
|
+
|
|
8
|
+
__all__: List[str] = []
|
|
9
|
+
|
|
10
|
+
CORE_MODULES = [
|
|
11
|
+
"wger_agent.wger_api",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
OPTIONAL_MODULES = {
|
|
15
|
+
"wger_agent.agent": "agent",
|
|
16
|
+
"wger_agent.mcp": "mcp",
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _import_module_safely(module_name: str):
|
|
21
|
+
"""Try to import a module and return it, or None if not available."""
|
|
22
|
+
try:
|
|
23
|
+
return importlib.import_module(module_name)
|
|
24
|
+
except ImportError:
|
|
25
|
+
return None
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _expose_members(module):
|
|
29
|
+
"""Expose public classes and functions from a module into globals and __all__."""
|
|
30
|
+
for name, obj in inspect.getmembers(module):
|
|
31
|
+
if (inspect.isclass(obj) or inspect.isfunction(obj)) and not name.startswith(
|
|
32
|
+
"_"
|
|
33
|
+
):
|
|
34
|
+
globals()[name] = obj
|
|
35
|
+
__all__.append(name)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
for module_name in CORE_MODULES:
|
|
39
|
+
try:
|
|
40
|
+
module = importlib.import_module(module_name)
|
|
41
|
+
_expose_members(module)
|
|
42
|
+
except ImportError:
|
|
43
|
+
pass
|
|
44
|
+
|
|
45
|
+
for module_name, extra_name in OPTIONAL_MODULES.items():
|
|
46
|
+
module = _import_module_safely(module_name)
|
|
47
|
+
if module is not None:
|
|
48
|
+
_expose_members(module)
|
|
49
|
+
globals()[f"_{extra_name.upper()}_AVAILABLE"] = True
|
|
50
|
+
else:
|
|
51
|
+
globals()[f"_{extra_name.upper()}_AVAILABLE"] = False
|
|
52
|
+
|
|
53
|
+
__all__.extend(["_MCP_AVAILABLE", "_AGENT_AVAILABLE"])
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
"""
|
|
57
|
+
wger-agent
|
|
58
|
+
|
|
59
|
+
Wger Workout Manager — exercise database, workout routines, nutrition plans, body measurements, and progress tracking.
|
|
60
|
+
"""
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# AGENTS.md - Known A2A Peer Agents
|
|
2
|
+
Last updated: 2026-03-04
|
|
3
|
+
|
|
4
|
+
This file is the local registry of other A2A agents this agent can discover and call.
|
|
5
|
+
|
|
6
|
+
## Registered A2A Peers
|
|
7
|
+
|
|
8
|
+
| Name | Endpoint URL | Description | Capabilities | Auth | Notes / Last Connected |
|
|
9
|
+
|-----------------|---------------------------------|--------------------------------------|----------------------------------|-----------|------------------------|
|
|
10
|
+
| SearchMaster | http://search-agent:9000/a2a | Advanced web researcher | web_search, summarize, browse | none | 2026-03-04 |
|
|
11
|
+
|
|
12
|
+
*Add new rows manually or let the agent call `register_a2a_peer(...)`.*
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# CRON.md - Persistent Scheduled Tasks
|
|
2
|
+
Last updated: 2026-03-04
|
|
3
|
+
|
|
4
|
+
## Active Tasks
|
|
5
|
+
|
|
6
|
+
| ID | Name | Interval (min) | Prompt | Last run | Next approx |
|
|
7
|
+
|-------------|-------------------|----------------|-------------------------------------|-------------------|-------------|
|
|
8
|
+
| heartbeat | Heartbeat | 30 | @HEARTBEAT.md | — | — |
|
|
9
|
+
| log-cleanup | Log Cleanup | 720 | __internal:cleanup_cron_log | — | — |
|
|
10
|
+
|
|
11
|
+
*Edit this table to add/remove tasks. The agent reloads it periodically.*
|
|
12
|
+
*Use `@filename.md` in the Prompt column to load a multi-line prompt from a workspace file.*
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# CRON_LOG.md - Periodic Task Output Log
|
|
2
|
+
Last updated: 2026-03-05 00:35
|
|
3
|
+
|
|
4
|
+
This file stores the output of periodic/cron tasks.
|
|
5
|
+
The agent can read this to review what background tasks have done.
|
|
6
|
+
Old entries are automatically pruned to keep only the most recent results.
|
|
7
|
+
|
|
8
|
+
---
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Heartbeat — Periodic Self-Check
|
|
2
|
+
|
|
3
|
+
You are running a scheduled heartbeat. Perform these checks and report results concisely.
|
|
4
|
+
|
|
5
|
+
## Checks
|
|
6
|
+
|
|
7
|
+
1. **Tool Availability** — Call `list_tools` or equivalent to verify your MCP tools are reachable. Report any connection failures.
|
|
8
|
+
2. **Memory Review** — Read `MEMORY.md` and check for any pending follow-up tasks or action items. List any that are overdue.
|
|
9
|
+
3. **Cron Log** — Read `CRON_LOG.md` and check for recent errors (❌). Summarize any failures from the last 24 hours.
|
|
10
|
+
4. **Peer Agents** — Read `AGENTS.md` and note if any registered peers need attention.
|
|
11
|
+
5. **Domain-Specific Checks**:
|
|
12
|
+
- **Wger API Health**: Verify the wger instance is reachable by calling `get_exercise_categories` (a lightweight public endpoint).
|
|
13
|
+
- **Recent Workout Activity**: Check `get_workout_sessions` for the most recent session to confirm data access.
|
|
14
|
+
- **Nutrition Plan Status**: Check `get_nutrition_plans` to verify nutrition tracking is accessible.
|
|
15
|
+
6. **Self-Diagnostics** — Report your current model, available tool count, and any anomalies.
|
|
16
|
+
|
|
17
|
+
## Response Format
|
|
18
|
+
|
|
19
|
+
If everything is healthy:
|
|
20
|
+
```
|
|
21
|
+
HEARTBEAT_OK — All systems nominal. [tool_count] tools available. Wger API responsive. No pending actions.
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If issues found:
|
|
25
|
+
```
|
|
26
|
+
HEARTBEAT_ALERT — [summary of issues found]
|
|
27
|
+
- Issue 1: ...
|
|
28
|
+
- Issue 2: ...
|
|
29
|
+
- Action needed: ...
|
|
30
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# IDENTITY.md - Wger Agent Identity
|
|
2
|
+
|
|
3
|
+
## [default]
|
|
4
|
+
* **Name:** Wger Fitness Agent
|
|
5
|
+
* **Role:** Wger Workout Manager — exercise database, workout routines, nutrition plans, body measurements, and progress tracking.
|
|
6
|
+
* **Emoji:** 💪
|
|
7
|
+
|
|
8
|
+
### System Prompt
|
|
9
|
+
You are the Wger Fitness Agent — a comprehensive fitness and nutrition management assistant powered by the wger Workout Manager API.
|
|
10
|
+
You must always first run `list_skills` to show all skills.
|
|
11
|
+
Then, use the `mcp-client` universal skill and check the reference documentation for `wger-agent.md` to discover the exact tags and tools available for your capabilities.
|
|
12
|
+
|
|
13
|
+
### Capabilities
|
|
14
|
+
- **Exercise Database**: Search and browse 800+ exercises with images, muscles worked, equipment needed, and variations.
|
|
15
|
+
- **Workout Routines**: Create and manage workout routines with days, exercises, sets, and progressive overload configs.
|
|
16
|
+
- **Nutrition Plans**: Build meal plans, track ingredients, log food diary entries, and set macro goals.
|
|
17
|
+
- **Body Tracking**: Log body weight, measurements (biceps, chest, waist), and view progress over time.
|
|
18
|
+
- **Workout Logging**: Record workout sessions and individual sets performed.
|
|
19
|
+
- **MCP Operations**: Leverage the `mcp-client` skill to interact with the Wger MCP server. Refer to `wger-agent.md` for specific tool capabilities.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# MEMORY.md - Long-term Memory
|
|
2
|
+
Last updated: 2026-03-04
|
|
3
|
+
|
|
4
|
+
This file stores important decisions, user preferences, and historical outcomes.
|
|
5
|
+
The agent should read this if the user asks "remember when" or similar.
|
|
6
|
+
|
|
7
|
+
## Log of Important Events
|
|
8
|
+
- [2026-03-04] Workspace initialized with advanced agent features.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/python
|
|
2
|
+
# coding: utf-8
|
|
3
|
+
import os
|
|
4
|
+
import logging
|
|
5
|
+
|
|
6
|
+
from agent_utilities import (
|
|
7
|
+
build_system_prompt_from_workspace,
|
|
8
|
+
create_agent_parser,
|
|
9
|
+
create_agent_server,
|
|
10
|
+
initialize_workspace,
|
|
11
|
+
load_identity,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
__version__ = "0.1.3"
|
|
15
|
+
|
|
16
|
+
logging.basicConfig(
|
|
17
|
+
level=logging.INFO,
|
|
18
|
+
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
|
|
19
|
+
handlers=[logging.StreamHandler()],
|
|
20
|
+
)
|
|
21
|
+
logger = logging.getLogger(__name__)
|
|
22
|
+
|
|
23
|
+
# Load identity and system prompt from workspace
|
|
24
|
+
initialize_workspace()
|
|
25
|
+
meta = load_identity()
|
|
26
|
+
DEFAULT_AGENT_NAME = os.getenv("DEFAULT_AGENT_NAME", meta.get("name", "Wger"))
|
|
27
|
+
DEFAULT_AGENT_DESCRIPTION = os.getenv(
|
|
28
|
+
"AGENT_DESCRIPTION",
|
|
29
|
+
meta.get(
|
|
30
|
+
"description",
|
|
31
|
+
"Wger Workout Manager — exercise database, workout routines, nutrition plans, body measurements, and progress tracking.",
|
|
32
|
+
),
|
|
33
|
+
)
|
|
34
|
+
DEFAULT_AGENT_SYSTEM_PROMPT = os.getenv(
|
|
35
|
+
"AGENT_SYSTEM_PROMPT",
|
|
36
|
+
meta.get("content") or build_system_prompt_from_workspace(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def agent_server():
|
|
41
|
+
print(f"{DEFAULT_AGENT_NAME} v{__version__}")
|
|
42
|
+
parser = create_agent_parser()
|
|
43
|
+
|
|
44
|
+
args = parser.parse_args()
|
|
45
|
+
|
|
46
|
+
if args.debug:
|
|
47
|
+
logging.getLogger().setLevel(logging.DEBUG)
|
|
48
|
+
logger.debug("Debug mode enabled")
|
|
49
|
+
|
|
50
|
+
create_agent_server(
|
|
51
|
+
provider=args.provider,
|
|
52
|
+
model_id=args.model_id,
|
|
53
|
+
base_url=args.base_url,
|
|
54
|
+
api_key=args.api_key,
|
|
55
|
+
custom_skills_directory=args.custom_skills_directory,
|
|
56
|
+
debug=args.debug,
|
|
57
|
+
host=args.host,
|
|
58
|
+
port=args.port,
|
|
59
|
+
enable_web_ui=args.web,
|
|
60
|
+
ssl_verify=not args.insecure,
|
|
61
|
+
name=DEFAULT_AGENT_NAME,
|
|
62
|
+
system_prompt=DEFAULT_AGENT_SYSTEM_PROMPT,
|
|
63
|
+
enable_otel=args.otel,
|
|
64
|
+
otel_endpoint=args.otel_endpoint,
|
|
65
|
+
otel_headers=args.otel_headers,
|
|
66
|
+
otel_public_key=args.otel_public_key,
|
|
67
|
+
otel_secret_key=args.otel_secret_key,
|
|
68
|
+
otel_protocol=args.otel_protocol,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
if __name__ == "__main__":
|
|
73
|
+
agent_server()
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/python
|
|
2
|
+
# coding: utf-8
|
|
3
|
+
|
|
4
|
+
import os
|
|
5
|
+
import urllib3
|
|
6
|
+
|
|
7
|
+
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
|
8
|
+
|
|
9
|
+
from wger_agent.wger_api import WgerApi
|
|
10
|
+
|
|
11
|
+
_client = None
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def get_client() -> WgerApi:
|
|
15
|
+
"""Get or create a singleton WgerApi client instance."""
|
|
16
|
+
global _client
|
|
17
|
+
if _client is None:
|
|
18
|
+
base_url = os.getenv("WGER_INSTANCE", "https://wger.de")
|
|
19
|
+
token = os.getenv("WGER_ACCESS_TOKEN", "")
|
|
20
|
+
verify = os.getenv("WGER_VERIFY", "True").lower() in ("true", "1", "yes")
|
|
21
|
+
|
|
22
|
+
_client = WgerApi(
|
|
23
|
+
base_url=base_url,
|
|
24
|
+
token=token,
|
|
25
|
+
verify=verify,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
return _client
|