From e602abf919919c60a1ff0b33e030c530c582676d Mon Sep 17 00:00:00 2001 From: Charles Packer Date: Sun, 26 Oct 2025 00:17:42 -0700 Subject: [PATCH] Update README.md --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index c84ac0e..e4559ae 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,30 @@ letta -p "run tests" --tools "Bash,Read" # Only load specific tools letta -p "analyze code" --tools "" # No tools (analysis only) ``` +Use `--output-format json` to get additional information, including the agent ID ("session_id"): +```bash +# regular text output +$ letta -p "hi there" +Hi! How can I help you today? + +# structured output +$ letta -p "hi there" --output-format json +{ + "type": "result", + "subtype": "success", + "is_error": false, + "duration_ms": 5454, + "duration_api_ms": 2098, + "num_turns": 1, + "result": "Hi! How can I help you today?", + "session_id": "agent-8ab431ca-63e0-4ca1-ba83-b64d66d95a0f", + "usage": { + "input_tokens": 294, + "output_tokens": 97 + } +} +``` + ### Permissions **Tool selection** (controls which tools are loaded):