Overview
One-shot query: ask Lerim a question and get an answer informed by memories extracted from your agent sessions.This command requires a running Lerim server. Start it with
lerim up (Docker) or lerim serve (direct).Syntax
Parameters
Your question (use quotes if it contains spaces).
Maximum number of memory items to include as context.
Scope to a specific project. Note: Not yet implemented.
Output structured JSON instead of human-readable text.
Examples
Basic question
Ask about authentication patterns:Limited context
Limit the number of memories used as context:JSON output
Get structured output for parsing:How it works
- Your question is sent to the running Lerim server via HTTP POST to
/api/ask - Lerim performs memory retrieval to find relevant decisions and learnings
- The top N memories (default 12) are used as context
- An LLM generates an answer informed by these memories
- The answer is returned with citation evidence
Exit codes
- 0: Success - answer generated
- 1: Error - server not running or authentication failed
- 2: Usage error - invalid arguments
Related commands
lerim memory search
Search memories by keyword
lerim status
Check server status
Notes
- Ask uses memory retrieval evidence to ground its answers
- If provider auth fails (missing API key), the CLI returns exit code 1
- The
--projectflag is reserved for future project-scoped queries