Crowkis command reference: every command by purpose

The Crowkis command reference, grouped by purpose: cache, freshness, trust, memory, reasoning, documents, prompts, cost and operations, with syntax.

The Crowkis command reference covers two families on one RESP3 wire: the standard key-value commands your existing clients already send, and the Crowkis-native C* commands that add the semantic cache, agent memory, document search, guardrails and cost controls. This page groups every native command by what it is for, with its syntax and when to use it.

In plain words. If a client can send GET and SET over RESP3, it can send every command on this page. There is no separate client to install, and the syntax below is the whole interface.

How do you connect and run a command?

Start the server, then connect with any RESP3 client.

bash
crowkis server --port 6383 --data ./crowkis.data
PortPurpose
6383cache protocol, where every command on this page is sent
6384dashboard and management HTTP, loopback only by default
6385gRPC
6386health probes, /livez and /readyz

The last three ports are derived from the cache port as +1, +2 and +3, so --port N moves all four together. These are the ports since version 0.5.2. Earlier images listen on 6379, which is what the public quickstart still shows, along with the bundled REPL, crowkis cli. The official image is on Docker Hub, and the five-minute deploy walks through a first run.

Three things to know before the first command:

  • Auth. Set CROWKIS_AUTH_TOKEN before you expose the cache port. With no token, a connection from a non-loopback address is refused with -DENIED on every command except QUIT.
  • Options are keywords. TENANT, MODEL, MODEL_VERSION, EX, THRESHOLD, WITHCONFIDENCE, WITHROUTE, IMAGE, INTENT, MATCH, COUNT, RPM and TPM are argument keywords, not commands. They follow the positional arguments.
  • A miss is null. CGET, CSTALE, CREUSE and CTOOLGET return null when there is nothing to serve. Treat null as "call the model".

The binary has a few subcommands besides server: crowkis doctor checks an install, crowkis init writes a config file with only the keys the server accepts, and crowkis mcp runs the MCP server.

Cache: store and look up answers

text
CSET query response [EX secs] [TENANT t] [MODEL m] [MODEL_VERSION v] [IMAGE b64]
CGET query [THRESHOLD f] [TENANT t] [MODEL m] [MODEL_VERSION v] [WITHCONFIDENCE] [WITHROUTE] [IMAGE b64]
CSIM query1 query2
CSTALE query [TENANT t]
CIMGGET query IMAGE b64
CSCAN cursor [MATCH p] [COUNT n] [INTENT class]
CVECCOUNT
CommandUse it when
CSETYou have a fresh model answer to store. Every write passes the five-stage anti-poisoning pipeline, and incoherent pairs are rejected
CGETBefore every model call. It hits on an exact, vector, structural or dual match
CGET ... WITHCONFIDENCEYou want the trust signals behind a hit, to apply your own rule
CGET ... WITHROUTEYou want a routing hint from the confidence score: cache, cheap or expensive
CSIMYou are calibrating a threshold and need the similarity of two queries
CSTALEAn expired answer plus a background refresh beats a cold miss. It returns the answer with a stale flag and the remaining TTL
CIMGGETThe question includes an image
CSCANYou need to walk entries by cursor, optionally filtered by intent class
CVECCOUNTYou want the live count of entries in the vector index

CSTALE follows the idea HTTP caches call stale-while-revalidate, defined in RFC 5861. Large cached responses can also be streamed in chunks through CROWKIS.STREAM. How matching works is in what a semantic cache is, and the scoring in a cache hit is not a correct answer.

Freshness: remove what is no longer true

text
CSOURCE LINK|PURGE|LIST source_id [query] [TENANT t]
CINVALIDATE instruction [TENANT t] [THRESHOLD f] [LIMIT n] [COMMIT]
CNOTICE ADD text [EX seconds] [PREVIEW] [TENANT t]
CNOTICE LIST [TENANT t]
CNOTICE CLEAR id [TENANT t]
CDECISION query [TENANT t]
CFLUSH [TENANT t]
CDEDUP
CWHYEVICT query [TENANT t]
CommandUse it when
CSOURCE LINKYou cache an answer built from a document and want to remember which one
CSOURCE PURGEThat document changed. Every linked answer is removed
CINVALIDATEYou can describe what is outdated in plain English. It previews by default and purges only with COMMIT
CNOTICE ADDSomething changed right now, such as "we close at 3pm today". It checks up to 32 nearby cached answers
CNOTICE LIST, CLEARYou need to see or end the active notices. A tenant can hold 8, of 512 bytes each
CDECISIONThe decision engine is on and you want its verdict on one exact question. Read-only
CFLUSHYou want to clear the whole semantic cache, or one tenant with TENANT
CDEDUPYou want to fold near-duplicate entries on demand. It reports clusters and memory reclaimed
CWHYEVICTYou want an entry's retention score, pin status and component weights

