Sem (assistant)
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
multipart/form-data- body
session_id*Session Idfile*FileSuccessful Response
application/json- response
id*Idsession_id*Session Idkind*Kind"image""file"name*Namemime*Mimesize*Sizecreated_at*Created Atdate-timefile_item_id?string|nullcurl -X POST 'https://example.com/agent/attachments' \ -F 'session_id=string' \ -F 'file=string'{ "id": "string", "session_id": "string", "kind": "image", "name": "string", "mime": "string", "size": 0, "created_at": "2019-08-24T14:15:22Z", "file_item_id": "string"}Attachments already part of a message stay until the conversation is deleted.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
id*IdAttachment id.
Successful Response
application/json- response
deleted*Deletedcurl -X DELETE 'https://example.com/agent/attachments/string'{ "deleted": true}Use when the user wants to keep an attached document (a syllabus, notes) with the course. The file is then processed like any course file (searchable, citable). Saving it to the same course again returns the saved file.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
id*IdAttachment id
application/json- body
course_id*Course IdCourse to save the file to
Successful Response
application/json- response
id*Idcourse_id*Course Idfolder_id*string|nullkind*Kind"file""link"display_name*Display Nameoriginal_name*string|nullmime_type*string|nullsize_bytes*Size Bytessha256*string|nullurl*string|nullpinned*Pinnedsource_kind*|nullsource_ref*string|nulldoc_status*Doc Status"none""pending""processing""ready""failed""unsupported"doc_error_code*string|nullpage_count*integer|nullocr_skipped_pages*Ocr Skipped Pagesjob_id*string|nullcreated_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X POST 'https://example.com/agent/attachments/string:save' \ -H 'Content-Type: application/json' \ -d '{ "course_id": "string"}'{ "id": "string", "course_id": "string", "folder_id": "string", "kind": "file", "display_name": "string", "original_name": "string", "mime_type": "string", "size_bytes": 0, "sha256": "string", "url": "string", "pinned": true, "source_kind": "upload", "source_ref": "string", "doc_status": "none", "doc_error_code": "string", "page_count": 0, "ocr_skipped_pages": 0, "job_id": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Conversations are kept.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
Successful Response
application/json- response
deleted*Deletedcurl -X POST 'https://example.com/agent/memories:clear'{ "deleted": 0}Only the fields sent are changed. Also the undo of a memory updated in a conversation (send back its previous fields).
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
id*IdMemory id.
application/json- body
name?|The memory's kebab-case name (lowercase ASCII letters, digits and hyphens), such as preferred-name or no-tables-in-answers.
type?|New type.
description?|New one-line text.
body?|New body; an empty string removes it.
Successful Response
application/json- response
id*Idname*Nametype*Type"user""feedback""project""reference"description*Descriptionbody*Bodysource_session_id*string|nullcreated_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X PATCH 'https://example.com/agent/memories/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "name": "string", "type": "user", "description": "string", "body": "string", "source_session_id": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Also the undo of a memory saved in a conversation.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
id*IdMemory id.
Successful Response
application/json- response
id*Idname*Nametype*Type"user""feedback""project""reference"description*Descriptionbody*Bodysource_session_id*string|nullcreated_at*Created Atdate-timeupdated_at*Updated Atdate-timecurl -X DELETE 'https://example.com/agent/memories/string'{ "id": "string", "name": "string", "type": "user", "description": "string", "body": "string", "source_session_id": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Newest first.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
Successful Response
application/json- response
items*array<>limit*Limitcurl -X GET 'https://example.com/agent/memories'{ "items": [ { "id": "string", "name": "string", "type": "user", "description": "string", "body": "string", "source_session_id": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "limit": 0}Which write actions run without a confirmation card; MCP delete permission.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
Successful Response
application/json- response
auto_approve*array<string>Write capabilities that run without asking.
mcp_allow_destructive*Mcp Allow DestructiveMCP clients may run delete actions.
curl -X GET 'https://example.com/agent/preferences'{ "auto_approve": [ "string" ], "mcp_allow_destructive": true}Only write actions can be auto-approved; delete actions always ask.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
application/json- body
auto_approve?array<string>|Write capabilities that run without asking.
mcp_allow_destructive?|Let MCP clients run delete actions.
Successful Response
application/json- response
auto_approve*array<string>Write capabilities that run without asking.
mcp_allow_destructive*Mcp Allow DestructiveMCP clients may run delete actions.
curl -X PATCH 'https://example.com/agent/preferences' \ -H 'Content-Type: application/json' \ -d '{}'{ "auto_approve": [ "string" ], "mcp_allow_destructive": true}Newest first; pinned ones are sorted by the client.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
query?|Matches the title.
archived?ArchivedList archived sessions instead.
falselimit?LimitAt most this many, newest first.
100Successful Response
application/json- response
items*array<>curl -X GET 'https://example.com/agent/sessions'{ "items": [ { "id": "string", "title": "string", "program_id": "string", "scope": { "program_id": "string", "term_id": "string", "course_id": "string" }, "pinned": true, "temporary": true, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "archived_at": "2019-08-24T14:15:22Z" } ]}Where the assistant works: a Program or one of its terms. Idempotent per
client_key.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
application/json- body
scope?|Page scope to start from.
client_key?|Random key of the new conversation in the client; creating again with the same key returns the same conversation (double sends, upload and send racing).
temporary?TemporaryA temporary chat neither reads nor writes memories.
falseSuccessful Response
application/json- response
id*Idtitle*string|nullprogram_id*string|nullscope*|nullpinned*Pinnedtemporary*Temporarycreated_at*Created Atdate-timeupdated_at*Updated Atdate-timearchived_at*|nullcurl -X POST 'https://example.com/agent/sessions' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "title": "string", "program_id": "string", "scope": { "program_id": "string", "term_id": "string", "course_id": "string" }, "pinned": true, "temporary": true, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "archived_at": "2019-08-24T14:15:22Z"}Pending proposals older than 24 hours are reported as expired.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
id*IdSession id.
Successful Response
application/json- response
session*messages*array<>proposals*array<>attachments*array<>generating*GeneratingAn answer is being generated right now.
regenerable?|The answer that can be regenerated (its first message's id), if any.
compactable?CompactableThere are turns before the last message to compact now.
falsecontext?|How full the context is.
compaction?|The summary that stands in for the earlier conversation.
curl -X GET 'https://example.com/agent/sessions/string'{ "session": { "id": "string", "title": "string", "program_id": "string", "scope": { "program_id": "string", "term_id": "string", "course_id": "string" }, "pinned": true, "temporary": true, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "archived_at": "2019-08-24T14:15:22Z" }, "messages": [ { "id": "string", "role": "user", "content": [ {} ], "model": "string", "input_tokens": 0, "output_tokens": 0, "created_at": "2019-08-24T14:15:22Z" } ], "proposals": [ { "id": "string", "session_id": "string", "message_id": "string", "call_id": "string", "capability": "string", "effect": "read", "args": {}, "input_schema": {}, "preview": {}, "status": "pending", "result": null, "display": {}, "error_code": "string", "created_at": "2019-08-24T14:15:22Z", "decided_at": "2019-08-24T14:15:22Z", "executed_at": "2019-08-24T14:15:22Z" } ], "attachments": [ { "id": "string", "session_id": "string", "kind": "image", "name": "string", "mime": "string", "size": 0, "created_at": "2019-08-24T14:15:22Z", "file_item_id": "string" } ], "generating": true, "regenerable": "string", "compactable": false, "context": { "used": 0, "window": 0, "parts": { "instructions": 0, "tools": 0, "summary": 0, "conversation": 0, "reads": 0, "attachments": 0 } }, "compaction": { "until": "string", "summary": "string" }}Only the fields sent are changed.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
id*IdSession id.
application/json- body
title?|New title.
pinned?|Pin to the top of the list.
archived?|Archive or restore.
scope?|Change where the assistant works (a term or the whole Program).
Successful Response
application/json- response
id*Idtitle*string|nullprogram_id*string|nullscope*|nullpinned*Pinnedtemporary*Temporarycreated_at*Created Atdate-timeupdated_at*Updated Atdate-timearchived_at*|nullcurl -X PATCH 'https://example.com/agent/sessions/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "title": "string", "program_id": "string", "scope": { "program_id": "string", "term_id": "string", "course_id": "string" }, "pinned": true, "temporary": true, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "archived_at": "2019-08-24T14:15:22Z"}Cannot be undone.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
id*IdSession id.
Successful Response
application/json- response
deleted*Deletedcurl -X DELETE 'https://example.com/agent/sessions/string'{ "deleted": true}What was written so far is kept.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
id*IdSession id.
Successful Response
application/json- response
stopped*Stoppedcurl -X POST 'https://example.com/agent/sessions/string:stop'{ "stopped": true}Titles are in both interface languages.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
Successful Response
application/json- response
items*array<>curl -X GET 'https://example.com/agent/skills'{ "items": [ { "name": "string", "title": { "property1": "string", "property2": "string" }, "command": "string", "description": "string", "module": "string" } ]}Up to three, from what is due, today's classes and the gradebook of the scope; in the small model's words when the account allows it (rewritten at most twice a day).
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
program_id*Program IdProgram the assistant works in.
term_id?|Term it works in, if any.
course_id?|Course of older conversations; new ones work in a Program or a term.
Successful Response
application/json- response
items*array<>curl -X GET 'https://example.com/agent/suggestions?program_id=string'{ "items": [ { "key": "string", "code": "overdue", "params": { "property1": "string", "property2": "string" }, "course_id": "string", "text": "string" } ]}Plugin tools appear once the plugin is installed.
semestra_session<token>Set by the sign-in endpoints for the web app. Requests other than GET, HEAD and OPTIONS also need the X-Semestra-CSRF header set to the semestra_csrf cookie.
Successful Response
application/json- response
items*array<>curl -X GET 'https://example.com/agent/tools'{ "items": [ { "name": "string", "module": "string", "summary": "string", "effect": "read", "plugin_id": "string", "core": true, "mcp": true, "confirm": true } ]}