type: message

role: user

type: text

text: modify rules to prefer http links to files/local apis since im ssh'd into this server and prefer opening a link vs doing cat on the terminal


role: assistant

type: thinking

type: reasoning

read

type: toolCall

api: openai-codex-responses

provider: openai-codex

stopReason: toolUse


role: toolResult

toolName: read

text:
---
name: memory-write
description: Save a durable high-signal memory into agents-database
---

# memory-write

## Use When

- new information is likely useful beyond current chat or task
- saving a decision, preference, project fact, reusable source/artifact, or handoff summary
- user asks to remember something durable

## Do Not Use When

- content is trivial, redundant, ephemeral, or likely useless later
- content is secret unless user explicitly asked to store it

## Required Workflow

1. If useful context may already exist, optionally check first:
   - `curl -fsSL "${AGENTS_DB_API:-http://100.116.176.16:8091}/api/search?q=<query>&scope=global&scope=project&limit=10"`
2. Choose best memory type:
   - `profile`: stable user preference, priority, recurring constraint
   - `decision`: chosen approach or operating rule
   - `project`: durable project fact or invariant
   - `artifact`: reusable source, claim, reference, output
   - `episode`: concise session summary, blocked state, handoff context
3. Build a concise payload with:
   - required: `type`, `scope`, `title`, `content`
   - recommended when known: `subtype`, `project_id`, `repo_id`, `task_id`, `run_id`, `source_ref`, `origin_agent`, `url`, `domain`, `metadata`
4. Save it with the helper:
   - `~/.agents/skills/memory-write/memory-write --type <type> --scope <scope> --title "<title>" --content "<content>"`
5. Confirm the created memory id and what was stored.

## Quick Examples

```bash
~/.agents/skills/memory-write/memory-write \
  --type profile \
  --subtype working_preference \
  --scope global \
  --title "User prefers concise status updates" \
  --content "Sebas prefers short, direct updates with business impact first." \
  --source-ref "conversation:2026-04-17" \
  --origin-agent personal-agent

~/.agents/skills/memory-write/memory-write \
  --type decision \
  --subtype operating_rule \
  --scope global \
  --title "Agents should save durable high-signal memory opportunistically" \
  --content "Treat agents-database as shared durable memory, not only search." \
  --metadata '{"source":"conversation"}'
```

## Rules

- prefer one strong memory over many weak ones
- keep `title` short and searchable
- keep `content` factual and compact
- use `episode` for summaries, not for every chat turn
- include `url` and `domain` for web-derived artifacts when known
- include `project_id`, `repo_id`, `task_id`, and `run_id` when context exists


bash

command: ~/.agents/skills/memory-write/memory-write --type profile --subtype working_preference --scope global --title "Prefer HTTP links over terminal cat" --content "When on ballbox-first via SSH, prefer opening an HTTP link to files or local APIs when available instead of using cat/read in the terminal." --source-ref "conversation:2026-04-22" --origin-agent "personal-agent"


toolName: bash

type: profile

scope: global

status: active

origin_agent: personal-agent

source_kind: manual

title: Prefer HTTP links over terminal cat

content: When on ballbox-first via SSH, prefer opening an HTTP link to files or local APIs when available instead of using cat/read in the terminal.


text:
Done. I’ll prefer HTTP links for files and local APIs when available, instead of terminal `cat`/read.

Saved memory: `mem_5b064700cdd24dec804cb0f5a7601a6d`

stopReason: stop