curl --request POST \
--url https://api.beamstudio.ai/agent-setup \
--header 'Content-Type: application/json' \
--header 'current-workspace-id: <current-workspace-id>' \
--header 'x-api-key: <api-key>' \
--data '
{
"agentId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"agentSetupStep": "GENERATE_SOP",
"query": "I want to create an agent that helps users with customer support inquiries",
"contextFileIds": [
"a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"b2c3d4e5-f6a7-8901-bcde-f12345678901"
]
}
'import requests
url = "https://api.beamstudio.ai/agent-setup"
payload = {
"agentId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"agentSetupStep": "GENERATE_SOP",
"query": "I want to create an agent that helps users with customer support inquiries",
"contextFileIds": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890", "b2c3d4e5-f6a7-8901-bcde-f12345678901"]
}
headers = {
"current-workspace-id": "<current-workspace-id>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'current-workspace-id': '<current-workspace-id>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
agentId: 'f47ac10b-58cc-4372-a567-0e02b2c3d479',
agentSetupStep: 'GENERATE_SOP',
query: 'I want to create an agent that helps users with customer support inquiries',
contextFileIds: ['a1b2c3d4-e5f6-7890-abcd-ef1234567890', 'b2c3d4e5-f6a7-8901-bcde-f12345678901']
})
};
fetch('https://api.beamstudio.ai/agent-setup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.beamstudio.ai/agent-setup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agentId' => 'f47ac10b-58cc-4372-a567-0e02b2c3d479',
'agentSetupStep' => 'GENERATE_SOP',
'query' => 'I want to create an agent that helps users with customer support inquiries',
'contextFileIds' => [
'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'b2c3d4e5-f6a7-8901-bcde-f12345678901'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"current-workspace-id: <current-workspace-id>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.beamstudio.ai/agent-setup"
payload := strings.NewReader("{\n \"agentId\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\",\n \"agentSetupStep\": \"GENERATE_SOP\",\n \"query\": \"I want to create an agent that helps users with customer support inquiries\",\n \"contextFileIds\": [\n \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"b2c3d4e5-f6a7-8901-bcde-f12345678901\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("current-workspace-id", "<current-workspace-id>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.beamstudio.ai/agent-setup")
.header("current-workspace-id", "<current-workspace-id>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\",\n \"agentSetupStep\": \"GENERATE_SOP\",\n \"query\": \"I want to create an agent that helps users with customer support inquiries\",\n \"contextFileIds\": [\n \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"b2c3d4e5-f6a7-8901-bcde-f12345678901\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.beamstudio.ai/agent-setup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["current-workspace-id"] = '<current-workspace-id>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\",\n \"agentSetupStep\": \"GENERATE_SOP\",\n \"query\": \"I want to create an agent that helps users with customer support inquiries\",\n \"contextFileIds\": [\n \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"b2c3d4e5-f6a7-8901-bcde-f12345678901\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"nextStep": "SOP_GENERATION",
"agentResponse": {
"agent": {
"id": "agent-123e4567-e89b-12d3-a456-426614174000",
"name": "Customer Support Agent",
"creatorId": "<string>",
"type": "beam-os",
"vectorDbId": "<string>",
"creditUsage": 12.5,
"order": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"settings": {
"prompts": [
"You are a helpful customer support agent.",
"Always be polite and professional."
],
"preferredModel": "gpt-4",
"instructions": "Focus on providing concise answers."
},
"config": {
"restrictions": "<string>",
"taskTemplates": [
{
"id": "<string>",
"objective": "<string>",
"description": "<string>",
"steps": [
{
"step": "<string>",
"toolId": "<string>",
"iconSrc": "<string>",
"iconUrl": "<string>",
"beamTool": true,
"gptTool": true,
"consentRequired": true,
"integrationId": "<string>",
"isIntegrationRequired": true,
"isIntegrationConnected": true,
"integrationProvider": "<string>",
"integrationIdentifier": "<string>",
"toolDetail": {},
"integrationCustomAuthParameters": {}
}
],
"default": true,
"category": {
"id": "<string>",
"title": "<string>"
},
"lastUpdatedAt": "2023-11-07T05:31:56Z"
}
],
"tools": [
"<string>"
],
"llmTools": [
{}
],
"sop": {},
"defaultTaskId": "<string>",
"workspaceId": "<string>"
},
"workspaceId": "<string>",
"defaultTaskId": "<string>",
"themeIconUrl": "https://example.com/icons/support-agent.png",
"agentCategoryId": "<string>",
"userAccessTokenId": "<string>",
"agentSetupSessionId": "<string>",
"agentIntroMessage": "<string>",
"agentSetupMessage": "<string>",
"skipAgentSetupSop": true,
"isAttachmentDataPulledIn": true
},
"contextFiles": [
"<string>"
]
}
}Process agent setup steps
Multi-step agent configuration endpoint. Use this after agent creation (via /agent-context and /agent-creation).
GENERATE_SOP: Generates Standard Operating Procedures for the agent
- Required: agentId, query
- Returns: nextStep (GRAPH_GENERATION)
GRAPH_GENERATION: Creates agent workflow graph
- Required: agentId
- Returns: nextStep (TOOL_MATCHING)
TOOL_MATCHING: Matches existing tools to agent needs
- Required: agentId
- Returns: nextStep (TOOL_GENERATION)
TOOL_GENERATION: Generates new custom tools if needed
- Required: agentId
- Returns: nextStep (TOOL_INTEGRATION)
TOOL_INTEGRATION: Integrates selected tools with the agent
- Required: agentId
- Returns: nextStep (UPDATE_AGENT)
UPDATE_AGENT: Finalizes and updates the agent configuration
- Required: agentId
- Returns: nextStep (AGENT_UPDATED)
Note: Use /agent-context first to get threadId, then /agent-creation to create the agent and get agentId before using this endpoint.
curl --request POST \
--url https://api.beamstudio.ai/agent-setup \
--header 'Content-Type: application/json' \
--header 'current-workspace-id: <current-workspace-id>' \
--header 'x-api-key: <api-key>' \
--data '
{
"agentId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"agentSetupStep": "GENERATE_SOP",
"query": "I want to create an agent that helps users with customer support inquiries",
"contextFileIds": [
"a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"b2c3d4e5-f6a7-8901-bcde-f12345678901"
]
}
'import requests
url = "https://api.beamstudio.ai/agent-setup"
payload = {
"agentId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"agentSetupStep": "GENERATE_SOP",
"query": "I want to create an agent that helps users with customer support inquiries",
"contextFileIds": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890", "b2c3d4e5-f6a7-8901-bcde-f12345678901"]
}
headers = {
"current-workspace-id": "<current-workspace-id>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'current-workspace-id': '<current-workspace-id>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
agentId: 'f47ac10b-58cc-4372-a567-0e02b2c3d479',
agentSetupStep: 'GENERATE_SOP',
query: 'I want to create an agent that helps users with customer support inquiries',
contextFileIds: ['a1b2c3d4-e5f6-7890-abcd-ef1234567890', 'b2c3d4e5-f6a7-8901-bcde-f12345678901']
})
};
fetch('https://api.beamstudio.ai/agent-setup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.beamstudio.ai/agent-setup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agentId' => 'f47ac10b-58cc-4372-a567-0e02b2c3d479',
'agentSetupStep' => 'GENERATE_SOP',
'query' => 'I want to create an agent that helps users with customer support inquiries',
'contextFileIds' => [
'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'b2c3d4e5-f6a7-8901-bcde-f12345678901'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"current-workspace-id: <current-workspace-id>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.beamstudio.ai/agent-setup"
payload := strings.NewReader("{\n \"agentId\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\",\n \"agentSetupStep\": \"GENERATE_SOP\",\n \"query\": \"I want to create an agent that helps users with customer support inquiries\",\n \"contextFileIds\": [\n \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"b2c3d4e5-f6a7-8901-bcde-f12345678901\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("current-workspace-id", "<current-workspace-id>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.beamstudio.ai/agent-setup")
.header("current-workspace-id", "<current-workspace-id>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\",\n \"agentSetupStep\": \"GENERATE_SOP\",\n \"query\": \"I want to create an agent that helps users with customer support inquiries\",\n \"contextFileIds\": [\n \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"b2c3d4e5-f6a7-8901-bcde-f12345678901\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.beamstudio.ai/agent-setup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["current-workspace-id"] = '<current-workspace-id>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\",\n \"agentSetupStep\": \"GENERATE_SOP\",\n \"query\": \"I want to create an agent that helps users with customer support inquiries\",\n \"contextFileIds\": [\n \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"b2c3d4e5-f6a7-8901-bcde-f12345678901\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"nextStep": "SOP_GENERATION",
"agentResponse": {
"agent": {
"id": "agent-123e4567-e89b-12d3-a456-426614174000",
"name": "Customer Support Agent",
"creatorId": "<string>",
"type": "beam-os",
"vectorDbId": "<string>",
"creditUsage": 12.5,
"order": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"settings": {
"prompts": [
"You are a helpful customer support agent.",
"Always be polite and professional."
],
"preferredModel": "gpt-4",
"instructions": "Focus on providing concise answers."
},
"config": {
"restrictions": "<string>",
"taskTemplates": [
{
"id": "<string>",
"objective": "<string>",
"description": "<string>",
"steps": [
{
"step": "<string>",
"toolId": "<string>",
"iconSrc": "<string>",
"iconUrl": "<string>",
"beamTool": true,
"gptTool": true,
"consentRequired": true,
"integrationId": "<string>",
"isIntegrationRequired": true,
"isIntegrationConnected": true,
"integrationProvider": "<string>",
"integrationIdentifier": "<string>",
"toolDetail": {},
"integrationCustomAuthParameters": {}
}
],
"default": true,
"category": {
"id": "<string>",
"title": "<string>"
},
"lastUpdatedAt": "2023-11-07T05:31:56Z"
}
],
"tools": [
"<string>"
],
"llmTools": [
{}
],
"sop": {},
"defaultTaskId": "<string>",
"workspaceId": "<string>"
},
"workspaceId": "<string>",
"defaultTaskId": "<string>",
"themeIconUrl": "https://example.com/icons/support-agent.png",
"agentCategoryId": "<string>",
"userAccessTokenId": "<string>",
"agentSetupSessionId": "<string>",
"agentIntroMessage": "<string>",
"agentSetupMessage": "<string>",
"skipAgentSetupSop": true,
"isAttachmentDataPulledIn": true
},
"contextFiles": [
"<string>"
]
}
}Body
Current step in the agent setup workflow. Use /agent-context and /agent-creation first, then use this endpoint for the remaining steps:
• GENERATE_SOP - Generate Standard Operating Procedures for the agent (requires query) • GRAPH_GENERATION - Create the agent's workflow graph • TOOL_MATCHING - Match existing tools to the agent's needs • TOOL_GENERATION - Generate new custom tools if needed • TOOL_INTEGRATION - Integrate selected tools with the agent • UPDATE_AGENT - Finalize and update the agent configuration • AGENT_UPDATED - Confirmation that setup is complete
GENERATE_SOP, GRAPH_GENERATION, TOOL_MATCHING, TOOL_GENERATION, TOOL_INTEGRATION, UPDATE_AGENT, AGENT_UPDATED, CREATE_TASK "GENERATE_SOP"
User input or instructions for the current setup step. Use this to provide context about what the agent should do, describe its purpose, or give feedback during the setup process.
50000"I want to create an agent that helps users with customer support inquiries"
Response
Agent setup step processed successfully. Response structure varies by step (see operation description).