diff --git a/docs/cai_faq.md b/docs/cai_faq.md index e393a6eb..b5313851 100644 --- a/docs/cai_faq.md +++ b/docs/cai_faq.md @@ -91,35 +91,19 @@ ??? question "How to know more about the CLI? /help" ![cai-006-help](media/cai-006-help.png) - -??? question "How can I trace the whole execution?" - The environment variable `CAI_TRACING` allows the user to set it to `CAI_TRACING=true` to enable tracing, or `CAI_TRACING=false` to disable it. - When CAI is prompted by the first time, the user is provided with two paths, the execution log, and the tracing log. - ![cai-009-logs](media/cai-009-logs.png) ??? question "Can I expand CAI capabilities using previous run logs?" - Absolutely! The **memory extension** allows you to use a previously sucessful runs ( the log object is stored as a **.jsonl file in the [log](cai/logs) folder** ) in a new run against the same target. - The user is also given the path highlighted in orange as shown below. - - ![cai-009-logs](media/cai-009-logs.png) + Absolutely! The **/load command** allows you to use a previously sucessful runs ( the log object is stored as a **.jsonl file in the [log](cai/logs) folder** ) in a new run against the same target. How to make use of this functionality? 1. Run CAI against the target. Let's assume the target name is: `target001`. 2. Get the log file path, something like: ```logs/cai_20250408_111856.jsonl``` - 3. Generate the memory using any model of your preference: - ```shell - JSONL_FILE_PATH="logs/cai_20250408_111856.jsonl" CTF_INSIDE="false" CAI_MEMORY_COLLECTION="target001" CAI_MEMORY="episodic" CAI_MODEL="claude-3-5-sonnet-20241022" python3 tools/2_jsonl_to_memory.py - ``` + 3. Start cai again and select the jsonl file: - The script [`tools/2_jsonl_to_memory.py`](cai/tools/2_jsonl_to_memory.py) will generate a memory collection file with the most relevant steps. The quality of the memory collection will depend on the model you use. - - 4. Use the generated memory collection and execute a new run: - ```shell - CAI_MEMORY="episodic" CAI_MODEL="gpt-4o" CAI_MEMORY_COLLECTION="target001" CAI_TRACING=false python3 cai/cli.py - ``` + ![cai-011-load-command](media/cai-011-load-command.png) ??? question "Can I expand CAI capabilities using scripts or extra information?" diff --git a/docs/media/cai-011-load-command.png b/docs/media/cai-011-load-command.png new file mode 100644 index 00000000..2ef3ce9a Binary files /dev/null and b/docs/media/cai-011-load-command.png differ