> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://ref.scoutos.com/api-sdk/endpoints/agents/get/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://ref.scoutos.com/_mcp/server. # Get an agent's active revision GET https://api.scoutos.com/agents/{agent_id}/active Retrieve an agent and its active revision by agent_id. Verifies that the agent belongs to the actor's organization. Reference: https://ref.scoutos.com/api-sdk/endpoints/agents/get ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `agent_id` (string, required) ## Response ### 200 Successful Response - `agent` (Agent, required) - `revision` (AgentRevision-Output, required) ## Errors ### 422 Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ## Types ### Agent - `created_by` (ActorIdentity, required) - `updated_by` (ActorIdentity, required) - `name` (string, required) - `parent` (string, required) - `visibility` (ActorIdentity, required) - `id` (string, optional) - `doc_type` ("agent", optional) - `created_at` (datetime, optional) - `updated_at` (datetime, optional) - `is_seed` (boolean, optional, nullable) - `description` (string, optional, nullable) - `profile_icon_fill` (string, optional, nullable) - `profile_asset_url` (string, optional, nullable) - `active_revision` (string, optional, nullable) - `from_persona` (string, optional, nullable) ### AgentRevision-Output - `created_by` (ActorIdentity, required) - `updated_by` (ActorIdentity, required) - `parent` (string, required) - `organization_id` (string, required) - `model` (AgentRevisionOutputModel, required) - `system` (string, required) - `id` (string, optional) - `doc_type` ("agent_revision", optional) - `created_at` (datetime, optional) - `updated_at` (datetime, optional) - `is_seed` (boolean, optional, nullable) - `model_provider` (enum, optional, nullable) - Allowed values: `open_ai`, `anthropic`, `google` - `temperature` (double, optional, nullable) - `response_style` (enum, optional, nullable) - Allowed values: `precise`, `balanced`, `creative`, `experimental`, `json` - `max_tokens` (integer, optional, nullable) - `max_turns` (integer, optional, nullable) - `tool_config` (map from string to AgentRevisionOutputToolConfig, optional, nullable) - `conversation_starters` (list of string, optional, nullable) - `dynamic_fallbacks` (list of AgenticModel, optional, nullable) ### ValidationError - `loc` (list of ValidationErrorLocItems, required) - `msg` (string, required) - `type` (string, required) ### ActorIdentity - `type` (ActorIdentityType, required) - `id` (ActorIdentityId, required) ### AgentRevisionOutputModel ### AgentRevisionOutputToolConfig ### AgenticModel - `model` (string, required) - `model_provider` (enum, required) - Allowed values: `open_ai`, `anthropic`, `google` ### ValidationErrorLocItems ### ActorIdentityType ### ActorIdentityId ## Examples **Response** ```json { "agent": { "created_by": { "type": "organization", "id": "org-12345" }, "updated_by": { "type": "organization", "id": "org-12345" }, "name": "Customer Support Bot", "parent": "root-agent", "visibility": { "type": "organization", "id": "org-12345" }, "id": "a1b2c3d4-e5f6-7890-ab12-cd34ef567890", "doc_type": "agent", "created_at": "2024-01-15T09:30:00Z", "updated_at": "2024-04-10T11:45:00Z", "is_seed": true, "description": "An AI agent designed to handle customer inquiries and support tickets.", "profile_icon_fill": "#4A90E2", "profile_asset_url": "https://cdn.example.com/assets/agent-icons/support-bot.png", "active_revision": "rev-98765", "from_persona": "support_specialist" }, "revision": { "created_by": { "type": "organization", "id": "org-12345" }, "updated_by": { "type": "organization", "id": "org-12345" }, "parent": "a1b2c3d4-e5f6-7890-ab12-cd34ef567890", "organization_id": "org-12345", "model": "gpt-4", "system": "You are a helpful customer support assistant.", "id": "rev-98765", "doc_type": "agent_revision", "created_at": "2024-04-01T08:00:00Z", "updated_at": "2024-04-10T11:45:00Z", "is_seed": true, "model_provider": "open_ai", "temperature": 0.7, "response_style": "precise", "max_tokens": 150, "max_turns": 10, "tool_config": {}, "conversation_starters": [ "Hello! How can I assist you today?" ], "dynamic_fallbacks": [ { "model": "gpt-3.5-turbo", "model_provider": "open_ai" } ] } } ``` **SDK Code** ```python import requests url = "https://api.scoutos.com/agents/agent_id/active" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` ```typescript import { ScoutClient } from "scoutos"; const client = new ScoutClient({ apiKey: "YOUR_API_KEY" }); await client.agents.get("agent_id"); ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.scoutos.com/agents/agent_id/active" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.scoutos.com/agents/agent_id/active") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.scoutos.com/agents/agent_id/active") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.scoutos.com/agents/agent_id/active', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.scoutos.com/agents/agent_id/active"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.scoutos.com/agents/agent_id/active")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```