{ // SAFE EXAMPLE ONLY // Do not commit real secrets (nsec, API keys, private relays, or private admin data). // ─── Agent Identity Key ───────────────────────────────────────────── // Use your real Nostr nsec locally in genesis.jsonc (gitignored). "key": { "nsec": "nsec1REPLACE_WITH_YOUR_AGENT_NSEC" }, // ─── Administrator ────────────────────────────────────────────────── // Admin pubkey may be npub or hex. "admin": { "pubkey": "npub1REPLACE_WITH_ADMIN_PUBKEY" }, // ─── Signer Provider (optional) ──────────────────────────────────── // Omit this block (or set mode="local") to use the nsec above in-process. // In any nsigner_* mode the nsec is optional/ignored; the agent pubkey is // learned from the signer via nostr_signer_get_public_key(). See docs/SIGNER.md. // // "signer": { // "mode": "nsigner_unix", // local | nsigner_unix | nsigner_tcp | nsigner_serial | nsigner_fds | nsigner_qrexec // "socket_name": "", // nsigner_unix: abstract socket name (without @); "" = auto-discover // "role": "main", // n_signer role selector // "timeout_ms": 15000, // per-call timeout // "auth_privkey_hex": "", // nsigner_tcp only: kind-27235 auth envelope privkey // "tcp_host": "127.0.0.1", // nsigner_tcp host // "tcp_port": 11111, // nsigner_tcp port // "serial_device": "/dev/ttyACM0", // nsigner_serial device path // "target_qube": "nostr_signer", // nsigner_qrexec: target Qubes qube name // "service_name": "qubes.NsignerRpc" // nsigner_qrexec: qrexec service name (default qubes.NsignerRpc) // // nsigner_fds: fds_read_fd/fds_write_fd are CLI-only (--signer-fds), NOT persisted here // }, // ─── Encrypted Startup Config Events ─────────────────────────────── // These are published as NIP-44 encrypted kind 30078 self-events on first run. "encrypted_events": [ { "kind": 30078, "d_tag": "user-settings", "content": "{\"v\":2,\"updatedAt\":0,\"global_llm\":{\"provider\":\"openai\",\"api_key\":\"sk-REPLACE_WITH_API_KEY\",\"model\":\"gpt-4o-mini\",\"base_url\":\"https://api.openai.com/v1\",\"max_tokens\":512,\"temperature\":0.7},\"didactyl\":{\"admin_pubkey\":\"npub1REPLACE_WITH_ADMIN_PUBKEY\",\"dm_protocol\":\"both\",\"max_turns\":40}}" } ], // ─── HTTP Admin API ──────────────────────────────────────────────── "api": { "enabled": true, "port": 8484, "bind_address": "127.0.0.1" }, // ─── Startup Events ──────────────────────────────────────────────── "startup_events": [ { "kind": 0, "content_fields": { "name": "Didactyl", "about": "I am a Didactyl agent living on Nostr" }, "tags": [] }, { "kind": 3, "content": "", "tags": [ ["p", "ADMIN_HEX_PUBKEY"] ] }, { "kind": 10002, "content": "", "tags": [ ["r", "wss://relay.damus.io"], ["r", "wss://relay.primal.net"] ] }, { "kind": 10050, "content": "", "tags": [ ["relay", "wss://relay.damus.io"], ["relay", "wss://relay.primal.net"] ] }, { "kind": 31124, "content": "# Didactyl Agent\n\nYou are {{my_kind0_profile}}\n\nYour npub: {{my_npub}}\n\n## Rules\n\n- Communicate through encrypted Nostr direct messages\n- Keep responses concise and clear\n- Be helpful and technically accurate\n- If unsure, state uncertainty directly\n- Use tools when a request requires taking action\n- After a tool call, base your answer on the actual tool result\n- Never claim a tool was run if no tool was executed\n- Maintain your task list as short-term working memory\n- Never reveal your private key (nsec)\n- You may share your public key (npub) with anyone", "tags": [ ["d", "identity_and_rules"], ["app", "didactyl"], ["scope", "private"], ["description", "Agent identity and behavioral rules"], ["trigger", "dm"], ["filter", "{\"from\":\"admin\"}"] ] }, { "kind": 31124, "content": "## DM History Context\n\n### Instructions\n- Reference prior conversation naturally when it's relevant to the current request.\n- Do not repeat entire DM history back to the user unless explicitly asked.\n- Use this context to avoid asking questions that were already answered in recent messages.\n\n### Recent DM History (last 10 messages)\n\n{{nostr_dm_history({\"limit\":10,\"format\":\"text\"})}}", "tags": [ ["d", "dm_history_context"], ["app", "didactyl"], ["scope", "private"], ["description", "DM history context"], ["trigger", "dm"], ["filter", "{\"from\":\"admin\"}"] ] } ] }