Skip to content

feat: daemon/server mode for warm recall (<50ms) #54

Closed

Description

@ajianaz

Problem

CLI invocation loads ONNX model per process (~2.6s). For integration as memory backend, need warm recall (<50ms).

Solution

uteke serve --port 8767 — persistent HTTP server that keeps model loaded in memory.

API

GET  /health                  → { status: "ok", memories: N }
POST /remember                → { content, tags? } → { id }
POST /recall                  → { query, limit? } → { results[] }
POST /search                  → { query } → { results[] }
GET  /list?tag=X              → { memories[] }
DELETE /forget/:id            → { ok: true }
GET  /stats                   → { stats }

Config (uteke.toml)

[server]
enabled = false    # DEFAULT: opt-in, not required for CLI users
host = "127.0.0.1"
port = 8767

Behavior

  • uteke serve starts HTTP server, keeps embedding model warm
  • uteke recall "query" CLI auto-detects running server → routes to HTTP instead of subprocess
  • Graceful shutdown: SIGTERM saves index, closes DB
  • Fallback: if server not running, CLI works as before (cold start)

Priority

P1 — unblocks plugin integration + multi-agent use case.

Benchmark Target

  • Warm recall: <50ms (vs current 2600ms CLI)
  • Remember: <100ms
  • Memory: model stays in RAM (~200MB)

References

Activity

  1. ajianaz commented on May 31, 2026

    @ajianaz
    CollaboratorAuthor

    Closed by PR #83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions