TheDocumentation Index
Fetch the complete documentation index at: https://docs.cognee.ai/llms.txt
Use this file to discover all available pages before exploring further.
cognee-cli command lets you run Cognee from the terminal so you can remember data, enrich memory, and ask questions without opening a Python file. The commands are designed to be short, use friendly defaults, and are safe for people who are just starting out.
Setup
Before using the CLI, you need to configure your API key. The recommended approach is to store it in a.env file:
Use the
cognee-cli config set command only for temporary tweaks during a long-running session. For persistent configuration, use .env files or environment variables.Quick Tour of Commands
cognee-cli remember <data>ingests data and builds retrieval-ready memory in one stepcognee-cli recall "question"retrieves answers from the graph or session memorycognee-cli improveenriches an existing datasetcognee-cli forgetremoves stored data when you no longer need itcognee-cli configreads and updates saved settingscognee-cli -uilaunches the local web app
--help after any command (for example, cognee-cli recall --help) to see every option.
The CLI still includes lower-level legacy commands such as
add, cognify, search, and delete, but for new workflows the v1.0 remember / recall / improve / forget commands are the preferred interface.Remember Data
Start by loading something the graph can learn from. You can remember files, folders, URLs, S3 paths, or even plain text.Remember Command Options
Remember Command Options
data: One or more file paths, URLs, S3 paths, or text strings. Mix and match as needed--dataset-name(-d): Defaults tomain_dataset. Use clear names so the team remembers what each dataset holds--chunk-size: Token limit for each chunk. Leave blank to let Cognee choose--chunker:TextChunker(default),CsvChunker, orLangchainChunker--background(-b): Ingests data, then keeps graph-building running in the background--chunks-per-batch: Number of chunks to process per task batch
Improve Memory
Useimprove when you want to enrich an existing dataset after ingestion. This is especially useful for session-bridging or an explicit post-processing pass over memory you already stored.
Improve Command Options
Improve Command Options
--dataset-name(-d): Dataset to improve. Defaults tomain_dataset--dataset-id: Dataset UUID (alternative to--dataset-name)--node-name: Narrow the improvement pass to specific named entities--session-ids(-s): Session IDs whose Q&A and feedback should be bridged into the permanent graph--feedback-alpha: Learning rate for feedback-based weighting updates--background(-b): Handy for large datasets; the CLI exits while the job keeps running
Recall Memory
Onceremember finishes, you can question the graph. Start with a simple natural-language question, then experiment with search types. The CLI exposes a subset of the available retrieval types; see Recall for the memory-oriented workflow and Search for the lower-level search type reference.
Recall Types
Recall Types
Try these quick examples to feel the differences:
The CLI supports a subset of search types:
GRAPH_COMPLETION, RAG_COMPLETION, CHUNKS, SUMMARIES, and CYPHER. Other search types (like GRAPH_SUMMARY_COMPLETION, CODING_RULES, and TEMPORAL) are available in the Python API.Recall Command Options
Recall Command Options
--query-type: Subset of search types (e.g. GRAPH_COMPLETION, RAG_COMPLETION, CHUNKS, SUMMARIES, CYPHER). See Search for the full list.--datasets: Limit search to specific datasets--top-k: Maximum number of results to return--system-prompt: Point to a custom prompt file for LLM-backed modes--session-id(-s): Search session memory directly when used by itself, or add session history to graph-backed recall--output-format(-f):pretty(friendly layout),simple(minimal text), orjson(structured output for scripts)
Forget Data
Clean up when a dataset is outdated or when you reset the environment.Forget Command Options
Forget Command Options
--dataset: Dataset name or UUID to remove--data-id: Remove a single item from the specified dataset--everything: Remove all datasets and data for the current user
forget is the v1.0 deletion interface. If you still need the older delete flow, it remains available as a lower-level legacy command.Manage Configuration
The CLI stores its settings so you do not have to repeat them. Configuration updates line up with the Python API.Config Command Options
Config Command Options
list: Print the common keysget [key]: Show the saved value; omit the key to list everythingset <key> <value>: Save a new value. JSON strings such as{}ortrueare parsed automaticallyunset <key>: Reset to the default. Add--forceto skip confirmationreset: Placeholder for a future “reset everything” command
Useful Configuration Keys
Useful Configuration Keys
- Language model:
llm_provider,llm_model,llm_api_key,llm_endpoint - Storage:
graph_database_provider,vector_db_provider,vector_db_url,vector_db_key - Chunking:
chunk_size,chunk_overlap
Launch the UI
Prefer a browser view? Launch the UI with one flag.http://localhost:8000 and the React app on http://localhost:3000. Leave the window open and press Ctrl+C to stop everything.
Next Steps
Installation Guide
Set up your environmentInstall Cognee and configure your environment to start using the CLI.
Quickstart Tutorial
Run your first exampleGet started with Cognee by running your first knowledge graph example.