创建新会话
Documentation Index
Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
Use this file to discover all available pages before exploring further.
ManageOrgSessions 权限的服务用户账号。
| 功能 | 所需权限 |
|---|---|
create_as_user_id | ImpersonateOrgSessions |
devin_mode 参数用于控制会话使用哪种 Devin Agent 模式:
| 模式 | 说明 |
|---|---|
normal | 默认 Agent 模式。速度快,并且擅长长周期规划。 |
fast | 速度约快 2 倍,价格贵 4 倍,智能水平相同。 |
create_as_user_id 参数允许代表其他用户创建会话。前提条件如下:
ImpersonateOrgSessions 权限UseDevinSessions 权限服务用户凭据(前缀:cog_)
组织 ID(前缀:org-)
"org-abc123def456"
1 - 2083为该会话覆盖 Devin 的 Agent 模式。'normal' 是默认的 Agent 模式(速度快,且擅长长程规划)。'fast' 的速度约快 2 倍,费用高 4 倍,但智能水平相同。快速模式与 Web 应用一样,受相同的功能开关和 Enterprise Agent 预览限制约束。
normal, fast 覆盖会话的 VM 平台(例如“windows”)。省略时(或设为“inherit”),由父级 Devin 创建的会话将继承父级的平台;否则使用组织默认平台。传入“default”可强制使用组织默认平台,而不考虑父级。任何其他值都必须与为你的组织配置的平台之一匹配(不区分大小写);无法识别的值将被拒绝并返回 400,错误响应体会列出该组织可用的平台标签。
为 true 时(默认),Agent 必须在当前轮次结束前调用 provide_structured_output,且 is_final=true。为 false 时,该工具可用但非必需——不保证会在某一轮次中被调用。
用于验证结构化输出的 JSON Schema(Draft 7),最大 64KB。必须是自包含的(不允许外部 $ref)。
成功响应
new, claimed, running, exit, error, suspended, resuming 如果已完成分类,则为会话分配的用例类别。仅在 get/list 端点中返回。
bug_fixing, ci_cd_and_devops, code_quality_and_security, code_review_and_analysis, data_and_automation, documentation_and_content, feature_development, migrations_and_upgrades, other, refactoring_and_optimization, research_and_exploration, unit_test_generation 该会话的创建来源。
webapp, slack, teams, api, linear, jira, automation, cli, desktop, other 会话当前状态的附加信息。当 status 为“running”时:可为“working”(正在处理)、“waiting_for_user”(需要用户输入)、“waiting_for_approval”(在安全模式下等待操作批准)或“finished”(任务已完成)。当 status 为“suspended”时:表示挂起原因,例如“inactivity”“user_request”“usage_limit_exceeded”“out_of_credits”“out_of_quota”“no_quota_allocation”“payment_declined”“org_usage_limit_exceeded”“total_session_limit_exceeded”或“error”。仅在 get/list 端点中返回。
working, waiting_for_user, waiting_for_approval, finished, inactivity, user_request, usage_limit_exceeded, out_of_credits, out_of_quota, no_quota_allocation, payment_declined, org_usage_limit_exceeded, total_session_limit_exceeded, error 来自会话的已验证结构化输出。仅在 GET/LIST 端点中返回。
为会话分配的子类别显示名称。若已设置类别但未分配或未解析出子类别,则为“Other”。仅在 get/list 端点中返回。