agent_sessions

upload a new agent session

This endpoint allows the client to create a new agent session.

Sessions are created from pre-parsed and curated data (curated_data JSON) and optionally linked to an S3-stored raw file via s3_key. Use the presign endpoint to get an upload URL for the raw file first.

Use the Forem CLI plugin to upload sessions directly from the command line.

post/api/agent_sessions

Request body

titlestring

Title for the session (auto-generated if omitted)

curated_datastring required

JSON string of curated session data with messages array and metadata.

s3_keystring

S3 object key from presign endpoint (optional).

tool_name'claude_code' | 'codex' | 'gemini_cli' | 'github_copilot' | 'opencode' | 'pi'

Tool that produced the session (e.g. claude_code, codex).

Response

created

idinteger required
slugstring required
titlestring required
tool_namestring required

Tool that produced the session (e.g. claude_code, codex)

total_messagesinteger required
publishedboolean required
created_atstring date-time required
updated_atstring date-time
urlstring url required

Changes