TestSessionSimpleAgent.yaml

  1---
  2version: 2
  3interactions:
  4- id: 0
  5  request:
  6    proto: HTTP/1.1
  7    proto_major: 1
  8    proto_minor: 1
  9    content_length: 281
 10    host: ""
 11    body: '{"max_tokens":10000,"messages":[{"content":[{"text":"Hello","cache_control":{"type":"ephemeral"},"type":"text"}],"role":"user"}],"model":"claude-sonnet-4-5-20250929","system":[{"text":"You are a helpful assistant","cache_control":{"type":"ephemeral"},"type":"text"}],"stream":true}'
 12    headers:
 13      Accept:
 14      - application/json
 15      Content-Type:
 16      - application/json
 17      User-Agent:
 18      - Anthropic/Go 1.12.0
 19    url: https://api.anthropic.com/v1/messages
 20    method: POST
 21  response:
 22    proto: HTTP/2.0
 23    proto_major: 2
 24    proto_minor: 0
 25    content_length: -1
 26    body: |+
 27      event: message_start
 28      data: {"type":"message_start","message":{"id":"msg_01WGBTmd2Q5E2ajXUoHZYg6K","type":"message","role":"assistant","model":"claude-sonnet-4-5-20250929","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":13,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":8,"service_tier":"standard"}}      }
 29
 30      event: content_block_start
 31      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}         }
 32
 33      event: content_block_delta
 34      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Hello! How can I help you today"}}
 35
 36      event: content_block_delta
 37      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"?"}    }
 38
 39      event: content_block_stop
 40      data: {"type":"content_block_stop","index":0  }
 41
 42      event: message_delta
 43      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":13,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":12}       }
 44
 45      event: message_stop
 46      data: {"type":"message_stop"        }
 47
 48    headers:
 49      Content-Type:
 50      - text/event-stream; charset=utf-8
 51    status: 200 OK
 52    code: 200
 53    duration: 1.891647s
 54- id: 1
 55  request:
 56    proto: HTTP/1.1
 57    proto_major: 1
 58    proto_minor: 1
 59    content_length: 621
 60    host: ""
 61    body: '{"max_tokens":40,"messages":[{"content":[{"text":"Generate a concise title for the following content:\n\nHello","type":"text"}],"role":"user"}],"model":"claude-sonnet-4-5-20250929","system":[{"text":"you will generate a short title based on the first message a user begins a conversation with\n\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n","type":"text"}],"stream":true}'
 62    headers:
 63      Accept:
 64      - application/json
 65      Content-Type:
 66      - application/json
 67      User-Agent:
 68      - Anthropic/Go 1.12.0
 69    url: https://api.anthropic.com/v1/messages
 70    method: POST
 71  response:
 72    proto: HTTP/2.0
 73    proto_major: 2
 74    proto_minor: 0
 75    content_length: -1
 76    body: |+
 77      event: message_start
 78      data: {"type":"message_start","message":{"id":"msg_01CZb9drep7yMKkc2wzNDt5G","type":"message","role":"assistant","model":"claude-sonnet-4-5-20250929","content":[],"stop_reason":null,"stop_sequence":null,"usage":{"input_tokens":109,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":10,"service_tier":"standard"}}    }
 79
 80      event: content_block_start
 81      data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}       }
 82
 83      event: content_block_delta
 84      data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Greeting or Starting a Conversation"}           }
 85
 86      event: content_block_stop
 87      data: {"type":"content_block_stop","index":0}
 88
 89      event: message_delta
 90      data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":109,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":10}          }
 91
 92      event: message_stop
 93      data: {"type":"message_stop"               }
 94
 95    headers:
 96      Content-Type:
 97      - text/event-stream; charset=utf-8
 98    status: 200 OK
 99    code: 200
100    duration: 2.547489s