Two honest notes. CNOTICE ADD with PREVIEW reports matches without removing anything, and EX on a notice needs the opt-in decision engine. And there is no eviction scheduler over cache entries: they leave by TTL expiry or explicit delete, so CWHYEVICT explains a score, not a pending removal. See cache invalidation and freshness and cache eviction for LLM answers.

Trust: pins, flags, guardrails and personal data

text
CPIN query answer [BY who] [TENANT t]
CPINGET query [TENANT t] [THRESHOLD f]
CPINLIST [TENANT t]
CUNPIN query [TENANT t]
CFLAG query bad_answer [REASON r] [TENANT t]
CCHECKBAD query [TENANT t] [THRESHOLD f]
CGUARD <text>
COUTCHECK <text> [JSON]
CPII REPORT [TENANT t]
CPII ERASE id (TENANT t|ALL) [COMMIT]
CommandUse it when
CPINOne approved wording must be served verbatim for any phrasing, with a record of who approved it
CPINGETBefore generation, to check for a pinned answer. It returns the answer and who pinned it
CPINLIST, CUNPINYou audit the pinned answers, or remove one
CFLAGAn answer turned out wrong. It goes into a negative cache that CGET never reads
CCHECKBADBefore serving, to see whether a question matches a flagged answer. It returns the query, the bad answer and the reason
CGUARDYou scan input for prompt injection, jailbreaks and code injection. The reply is a verdict, a category and the match
COUTCHECKYou scan output for leaked personal data and toxicity, with JSON validation if you add JSON
CPII REPORTYou need the scrub report for a tenant
CPII ERASESomeone asks to be erased. It previews unless you add COMMIT, and it covers pinned answers

Background: cache poisoning, guardrails at the cache layer and PII scrubbing and erasure.

Agent memory and sessions

text
CMEMSET agent fact [USER u] [EX secs]
CMEMGET agent query [USER u] [K n]
CMEMEXTRACT agent "<conversation>" [USER u] [EX secs]
CMEMHISTORY agent query [USER u] [K n]
CMEMASOF agent query unix_ms [USER u] [K n]
CMEMFORGET agent [query] [USER u] [THRESHOLD f]
CMEMLINK agent subject relation object [USER u]
CMEMGRAPH agent entity [USER u] [DEPTH d]
CSESSION ADD s role text [EX secs]
CSESSION RECENT s [N n]
CSESSION SEARCH s query [K n]
CommandUse it when
CMEMSETThe agent learns a durable fact about a user. A contradicting fact retires the old one
CMEMGETThe agent needs the top facts for a question, ranked by relevance blended with recency
CMEMEXTRACTYou have a chunk of conversation and want the durable facts pulled out without a model call
CMEMHISTORYYou need retired versions too, each marked current or superseded
CMEMASOFYou need what memory believed at a given instant, in Unix milliseconds
CMEMFORGETA user's facts must go: those matching a query, or all of them
CMEMLINK, CMEMGRAPHYou store relationships as edges and walk them to a depth
CSESSIONYou keep a conversation buffer: ADD a turn, read the RECENT ones, or SEARCH all of them by meaning

Every CMEM* command also takes an optional TOPIC <t>, which files a fact in a room and limits recall to it. The full model is in long-term memory for AI agents.

Reasoning and tool results

text
CTHINK query cot-trace [TENANT t] [MODEL m] [MODEL_VERSION v]
CREUSE query [TENANT t] [MODEL m] [MODEL_VERSION v]
CTOOLSET tool args result [EX secs] [TENANT t]
CTOOLGET tool args [TENANT t]
CommandUse it when
CTHINKThe model wrote out a derivation with at least two steps and the same question will return with other values
CREUSEThe same question arrives with different values. It does not fire on a rephrasing
CTOOLSETA tool call is deterministic and repeated. The key is the tool plus its exact arguments
CTOOLGETBefore running a tool, to check for a stored result with those exact arguments

Details: caching chain-of-thought reasoning and agent unit economics.

Documents and embeddings

text
CDOC ADD <id> <text> [TENANT t] [EX s] [CHUNK n] [OVERLAP m] [META k=v ...]
CDOC SEARCH <query> [TENANT t] [K n] [FILTER k=v ...] [RERANK]
CEMBED text
CommandUse it when
CDOC ADDYou add a document for retrieval. CHUNK and OVERLAP split it, and META tags it
CDOC SEARCHYou retrieve passages by meaning. FILTER narrows by metadata and RERANK re-scores with the local cross-encoder
CEMBEDYou want the raw vector for a text from the bundled model, with no outside API

Guides: self-hosted RAG with CDOC and local offline embeddings.

Prompts and evals

text
CPROMPT SET <name> <template>
CPROMPT GET <name> [version]
CPROMPT LIST
CPROMPT VERSIONS <name>
CPROMPT ROLLBACK <name> <version>
CPROMPT RENDER <name> [version] [VARS k=v ...]
CPROMPT DEL <name>
CPROMPT ABSET <name> [<v> <w> ...]
CPROMPT AB <name> [SUBJECT id]
CEVAL <evaluator> <input> <output> [EXPECT t] [THRESHOLD f]
CEVAL SUITE <input> <output> [EXPECT t]
CommandUse it when
CPROMPT SET, GET, VERSIONSYou manage prompts as named templates that gain a version on every write
CPROMPT RENDERYou fill {{k}} placeholders and get the finished prompt
CPROMPT ROLLBACKA new version performs worse and you want the earlier one back
CPROMPT ABSET, ABYou split traffic across versions by weight. Assignment is sticky per subject
CEVALYou score one output with one model-free evaluator
CEVAL SUITEYou run the evaluators together and track the results on /metrics

The evaluators are non_empty, json_valid, toxicity, pii_leak, injection_safe, answered, exact_match, contains and relevance. See online LLM evals without an LLM judge.

Cost and limits

text
CBUDGET GET|SET|RESET|ALERTS <tenant> [DAILY usd] [MONTHLY usd] [COST per-1k] [ALERT pct] [CIRCUIT pct]
CKEYLIMIT SET|GET|DEL tenant [RPM n] [TPM n]
CommandUse it when
CBUDGETYou set or read a tenant's daily and monthly budget. The AI gateway enforces it, with a hard 402 block on upstream calls past the circuit breaker
CKEYLIMITYou cap a tenant's requests and tokens per minute on the CGET and CSET fast path. Enterprise only

The gateway that enforces budgets is described in the OpenAI-compatible AI gateway.

Operations

text
CINFO [section]
CSAVE dest
CBGSAVE dest
CRELOAD
CommandUse it when
CINFOYou want server state. Sections: server, cache, savings, security, db, license
CSAVEYou need a .crowkbak snapshot that is on disk before the reply returns
CBGSAVEYou want the snapshot in the background. It replies +BGSAVE-STARTED at once
CRELOADYou replaced the license file and want it loaded with no dropped connections

Which standard commands work?

The drop-in surface covers what an application normally sends: strings (GET, SET with its expiry and condition options, MGET, MSET, APPEND), counters (INCR, DECR, INCRBY), hashes, lists, sets, sorted sets, streams, pub/sub, key and TTL commands (DEL, EXISTS, SCAN, EXPIRE, TTL, PERSIST), and the connection and server commands (HELLO, AUTH, PING, INFO, CONFIG). HELLO negotiates RESP2 or RESP3. Pub/sub fans out inside one instance, with no cross-node bus. The public commands documentation lists the standard commands by group.

One number to keep straight: a plain GET and a semantic CGET are not the same speed. CGET embeds the query first, and that embedding is the dominant cost of a cold semantic read.

Common questions

Do I need a special client to send Crowkis commands?

No. Any client that speaks RESP3 can send both families, and your existing clients connect unmodified. The Python and Node SDKs wrap the same commands in methods if you prefer that.

Which Crowkis commands are paid?

One. CKEYLIMIT is marked Enterprise. Every other command on this page is marked free and ships identically in both Docker images. A paid command is compiled out of the free binary and answers with an upgrade pointer, never a silent no-op.

Which commands delete data, and do they preview first?

CINVALIDATE and CPII ERASE preview by default and act only with COMMIT. CNOTICE ADD has a PREVIEW option. CFLUSH, CSOURCE PURGE, CUNPIN and CMEMFORGET act as soon as you send them, so scope them with TENANT or USER.

How do I scope a command to one tenant?

Add TENANT t to the command. Entries carry the tenant they were written under and lookups stay inside it. Tenant names keep their case, and a name containing : or ~ is rejected at the wire. The Community edition allows up to three tenants. The product overview is on the Crowkis page.

Filed under Guides. Published .

Book your demo today.

A 30 minute call. Bring your stack and your questions.

Pick a time

Or write to us.