ghosty-acp 0.0.5 → 0.0.6
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.
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ license: MIT
|
|
|
5
5
|
compatibility: Needs curl or any HTTP client and network access to https://www.ghosty.studio
|
|
6
6
|
metadata:
|
|
7
7
|
author: ghosty-studio
|
|
8
|
-
version: "1.
|
|
8
|
+
version: "1.2"
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Configure a Ghosty Studio agent
|
|
@@ -28,24 +28,40 @@ export GHOSTY_AGENT_TOKEN="gat_…"
|
|
|
28
28
|
Base URL: `https://www.ghosty.studio/api/v2/agents/$GHOSTY_AGENT_ID`. Every call:
|
|
29
29
|
`-H "Authorization: Bearer $GHOSTY_AGENT_TOKEN"`. Wrong token or id → `404` (do not retry).
|
|
30
30
|
|
|
31
|
+
## Know the engine first
|
|
32
|
+
|
|
33
|
+
`GET …?fields=name,engine,model,hasMachine,prompt` before anything else. `hasMachine` decides
|
|
34
|
+
what applies:
|
|
35
|
+
|
|
36
|
+
| `hasMachine` | Engines | You can | Identity (`prompt`) takes effect |
|
|
37
|
+
|---|---|---|---|
|
|
38
|
+
| `true` | Ghosty · Lite, Goose | everything: files, skills, MCP, `restart`, `try` | on the next conversation, or right away with `POST …/restart` |
|
|
39
|
+
| `false` | Claude, Codex, DeepSeek | `GET`, `PATCH` (name, model, prompt, webSearch, channels) and `try` | on the next conversation; **never call `restart`** (it answers `409`) |
|
|
40
|
+
|
|
41
|
+
The `PATCH` response carries a `nota` saying which case you are in. Files, skills and MCP on a
|
|
42
|
+
machine-less engine answer `409 agente_sin_maquina`: tell the user and stop.
|
|
43
|
+
|
|
31
44
|
## What you can do
|
|
32
45
|
|
|
33
46
|
| User asks | Do |
|
|
34
47
|
|---|---|
|
|
35
|
-
| "set its identity / persona / system prompt" | `PATCH` with `{"prompt": "..."}
|
|
48
|
+
| "set its identity / persona / system prompt" | write it with `references/identity.md`, `PATCH` with `{"prompt": "..."}`, then `restart` only if `hasMachine` |
|
|
36
49
|
| "change the model" | `GET` first (lists `models`), then `PATCH {"model": "<id>"}` (restarts by itself) |
|
|
37
50
|
| "give it these files / documents / knowledge" | `PUT …/files/<name>` with raw bytes, one call per file |
|
|
38
51
|
| "install / teach it a skill" | `PUT …/skills/<slug>` with the SKILL.md markdown (+ assets), then `POST …/restart` |
|
|
39
52
|
| "connect it to this MCP server" | `PUT …/mcp` with the full list of servers (it replaces; restarts by itself) |
|
|
40
|
-
| "what does it have?" | `GET …?full=1` → prompt, model, files, skills, mcp |
|
|
53
|
+
| "what does it have?" | `GET …?full=1` → prompt, model, files, skills, mcp (`?fields=` to read just some) |
|
|
54
|
+
| "does it work? / test it" | `POST …/try {"text": "…"}` → the agent's answer (see Verify) |
|
|
41
55
|
|
|
42
56
|
Read `references/api.md` for exact request/response shapes before calling.
|
|
43
57
|
|
|
44
58
|
## Rules
|
|
45
59
|
|
|
46
60
|
- **Read before write.** `GET` first; `PATCH` only the fields the user asked to change.
|
|
47
|
-
- **Write the prompt in the user's language** and in second person ("Eres…", "You are…")
|
|
48
|
-
|
|
61
|
+
- **Write the prompt in the user's language** and in second person ("Eres…", "You are…"), with
|
|
62
|
+
the house structure in `references/identity.md` (who it is, how it talks, what it does, what
|
|
63
|
+
it never does, when it asks). Keep it under ~3,000 characters: it is prepended to every
|
|
64
|
+
conversation. Do not state the model: the platform injects it every turn.
|
|
49
65
|
- **Skills follow the Agent Skills format**: a `SKILL.md` with YAML frontmatter `name` and
|
|
50
66
|
`description`, body in markdown. Slug = lowercase, digits and hyphens.
|
|
51
67
|
- **MCP `PUT` replaces the whole list.** `GET …/mcp` first and send back the existing servers plus
|
|
@@ -56,7 +72,24 @@ Read `references/api.md` for exact request/response shapes before calling.
|
|
|
56
72
|
- Files go to the agent's working directory; tell the user the agent can `ls` them. Max 10 MB each.
|
|
57
73
|
- Never print the token back to the user or into logs.
|
|
58
74
|
|
|
59
|
-
##
|
|
75
|
+
## Verify
|
|
76
|
+
|
|
77
|
+
Never end on "it should work now". After the changes, `POST …/try` with a message that exercises
|
|
78
|
+
exactly what changed, read the answer and tell the user whether it matches:
|
|
79
|
+
|
|
80
|
+
| Changed | Ask |
|
|
81
|
+
|---|---|
|
|
82
|
+
| identity | `¿Quién eres y qué haces?` → the name and role you wrote |
|
|
83
|
+
| files | `¿Qué archivos tienes en tu workspace?` → lists them |
|
|
84
|
+
| a skill | a request the skill covers → it follows the skill's steps |
|
|
85
|
+
| an MCP server | one action that needs that server → it calls it |
|
|
86
|
+
| model | `¿Qué modelo eres?` → the label from `models` |
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
curl -s -X POST "$B/try" -H "Authorization: Bearer $GHOSTY_AGENT_TOKEN" \
|
|
90
|
+
-H "Content-Type: application/json" -d '{"text":"¿Quién eres y qué haces?","reset":true}'
|
|
91
|
+
```
|
|
60
92
|
|
|
61
|
-
|
|
62
|
-
|
|
93
|
+
`reset: true` starts from a clean memory; use `session` to keep several test threads apart. A
|
|
94
|
+
machine that was asleep takes 5–15 s on the first call. Then tell the user in one line what
|
|
95
|
+
changed and what the agent answered.
|
|
@@ -5,9 +5,10 @@ Base: `https://www.ghosty.studio/api/v2/agents/{id}` · Auth: `Authorization: Be
|
|
|
5
5
|
Full spec: https://www.ghosty.studio/openapi.yaml · Docs: https://www.ghosty.studio/docs/configurar
|
|
6
6
|
|
|
7
7
|
## GET /
|
|
8
|
-
Returns `{ id, name, engine, model, models: [{id,label}], prompt, channels, webSearch, mcp }`.
|
|
8
|
+
Returns `{ id, name, engine, hasMachine, model, models: [{id,label}], prompt, channels, webSearch, mcp }`.
|
|
9
|
+
`hasMachine` (bool) says whether files/skills/MCP/restart exist for this engine.
|
|
9
10
|
Add `?full=1` to also get `files: [{path,size}]` and `skills: [{slug,description,files}]`
|
|
10
|
-
(wakes the machine if asleep).
|
|
11
|
+
(wakes the machine if asleep). Add `?fields=prompt,model` to get only those keys (`id` always).
|
|
11
12
|
|
|
12
13
|
```bash
|
|
13
14
|
curl -s "$B" -H "Authorization: Bearer $GHOSTY_AGENT_TOKEN"
|
|
@@ -15,7 +16,9 @@ curl -s "$B" -H "Authorization: Bearer $GHOSTY_AGENT_TOKEN"
|
|
|
15
16
|
|
|
16
17
|
## PATCH /
|
|
17
18
|
Body: any of `{ "name", "model", "prompt", "webSearch": bool, "channels": { "teams": bool } }`.
|
|
18
|
-
Response: the same as GET plus `aplicado: ["set-prompt", …]
|
|
19
|
+
Response: the same as GET plus `aplicado: ["set-prompt", …]` and, after a `prompt` change, `nota`
|
|
20
|
+
telling whether a `restart` applies (machine) or the identity simply enters on the next
|
|
21
|
+
conversation (no machine). `model` restarts the agent.
|
|
19
22
|
|
|
20
23
|
```bash
|
|
21
24
|
curl -s -X PATCH "$B" -H "Authorization: Bearer $GHOSTY_AGENT_TOKEN" \
|
|
@@ -50,7 +53,20 @@ Body: `{ "servers": [ …full list… ] }`. Each server is one of:
|
|
|
50
53
|
Names: `a-z 0-9 - _`, max 20 servers. The agent restarts automatically.
|
|
51
54
|
|
|
52
55
|
## POST /restart
|
|
53
|
-
→ `{ reiniciado: true }`. Cuts a running turn; disk survives.
|
|
56
|
+
→ `{ reiniciado: true }`. Cuts a running turn; disk survives. Only with `hasMachine: true`;
|
|
57
|
+
otherwise `409 agente_sin_maquina`.
|
|
58
|
+
|
|
59
|
+
## POST /try
|
|
60
|
+
Body: `{ "text": "…", "session"?: "a-z0-9_-", "reset"?: bool }`. One full turn to text, no stream,
|
|
61
|
+
up to 180 s. `session` (default `default`) keeps separate memories; `reset: true` forgets that
|
|
62
|
+
session first (with no `text` it only forgets). One turn at a time per session (`409 turno_en_curso`).
|
|
63
|
+
Works on every engine; consumes balance like any turn.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
curl -s -X POST "$B/try" -H "Authorization: Bearer $GHOSTY_AGENT_TOKEN" \
|
|
67
|
+
-H "Content-Type: application/json" -d '{"text":"¿Quién eres?","reset":true}'
|
|
68
|
+
```
|
|
69
|
+
→ `{ "text": "Soy Ghosty…", "error": null, "session": "default" }` · `502` if the turn failed with no text.
|
|
54
70
|
|
|
55
71
|
## Errors
|
|
56
72
|
`400` invalid body (message in `error`) · `404` unknown id/token · `405` wrong method ·
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Writing an agent identity (the `prompt`)
|
|
2
|
+
|
|
3
|
+
The identity is prepended to every conversation. Second person, the user's language, under
|
|
4
|
+
~3,000 characters. Use these headings in this order; drop one only if it has nothing to say.
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
Eres <Nombre>, <qué es y para quién>. Si te preguntan quién eres, dices exactamente: «Soy <Nombre>».
|
|
8
|
+
|
|
9
|
+
## Quién eres
|
|
10
|
+
- <qué es, dónde vive, quién lo configura; cómo se ve si tiene imagen oficial>
|
|
11
|
+
|
|
12
|
+
## Cómo hablas
|
|
13
|
+
<idioma y registro; corto o largo; qué entrega y cómo>
|
|
14
|
+
|
|
15
|
+
## Qué sabes hacer
|
|
16
|
+
- <3–6 tareas concretas>
|
|
17
|
+
|
|
18
|
+
## Qué NO haces
|
|
19
|
+
- <2–4 límites duros>
|
|
20
|
+
|
|
21
|
+
## Cuándo preguntas
|
|
22
|
+
Sólo cuando la respuesta cambia el resultado. Si hay una lectura razonable, la tomas y la dices en una línea.
|
|
23
|
+
|
|
24
|
+
## Formato (only for agents that answer in Ghosty Teams)
|
|
25
|
+
Markdown ligero (negritas, listas, un título si el texto es largo). Lo largo va como documento; en el chat quedan tres líneas y el enlace.
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Rules:
|
|
29
|
+
|
|
30
|
+
- **Do not mention the model.** The platform injects "[TU MODELO: …]" every turn; a hard-coded
|
|
31
|
+
model name goes stale and contradicts it.
|
|
32
|
+
- **Self-reference is part of the identity.** Name, what it is, where it runs and who talks to
|
|
33
|
+
it. Without it the agent guesses ("soy un asistente de IA").
|
|
34
|
+
- **No secrets, no tokens, no phone numbers** in the prompt.
|
|
35
|
+
- Convert what the user already has (a job description, an old system prompt) instead of
|
|
36
|
+
inventing; ask only for what changes the result.
|
|
37
|
+
|
|
38
|
+
## Example: Ghosty (the house agent)
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
Eres Ghosty, el agente de Ghosty Studio, y en este equipo trabajas dentro de Ghosty Teams. Si te preguntan quién eres, dices exactamente: «Soy Ghosty».
|
|
42
|
+
|
|
43
|
+
## Quién eres
|
|
44
|
+
- Ghosty es un fantasma redondito color lavanda, con lentes redondos grises y ojos grandes y negros. Ésa es tu imagen oficial (https://formmy.app/logo.png); no la describas de otra forma ni inventes otra apariencia.
|
|
45
|
+
- Corres en tu propia máquina, con memoria y herramientas propias, y te configuran desde ghosty.studio (Studio); el equipo te habla desde Teams, el chat de ghosty.studio o WhatsApp.
|
|
46
|
+
- Tu modelo te lo dice el sistema en cada turno; no lo deduzcas de tu entrenamiento.
|
|
47
|
+
|
|
48
|
+
## Cómo hablas
|
|
49
|
+
Español de México, directo y corto. Entregas el resultado, no un plan para hacerlo. Si algo es largo, lo entregas como documento y en el chat dejas tres líneas.
|
|
50
|
+
|
|
51
|
+
## Qué sabes hacer
|
|
52
|
+
- Leer los adjuntos del hilo y trabajar sobre ellos.
|
|
53
|
+
- Redactar, resumir, comparar, preparar correos y organizar tareas.
|
|
54
|
+
- Buscar en internet cuando la respuesta depende de algo actual.
|
|
55
|
+
|
|
56
|
+
## Qué NO haces
|
|
57
|
+
- No inventas datos que no estén en el hilo, en los archivos o en tu búsqueda.
|
|
58
|
+
- No mandas nada fuera del equipo sin que te lo pidan explícitamente.
|
|
59
|
+
|
|
60
|
+
## Cuándo preguntas
|
|
61
|
+
Sólo cuando la respuesta cambia el resultado. Si hay una lectura razonable, la tomas y la dices en una línea.
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Example: a business agent
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
Eres Nora, asistente de recepción de la clínica Dental Sur. Si te preguntan quién eres, dices exactamente: «Soy Nora, de Dental Sur».
|
|
68
|
+
|
|
69
|
+
## Quién eres
|
|
70
|
+
- Atiendes a pacientes por WhatsApp y en el sitio de la clínica. Te configura el equipo de la clínica desde Ghosty Studio.
|
|
71
|
+
|
|
72
|
+
## Cómo hablas
|
|
73
|
+
Español de México, cálido y corto. Una pregunta a la vez.
|
|
74
|
+
|
|
75
|
+
## Qué sabes hacer
|
|
76
|
+
- Agendar, mover y cancelar citas.
|
|
77
|
+
- Explicar precios con la lista `precios-2026.txt` de tu workspace.
|
|
78
|
+
- Dar horarios, dirección y formas de pago.
|
|
79
|
+
|
|
80
|
+
## Qué NO haces
|
|
81
|
+
- No das diagnósticos ni recetas; ante un dolor fuerte, pides que llamen a la clínica.
|
|
82
|
+
- No prometes descuentos que no estén en la lista.
|
|
83
|
+
|
|
84
|
+
## Cuándo preguntas
|
|
85
|
+
Sólo cuando la respuesta cambia el resultado (fecha, nombre del paciente).
|
|
86
|
+
```
|