agentcheckpoint 1.0.0__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.
- agentcheckpoint-1.0.0/LICENSE +21 -0
- agentcheckpoint-1.0.0/PKG-INFO +320 -0
- agentcheckpoint-1.0.0/README.md +293 -0
- agentcheckpoint-1.0.0/pyproject.toml +40 -0
- agentcheckpoint-1.0.0/setup.cfg +4 -0
- agentcheckpoint-1.0.0/src/agentcheckpoint/__init__.py +3 -0
- agentcheckpoint-1.0.0/src/agentcheckpoint/__main__.py +6 -0
- agentcheckpoint-1.0.0/src/agentcheckpoint/server.py +551 -0
- agentcheckpoint-1.0.0/src/agentcheckpoint.egg-info/PKG-INFO +320 -0
- agentcheckpoint-1.0.0/src/agentcheckpoint.egg-info/SOURCES.txt +12 -0
- agentcheckpoint-1.0.0/src/agentcheckpoint.egg-info/dependency_links.txt +1 -0
- agentcheckpoint-1.0.0/src/agentcheckpoint.egg-info/entry_points.txt +2 -0
- agentcheckpoint-1.0.0/src/agentcheckpoint.egg-info/requires.txt +5 -0
- agentcheckpoint-1.0.0/src/agentcheckpoint.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ernesto Maldonado
|
|
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,320 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentcheckpoint
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: MCP checkpoint server: atomic state coordination for AI agents, cron workers, and multi-agent systems
|
|
5
|
+
Author-email: Ernesto Maldonado <erniomaldo@users.noreply.github.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/erniomaldo/agentcheckpoint
|
|
8
|
+
Project-URL: Source, https://github.com/erniomaldo/agentcheckpoint
|
|
9
|
+
Project-URL: Documentation, https://github.com/erniomaldo/agentcheckpoint#readme
|
|
10
|
+
Keywords: mcp,checkpoint,state,agent,coordination,hermes,sqlite
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: mcp>=1.0.0
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: build>=1.0; extra == "dev"
|
|
25
|
+
Requires-Dist: twine>=5.0; extra == "dev"
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# AgentCheckpoint
|
|
29
|
+
|
|
30
|
+
**Servidor MCP de almacenamiento atómico clave-valor para coordinación de agentes de IA.**
|
|
31
|
+
|
|
32
|
+
Evita que tus agentes de IA trabajen con estado obsoleto. AgentCheckpoint es un servidor
|
|
33
|
+
MCP (Model Context Protocol) minimalista respaldado por SQLite que brinda a tus agentes
|
|
34
|
+
un almacén de estado compartido y atómico — **siempre devolviendo el último valor escrito**.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pip install agentcheckpoint
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Luego agrégalo a tu cliente MCP:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"mcpServers": {
|
|
45
|
+
"checkpoint": {
|
|
46
|
+
"command": "agentcheckpoint",
|
|
47
|
+
"timeout": 10
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## El Problema
|
|
54
|
+
|
|
55
|
+
Los almacenes de memoria semántica (bases vectoriales, agentmemory, etc.) están diseñados
|
|
56
|
+
para hechos, no para coordinación de estado. Cuando múltiples agentes leen/escriben
|
|
57
|
+
estado compartido:
|
|
58
|
+
|
|
59
|
+
- `memory.save()` crea **nuevas entradas** en lugar de actualizar — se acumulan decenas
|
|
60
|
+
de versiones obsoletas
|
|
61
|
+
- `memory.recall()` devuelve resultados por **similitud semántica**, no por la última
|
|
62
|
+
marca de tiempo
|
|
63
|
+
- Los agentes leen estado desactualizado y **vuelven a ejecutar trabajo ya completado**
|
|
64
|
+
|
|
65
|
+
## La Solución — 100 líneas de Python
|
|
66
|
+
|
|
67
|
+
AgentCheckpoint es un almacén clave-valor con escrituras atómicas, **diseñado para
|
|
68
|
+
coordinación de estado, no para memoria**.
|
|
69
|
+
|
|
70
|
+
- **Siempre lo último** — `get_state(key)` devuelve el único valor actual
|
|
71
|
+
- **Escrituras atómicas** — `force_set_state(key, value)` siempre actualiza, nunca añade
|
|
72
|
+
- **Seguro contra conflictos** — `set_state(key, value, expected_version)` detecta
|
|
73
|
+
conflictos de lectura-modificación-escritura
|
|
74
|
+
- **Respaldado por SQLite** — cero infraestructura, un solo archivo, modo WAL
|
|
75
|
+
- **Una tabla, cinco herramientas** — lo suficientemente simple para entenderlo en 5 minutos
|
|
76
|
+
|
|
77
|
+
## Herramientas
|
|
78
|
+
|
|
79
|
+
| Herramienta | Descripción |
|
|
80
|
+
|-------------|-------------|
|
|
81
|
+
| `get_state` | Lee el valor actual, versión y timestamp de una clave |
|
|
82
|
+
| `set_state` | Escribe con guardia de versión opcional (detección OCC de conflictos) |
|
|
83
|
+
| `force_set_state` | Escritura atómica incondicional (para flujos de un solo escritor) |
|
|
84
|
+
| `list_state` | Lista claves que coinciden con un patrón SQL LIKE |
|
|
85
|
+
| `delete_state` | Elimina una clave permanentemente |
|
|
86
|
+
|
|
87
|
+
## Inicio Rápido
|
|
88
|
+
|
|
89
|
+
### 1. Instalación
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
pip install agentcheckpoint
|
|
93
|
+
# o
|
|
94
|
+
uv pip install agentcheckpoint
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 2. Agregar a tu cliente MCP
|
|
98
|
+
|
|
99
|
+
Copia y pega la configuración para tu plataforma. Después de agregarla,
|
|
100
|
+
**reinicia tu cliente**.
|
|
101
|
+
|
|
102
|
+
#### 🟣 Claude Desktop
|
|
103
|
+
|
|
104
|
+
Edita `claude_desktop_config.json`:
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"mcpServers": {
|
|
109
|
+
"checkpoint": {
|
|
110
|
+
"command": "agentcheckpoint",
|
|
111
|
+
"timeout": 10
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
#### 🔵 Claude Code
|
|
118
|
+
|
|
119
|
+
Agrega a `~/.claude/settings.json` bajo `mcpServers`:
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"mcpServers": {
|
|
124
|
+
"checkpoint": {
|
|
125
|
+
"command": "agentcheckpoint",
|
|
126
|
+
"timeout": 10
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
O usa la CLI:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
claude mcp add checkpoint -- python -m agentcheckpoint
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
#### 🟢 Cursor
|
|
139
|
+
|
|
140
|
+
Agrega a `~/.cursor/mcp.json`:
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"mcpServers": {
|
|
145
|
+
"checkpoint": {
|
|
146
|
+
"command": "agentcheckpoint",
|
|
147
|
+
"timeout": 10
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
#### 🟠 Windsurf
|
|
154
|
+
|
|
155
|
+
Agrega a `~/.codeium/windsurf/mcp_config.json`:
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"mcpServers": {
|
|
160
|
+
"checkpoint": {
|
|
161
|
+
"command": "agentcheckpoint",
|
|
162
|
+
"timeout": 10
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
#### ⚪ Continue.dev
|
|
169
|
+
|
|
170
|
+
Agrega a `~/.continue/config.json` bajo `experimental.mcpServers` (o `mcpServers`
|
|
171
|
+
según la versión):
|
|
172
|
+
|
|
173
|
+
```json
|
|
174
|
+
{
|
|
175
|
+
"experimental": {
|
|
176
|
+
"mcpServers": {
|
|
177
|
+
"checkpoint": {
|
|
178
|
+
"command": "agentcheckpoint",
|
|
179
|
+
"timeout": 10
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
#### 🔶 Hermes Agent
|
|
187
|
+
|
|
188
|
+
Agrega a `~/.hermes/config.yaml` bajo `mcp_servers`:
|
|
189
|
+
|
|
190
|
+
```yaml
|
|
191
|
+
mcp_servers:
|
|
192
|
+
checkpoint:
|
|
193
|
+
command: "agentcheckpoint"
|
|
194
|
+
timeout: 10
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Luego ejecuta `/reload-mcp` en sesión, o reinicia el gateway.
|
|
198
|
+
|
|
199
|
+
#### 🐍 Cualquier cliente con soporte uvx
|
|
200
|
+
|
|
201
|
+
Si tu cliente soporta `uvx` (la mayoría modernos lo hacen):
|
|
202
|
+
|
|
203
|
+
```json
|
|
204
|
+
{
|
|
205
|
+
"mcpServers": {
|
|
206
|
+
"checkpoint": {
|
|
207
|
+
"command": "uvx",
|
|
208
|
+
"args": ["agentcheckpoint"],
|
|
209
|
+
"timeout": 10
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### 3. Verificar que funciona
|
|
216
|
+
|
|
217
|
+
Una vez configurado, pregúntale a tu agente:
|
|
218
|
+
|
|
219
|
+
> "¿Qué herramientas tengo del servidor MCP checkpoint?"
|
|
220
|
+
|
|
221
|
+
Deberías ver cinco herramientas: `get_state`, `set_state`, `force_set_state`,
|
|
222
|
+
`list_state` y `delete_state` (prefijadas con `mcp_checkpoint_` en algunos clientes).
|
|
223
|
+
|
|
224
|
+
### 4. Uso básico
|
|
225
|
+
|
|
226
|
+
```python
|
|
227
|
+
# Ejemplo: guardar y leer un checkpoint
|
|
228
|
+
mcp_checkpoint_force_set_state(
|
|
229
|
+
key="proyecto:build-status",
|
|
230
|
+
value='{"phase": "testing", "passed": 13, "failed": 2}'
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
# Más tarde...
|
|
234
|
+
status = mcp_checkpoint_get_state(key="proyecto:build-status")
|
|
235
|
+
# → {value: {...}, version: 1, updated_at: "2026-06-12"}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## Ejemplo: Coordinación Multi-Agente
|
|
239
|
+
|
|
240
|
+
```python
|
|
241
|
+
# Agente A lee el plan actual
|
|
242
|
+
state = client.call_tool("get_state", {"key": "workflow:plan-hoy"})
|
|
243
|
+
plan = json.loads(state.value)
|
|
244
|
+
# plan.current_index = 5, plan.current_status = "completada"
|
|
245
|
+
|
|
246
|
+
# Agente A toma la siguiente tarea
|
|
247
|
+
plan.current_index += 1 # ahora 6
|
|
248
|
+
plan.current_status = "en-progreso"
|
|
249
|
+
client.call_tool("force_set_state", {
|
|
250
|
+
"key": "workflow:plan-hoy",
|
|
251
|
+
"value": json.dumps(plan)
|
|
252
|
+
})
|
|
253
|
+
|
|
254
|
+
# ... El Agente A trabaja en la tarea ...
|
|
255
|
+
|
|
256
|
+
# Agente A la marca como completada
|
|
257
|
+
plan.tasks[6].status = "completada"
|
|
258
|
+
plan.current_status = "completada"
|
|
259
|
+
client.call_tool("force_set_state", {
|
|
260
|
+
"key": "workflow:plan-hoy",
|
|
261
|
+
"value": json.dumps(plan)
|
|
262
|
+
})
|
|
263
|
+
|
|
264
|
+
# Agente B (siguiente tick) lee — siempre obtiene lo último
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## Configuración
|
|
268
|
+
|
|
269
|
+
| Variable de entorno | Por defecto | Descripción |
|
|
270
|
+
|---------------------|-------------|-------------|
|
|
271
|
+
| `CHECKPOINT_DB_PATH` | `~/.hermes/checkpoints.db` | Ruta de la base de datos SQLite |
|
|
272
|
+
|
|
273
|
+
## Arquitectura
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
┌──────────────┐ MCP stdio ┌──────────────────┐ SQLite WAL ┌──────────┐
|
|
277
|
+
│ Agente / │ ────────────────→ │ agentcheckpoint │ ───────────────→ │ state.db │
|
|
278
|
+
│ Cron Worker │ ←──────────────── │ Servidor MCP │ ←─────────────── │ (1 file) │
|
|
279
|
+
└──────────────┘ └──────────────────┘ └──────────┘
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
El servidor se ejecuta como un subproceso stdio. Las herramientas se autodescubren
|
|
283
|
+
a través del cliente MCP. Sin puertos de red, sin contenedor, sin configuración más
|
|
284
|
+
allá de agregarlo a tu `mcpServers`.
|
|
285
|
+
|
|
286
|
+
## ¿Por qué no usar agentmemory / base vectorial?
|
|
287
|
+
|
|
288
|
+
AgentCheckpoint no reemplaza la memoria — es una herramienta diferente para un
|
|
289
|
+
trabajo diferente:
|
|
290
|
+
|
|
291
|
+
| | AgentCheckpoint | Memoria Vectorial/Semántica |
|
|
292
|
+
|---|---|---|
|
|
293
|
+
| **Propósito** | Coordinación de estado | Hechos, aprendizaje, recuperación |
|
|
294
|
+
| **Escritura** | Siempre reemplaza (UPDATE) | Siempre añade (INSERT) |
|
|
295
|
+
| **Lectura** | Coincidencia exacta de clave (`SELECT WHERE key=?`) | Similitud semántica (`ORDER BY distance`) |
|
|
296
|
+
| **Concurrencia** | Guardia de versión (OCC) | Ninguna |
|
|
297
|
+
| **Persistencia** | SQLite WAL (transaccional) | Varía según el backend |
|
|
298
|
+
|
|
299
|
+
**Úsalos juntos**: AgentCheckpoint para estado compartido (planes, checkpoints,
|
|
300
|
+
bloqueos), memoria vectorial para descubrimientos, observaciones y hechos.
|
|
301
|
+
|
|
302
|
+
## Desarrollo
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
git clone https://github.com/erniomaldo/agentcheckpoint
|
|
306
|
+
cd agentcheckpoint
|
|
307
|
+
pip install -e ".[dev]"
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## Licencia
|
|
311
|
+
|
|
312
|
+
MIT
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## Idiomas
|
|
317
|
+
|
|
318
|
+
- [English](README.en.md)
|
|
319
|
+
- [Português](README.pt.md)
|
|
320
|
+
- [Français](README.fr.md)
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
# AgentCheckpoint
|
|
2
|
+
|
|
3
|
+
**Servidor MCP de almacenamiento atómico clave-valor para coordinación de agentes de IA.**
|
|
4
|
+
|
|
5
|
+
Evita que tus agentes de IA trabajen con estado obsoleto. AgentCheckpoint es un servidor
|
|
6
|
+
MCP (Model Context Protocol) minimalista respaldado por SQLite que brinda a tus agentes
|
|
7
|
+
un almacén de estado compartido y atómico — **siempre devolviendo el último valor escrito**.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install agentcheckpoint
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Luego agrégalo a tu cliente MCP:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"mcpServers": {
|
|
18
|
+
"checkpoint": {
|
|
19
|
+
"command": "agentcheckpoint",
|
|
20
|
+
"timeout": 10
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## El Problema
|
|
27
|
+
|
|
28
|
+
Los almacenes de memoria semántica (bases vectoriales, agentmemory, etc.) están diseñados
|
|
29
|
+
para hechos, no para coordinación de estado. Cuando múltiples agentes leen/escriben
|
|
30
|
+
estado compartido:
|
|
31
|
+
|
|
32
|
+
- `memory.save()` crea **nuevas entradas** en lugar de actualizar — se acumulan decenas
|
|
33
|
+
de versiones obsoletas
|
|
34
|
+
- `memory.recall()` devuelve resultados por **similitud semántica**, no por la última
|
|
35
|
+
marca de tiempo
|
|
36
|
+
- Los agentes leen estado desactualizado y **vuelven a ejecutar trabajo ya completado**
|
|
37
|
+
|
|
38
|
+
## La Solución — 100 líneas de Python
|
|
39
|
+
|
|
40
|
+
AgentCheckpoint es un almacén clave-valor con escrituras atómicas, **diseñado para
|
|
41
|
+
coordinación de estado, no para memoria**.
|
|
42
|
+
|
|
43
|
+
- **Siempre lo último** — `get_state(key)` devuelve el único valor actual
|
|
44
|
+
- **Escrituras atómicas** — `force_set_state(key, value)` siempre actualiza, nunca añade
|
|
45
|
+
- **Seguro contra conflictos** — `set_state(key, value, expected_version)` detecta
|
|
46
|
+
conflictos de lectura-modificación-escritura
|
|
47
|
+
- **Respaldado por SQLite** — cero infraestructura, un solo archivo, modo WAL
|
|
48
|
+
- **Una tabla, cinco herramientas** — lo suficientemente simple para entenderlo en 5 minutos
|
|
49
|
+
|
|
50
|
+
## Herramientas
|
|
51
|
+
|
|
52
|
+
| Herramienta | Descripción |
|
|
53
|
+
|-------------|-------------|
|
|
54
|
+
| `get_state` | Lee el valor actual, versión y timestamp de una clave |
|
|
55
|
+
| `set_state` | Escribe con guardia de versión opcional (detección OCC de conflictos) |
|
|
56
|
+
| `force_set_state` | Escritura atómica incondicional (para flujos de un solo escritor) |
|
|
57
|
+
| `list_state` | Lista claves que coinciden con un patrón SQL LIKE |
|
|
58
|
+
| `delete_state` | Elimina una clave permanentemente |
|
|
59
|
+
|
|
60
|
+
## Inicio Rápido
|
|
61
|
+
|
|
62
|
+
### 1. Instalación
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pip install agentcheckpoint
|
|
66
|
+
# o
|
|
67
|
+
uv pip install agentcheckpoint
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 2. Agregar a tu cliente MCP
|
|
71
|
+
|
|
72
|
+
Copia y pega la configuración para tu plataforma. Después de agregarla,
|
|
73
|
+
**reinicia tu cliente**.
|
|
74
|
+
|
|
75
|
+
#### 🟣 Claude Desktop
|
|
76
|
+
|
|
77
|
+
Edita `claude_desktop_config.json`:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"mcpServers": {
|
|
82
|
+
"checkpoint": {
|
|
83
|
+
"command": "agentcheckpoint",
|
|
84
|
+
"timeout": 10
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
#### 🔵 Claude Code
|
|
91
|
+
|
|
92
|
+
Agrega a `~/.claude/settings.json` bajo `mcpServers`:
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"mcpServers": {
|
|
97
|
+
"checkpoint": {
|
|
98
|
+
"command": "agentcheckpoint",
|
|
99
|
+
"timeout": 10
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
O usa la CLI:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
claude mcp add checkpoint -- python -m agentcheckpoint
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
#### 🟢 Cursor
|
|
112
|
+
|
|
113
|
+
Agrega a `~/.cursor/mcp.json`:
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"mcpServers": {
|
|
118
|
+
"checkpoint": {
|
|
119
|
+
"command": "agentcheckpoint",
|
|
120
|
+
"timeout": 10
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
#### 🟠 Windsurf
|
|
127
|
+
|
|
128
|
+
Agrega a `~/.codeium/windsurf/mcp_config.json`:
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"mcpServers": {
|
|
133
|
+
"checkpoint": {
|
|
134
|
+
"command": "agentcheckpoint",
|
|
135
|
+
"timeout": 10
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
#### ⚪ Continue.dev
|
|
142
|
+
|
|
143
|
+
Agrega a `~/.continue/config.json` bajo `experimental.mcpServers` (o `mcpServers`
|
|
144
|
+
según la versión):
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"experimental": {
|
|
149
|
+
"mcpServers": {
|
|
150
|
+
"checkpoint": {
|
|
151
|
+
"command": "agentcheckpoint",
|
|
152
|
+
"timeout": 10
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
#### 🔶 Hermes Agent
|
|
160
|
+
|
|
161
|
+
Agrega a `~/.hermes/config.yaml` bajo `mcp_servers`:
|
|
162
|
+
|
|
163
|
+
```yaml
|
|
164
|
+
mcp_servers:
|
|
165
|
+
checkpoint:
|
|
166
|
+
command: "agentcheckpoint"
|
|
167
|
+
timeout: 10
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Luego ejecuta `/reload-mcp` en sesión, o reinicia el gateway.
|
|
171
|
+
|
|
172
|
+
#### 🐍 Cualquier cliente con soporte uvx
|
|
173
|
+
|
|
174
|
+
Si tu cliente soporta `uvx` (la mayoría modernos lo hacen):
|
|
175
|
+
|
|
176
|
+
```json
|
|
177
|
+
{
|
|
178
|
+
"mcpServers": {
|
|
179
|
+
"checkpoint": {
|
|
180
|
+
"command": "uvx",
|
|
181
|
+
"args": ["agentcheckpoint"],
|
|
182
|
+
"timeout": 10
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### 3. Verificar que funciona
|
|
189
|
+
|
|
190
|
+
Una vez configurado, pregúntale a tu agente:
|
|
191
|
+
|
|
192
|
+
> "¿Qué herramientas tengo del servidor MCP checkpoint?"
|
|
193
|
+
|
|
194
|
+
Deberías ver cinco herramientas: `get_state`, `set_state`, `force_set_state`,
|
|
195
|
+
`list_state` y `delete_state` (prefijadas con `mcp_checkpoint_` en algunos clientes).
|
|
196
|
+
|
|
197
|
+
### 4. Uso básico
|
|
198
|
+
|
|
199
|
+
```python
|
|
200
|
+
# Ejemplo: guardar y leer un checkpoint
|
|
201
|
+
mcp_checkpoint_force_set_state(
|
|
202
|
+
key="proyecto:build-status",
|
|
203
|
+
value='{"phase": "testing", "passed": 13, "failed": 2}'
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
# Más tarde...
|
|
207
|
+
status = mcp_checkpoint_get_state(key="proyecto:build-status")
|
|
208
|
+
# → {value: {...}, version: 1, updated_at: "2026-06-12"}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Ejemplo: Coordinación Multi-Agente
|
|
212
|
+
|
|
213
|
+
```python
|
|
214
|
+
# Agente A lee el plan actual
|
|
215
|
+
state = client.call_tool("get_state", {"key": "workflow:plan-hoy"})
|
|
216
|
+
plan = json.loads(state.value)
|
|
217
|
+
# plan.current_index = 5, plan.current_status = "completada"
|
|
218
|
+
|
|
219
|
+
# Agente A toma la siguiente tarea
|
|
220
|
+
plan.current_index += 1 # ahora 6
|
|
221
|
+
plan.current_status = "en-progreso"
|
|
222
|
+
client.call_tool("force_set_state", {
|
|
223
|
+
"key": "workflow:plan-hoy",
|
|
224
|
+
"value": json.dumps(plan)
|
|
225
|
+
})
|
|
226
|
+
|
|
227
|
+
# ... El Agente A trabaja en la tarea ...
|
|
228
|
+
|
|
229
|
+
# Agente A la marca como completada
|
|
230
|
+
plan.tasks[6].status = "completada"
|
|
231
|
+
plan.current_status = "completada"
|
|
232
|
+
client.call_tool("force_set_state", {
|
|
233
|
+
"key": "workflow:plan-hoy",
|
|
234
|
+
"value": json.dumps(plan)
|
|
235
|
+
})
|
|
236
|
+
|
|
237
|
+
# Agente B (siguiente tick) lee — siempre obtiene lo último
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## Configuración
|
|
241
|
+
|
|
242
|
+
| Variable de entorno | Por defecto | Descripción |
|
|
243
|
+
|---------------------|-------------|-------------|
|
|
244
|
+
| `CHECKPOINT_DB_PATH` | `~/.hermes/checkpoints.db` | Ruta de la base de datos SQLite |
|
|
245
|
+
|
|
246
|
+
## Arquitectura
|
|
247
|
+
|
|
248
|
+
```
|
|
249
|
+
┌──────────────┐ MCP stdio ┌──────────────────┐ SQLite WAL ┌──────────┐
|
|
250
|
+
│ Agente / │ ────────────────→ │ agentcheckpoint │ ───────────────→ │ state.db │
|
|
251
|
+
│ Cron Worker │ ←──────────────── │ Servidor MCP │ ←─────────────── │ (1 file) │
|
|
252
|
+
└──────────────┘ └──────────────────┘ └──────────┘
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
El servidor se ejecuta como un subproceso stdio. Las herramientas se autodescubren
|
|
256
|
+
a través del cliente MCP. Sin puertos de red, sin contenedor, sin configuración más
|
|
257
|
+
allá de agregarlo a tu `mcpServers`.
|
|
258
|
+
|
|
259
|
+
## ¿Por qué no usar agentmemory / base vectorial?
|
|
260
|
+
|
|
261
|
+
AgentCheckpoint no reemplaza la memoria — es una herramienta diferente para un
|
|
262
|
+
trabajo diferente:
|
|
263
|
+
|
|
264
|
+
| | AgentCheckpoint | Memoria Vectorial/Semántica |
|
|
265
|
+
|---|---|---|
|
|
266
|
+
| **Propósito** | Coordinación de estado | Hechos, aprendizaje, recuperación |
|
|
267
|
+
| **Escritura** | Siempre reemplaza (UPDATE) | Siempre añade (INSERT) |
|
|
268
|
+
| **Lectura** | Coincidencia exacta de clave (`SELECT WHERE key=?`) | Similitud semántica (`ORDER BY distance`) |
|
|
269
|
+
| **Concurrencia** | Guardia de versión (OCC) | Ninguna |
|
|
270
|
+
| **Persistencia** | SQLite WAL (transaccional) | Varía según el backend |
|
|
271
|
+
|
|
272
|
+
**Úsalos juntos**: AgentCheckpoint para estado compartido (planes, checkpoints,
|
|
273
|
+
bloqueos), memoria vectorial para descubrimientos, observaciones y hechos.
|
|
274
|
+
|
|
275
|
+
## Desarrollo
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
git clone https://github.com/erniomaldo/agentcheckpoint
|
|
279
|
+
cd agentcheckpoint
|
|
280
|
+
pip install -e ".[dev]"
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
## Licencia
|
|
284
|
+
|
|
285
|
+
MIT
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Idiomas
|
|
290
|
+
|
|
291
|
+
- [English](README.en.md)
|
|
292
|
+
- [Português](README.pt.md)
|
|
293
|
+
- [Français](README.fr.md)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "agentcheckpoint"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "MCP checkpoint server: atomic state coordination for AI agents, cron workers, and multi-agent systems"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
requires-python = ">=3.11"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Ernesto Maldonado", email = "erniomaldo@users.noreply.github.com" },
|
|
14
|
+
]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 4 - Beta",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.11",
|
|
20
|
+
"Programming Language :: Python :: 3.12",
|
|
21
|
+
"Programming Language :: Python :: 3.13",
|
|
22
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
23
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
24
|
+
]
|
|
25
|
+
dependencies = ["mcp>=1.0.0"]
|
|
26
|
+
keywords = ["mcp", "checkpoint", "state", "agent", "coordination", "hermes", "sqlite"]
|
|
27
|
+
|
|
28
|
+
[project.optional-dependencies]
|
|
29
|
+
dev = ["build>=1.0", "twine>=5.0"]
|
|
30
|
+
|
|
31
|
+
[project.urls]
|
|
32
|
+
Homepage = "https://github.com/erniomaldo/agentcheckpoint"
|
|
33
|
+
Source = "https://github.com/erniomaldo/agentcheckpoint"
|
|
34
|
+
Documentation = "https://github.com/erniomaldo/agentcheckpoint#readme"
|
|
35
|
+
|
|
36
|
+
[project.scripts]
|
|
37
|
+
agentcheckpoint = "agentcheckpoint.__main__:main"
|
|
38
|
+
|
|
39
|
+
[tool.setuptools.packages.find]
|
|
40
|
+
where = ["src"]
|