Agent बनाएं
/v1/agentsVersion 1 पर एक सेव किया गया Agent बनाएं। Body strict JSON है: अनजान fields पर 400 लौटता है। multi_agent को छोड़ दें या null रखें।
Headers
वैकल्पिक। न देने पर service खुद एक key बनाती है, इसलिए retry किया गया request duplicate बना सकता है। Retries के लिए अपनी स्थिर key भेजें।
Request body
JSON object।
Models API से ज़रूरी model ID, अधिकतम 200 अक्षर। कोई डिफ़ॉल्ट नहीं है; model न देने पर 400 लौटता है। उदाहरणों में deepseek/deepseek-v4-flash इस्तेमाल हुआ है।
Display name, अधिकतम 128 अक्षर।
System instructions, अधिकतम 256 KiB।
Execution runtime: codex (डिफ़ॉल्ट), claude या mcode।
Skill references: {"skill_id": "skl_…", "version": null | "<version>"}। अधिकतम 32। नई binding पर null, Agent सेव होते समय के मौजूदा डिफ़ॉल्ट version को pin करता है। मौजूदा binding पर null उसका pinned version बनाए रखता है; upgrade करने के लिए स्पष्ट version दें।
MCP references: {connection_id, server_label, allowed_tools, required}। अधिकतम 32; server_label Agent में unique होना चाहिए। छोड़ने पर built-in SandBase tools मिलते हैं ({"connection_id": "builtin:sandbase", "server_label": "sandbase_builtin"}); आपकी भेजी गई सूची इस डिफ़ॉल्ट की जगह लेती है, और [] बिना tools वाला Agent बनाता है। Built-in SandBase tools (/agents/mcp-tools#built-in-sandbase-tools) देखें।
अधिकतम 64 function tools और ज़्यादा से ज़्यादा एक web_search tool। फ़िलहाल Sessions में web_search mode disabled होना ज़रूरी है, और client-side function results अभी सपोर्टेड नहीं हैं।
format.type text या json_schema (object schema के साथ); verbosity low, medium या high।
effort none, minimal, low, medium, high, xhigh या max; summary concise, detailed या auto।
auto (डिफ़ॉल्ट), default, flex, priority या fast।
अधिकतम 16 string pairs; keys अधिकतम 64 और values अधिकतम 512 अक्षर।
लंबा विवरण, अधिकतम 4096 अक्षर।
Version 1 पर दर्ज होने वाला change note।
Agent object
create, get, update, archive, unarchive, restore और clone से लौटता है।
agt_ prefix वाला Agent ID।
हमेशा agent।
मौजूदा version। हर प्रभावी write एक नया version बनाता है।
PATCH, archive, unarchive और restore के लिए compare-and-set token।
active या archived।
मौजूदा version की execution readiness। Sessions के लिए ready ज़रूरी है; नया Agent थोड़ी देर के लिए pending दिखा सकता है।
codex, claude या mcode।
आपके Agents के लिए private; catalog entries के लिए public।
Unix seconds। Active रहने तक archived_at null रहता है।