Create Session for Agent
lyzr_session_create_for_agentCreate a session for a specific agent, assigning a user as owner and optionally adding metadata. Establishes a dedicated context for agent operations.
Instructions
Create a new session bound to a specific agent.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"agent_id": "<agent_id>",
"user_id": "<user_id>"
},
"name": "lyzr_session_create_for_agent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes | Owner of the session | |
| agent_id | Yes | Agent id to create the session for | |
| metadata | No | Free-form session metadata (defaults to {}) | |
| extra_fields | No | Additional Session fields to merge into the body |