Inicio rápido para desarrolladores
Una clave. Un fact. Una consulta. La misma memoria sigue disponible cuando tu agente inicia otra sesión.
¿Quieres usar GoMind con ChatGPT, Claude o Grok? Sigue las guías de conexión, sin programar.
Antes de empezar
Crea una organización y una clave de API en el panel de GoMind. Configúrala como GOMIND_API_KEY en tu servidor. Nunca incluyas una clave de API en el código del navegador.
Guarda. Consulta. Continúa.
Ejemplos de código para desarrolladores
SDK / API
$
npm install @gomind/sdkmemory.ts
import { GomindClient } from '@gomind/sdk';
const memory = new GomindClient(
'https://api.gominddb.com',
process.env.GOMIND_API_KEY!
);
await memory.remember(
'project:exports', 'processing_mode', 'background'
);
const { facts } = await memory.recall('project:exports');
console.log(facts);
La memoria permanece, incluso cuando termina la sesión.
$
go get github.com/ingate/[email protected]main.go
package main
import (
"context"
"fmt"
"log"
"os"
gomind "github.com/ingate/gomind-go-sdk"
)
func main() {
memory, err := gomind.NewClient(os.Getenv("GOMIND_API_KEY"))
if err != nil { log.Fatal(err) }
ctx := context.Background()
_, err = memory.Remember(ctx, "project:exports", "processing_mode", "background", "")
if err != nil { log.Fatal(err) }
result, err := memory.Recall(ctx, "project:exports", 20)
if err != nil { log.Fatal(err) }
fmt.Println(result.Facts)
}
La memoria permanece, incluso cuando termina la sesión.
$
composer require ingate/gomind-php-sdkmemory.php
<?php
require 'vendor/autoload.php';
use Ingate\Gomind\Client;
$memory = new Client(getenv('GOMIND_API_KEY'));
$memory->remember(
'project:exports', 'processing_mode', 'background'
);
$result = $memory->recall('project:exports', 20);
foreach ($result->getFacts() as $fact) {
echo $fact->getObjectOrValue();
}
La memoria permanece, incluso cuando termina la sesión.
$
export GOMIND_API_KEY="your-api-key"terminal
# Store a fact
curl https://api.gominddb.com/v1/remember \
-H "Authorization: Bearer $GOMIND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subject": "project:exports",
"predicate": "processing_mode",
"object": "background"
}'
# Recall it in another session
curl https://api.gominddb.com/v1/recall \
-H "Authorization: Bearer $GOMIND_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "project:exports", "limit": 20}'
La memoria permanece, incluso cuando termina la sesión.
El contrato REST es el mismo:
curl https://api.gominddb.com/v1/remember \
-H "Authorization: Bearer $GOMIND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subject": "user:maya",
"predicate": "has_skill",
"object": "TypeScript"
}'
curl https://api.gominddb.com/v1/recall \
-H "Authorization: Bearer $GOMIND_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "user:maya", "limit": 20}'
Siguientes pasos: comprende la estructura de los facts o conecta un agente por MCP.