POST
/
sessions

Authorizations

Authorization
string
header
required

Body

application/json

Payload for creating a session

agent
string | null
agents
string[] | null
auto_run_tools
boolean
default:
false
context_overflow
enum<string> | null
Available options:
truncate,
adaptive
forward_tool_calls
boolean
default:
false
metadata
object | null
recall_options
object | null
render_templates
boolean
default:
true
situation
string | null
system_template
string
default:
{%- if agent.name -%} You are {{agent.name}}.{{" "}} {%- endif -%} {%- if agent.about -%} About you: {{agent.about}}.{{" "}} {%- endif -%} {%- if user -%} You are talking to a user {%- if user.name -%}{{" "}} and their name is {{user.name}} {%- if user.about -%}. About the user: {{user.about}}.{%- else -%}.{%- endif -%} {%- endif -%} {%- endif -%} {{NEWLINE}} {%- if session.situation -%} Situation: {{session.situation}} {%- endif -%} {{NEWLINE+NEWLINE}} {%- if agent.instructions -%} Instructions:{{NEWLINE}} {%- if agent.instructions is string -%} {{agent.instructions}}{{NEWLINE}} {%- else -%} {%- for instruction in agent.instructions -%} - {{instruction}}{{NEWLINE}} {%- endfor -%} {%- endif -%} {{NEWLINE}} {%- endif -%} {%- if docs -%} Relevant documents:{{NEWLINE}} {%- for doc in docs -%} {{doc.title}}{{NEWLINE}} {%- if doc.content is string -%} {{doc.content}}{{NEWLINE}} {%- else -%} {%- for snippet in doc.content -%} {{snippet}}{{NEWLINE}} {%- endfor -%} {%- endif -%} {{"---"}} {%- endfor -%} {%- endif -%}
token_budget
integer | null
user
string | null
users
string[] | null

Response

201 - application/json
created_at
string
required
id
string
required
jobs
string[]