Agent Invocation
Operations for the Agent Invocation service collection.
| Language | Last Update |
|---|---|
| Python | v1.6.6 |
| PowerShell | |
| Go | v0.22.0 |
| TypeScript | v0.7.0 |
| Rust | |
| Ruby | v1.4.0 |
Table of Contents
Section titled “Table of Contents”| Operation | Description |
|---|---|
GetAgentInvocationV3get_agent_invocation_v3 | Get the messages that an invocation produced. |
InvokeAgentVersionExternalV1invoke_agent_version_external_v1 | Invoke a specific agent version by agent ID and version ID with the specified input. |
InvokePublishedAgentExternalV1invoke_published_agent_external_v1 | Invoke a published agent by ID with the specified input. |
PatchAgentInvocationV3update_agent_invocation | Modify an in-flight agent invocation. |
GetAgentInvocationV3
Section titled “GetAgentInvocationV3”Get the messages that an invocation produced.
Method GET
Route /agentic-studio/entities/agent-invocations/v3
Scope Charlotte AI Agent Definition: READ
PEP 8
get_agent_invocation_v3Parameters
Section titled “Parameters”id query · string
Invocation ID
parameters query · dictionary
Full query string parameters payload in JSON format. Not required when using other keywords.
Code Examples
from falconpy import AgentInvocation
falcon = AgentInvocation(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_agent_invocation_v3(id=id_list)print(response)from falconpy import AgentInvocation
falcon = AgentInvocation(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.GetAgentInvocationV3(id=id_list)print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.command("GetAgentInvocationV3", id="string")print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/agent_invocation")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
response, err := client.AgentInvocation.GetAgentInvocationV3( &agent_invocation.GetAgentInvocationV3Params{ ID: "string", Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: "us-1", clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.agentInvocation.getAgentInvocationV3("string"); // id
console.log(response);Examples coming soon.
require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::AgentInvocation.new
response = api.get_agent_invocation_v3('string')
puts responseResponses
[ { "ai_trace_id": "string", "compaction": {}, "conversation": [], "id": "string", "status": "string", "tool_approvals": [] }]{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}InvokeAgentVersionExternalV1
Section titled “InvokeAgentVersionExternalV1”Invoke a specific agent version by agent ID and version ID with the specified input.
Method POST
Route /agentic-studio/entities/agent-version-invocations/v1
Scope Charlotte AI Agent Definition: WRITE
PEP 8
invoke_agent_version_external_v1Parameters
Section titled “Parameters”body body · dictionary
Full body payload as JSON formatted dictionary.
credit_cents_limit body · integer
The credit_cents_limit value.
deadline_seconds body · integer
The deadline_seconds value.
id body · string
The id value.
messages body · array
The messages value.
version_id body · string
The version_id value.
Code Examples
from falconpy import AgentInvocation
falcon = AgentInvocation(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
messages = [ { "content": "string", "error": { "code": "string", "message": "string", "param": "string", "type": "string" }, "reasoning": "string", "role": "string", "tool": { "calls": [ { "function": { "arguments": "string", "name": "string" }, "id": "string", "type": "string" } ], "tool_id": "string" }, "tool_approval": { "external_approval": { "external_id": "string", "provider": "string" }, "id": "string", "invocation_id": "string", "parameters": "string", "request_message": "string", "requested_at": "string", "responded_at": "string", "responded_by": { "customer_id": "string", "service_id": "string", "user_id": "string" }, "response_message": "string", "source_agent_id": "string", "source_invocation_id": "string", "status": "string", "tool_call_id": "string", "tool_id": "string", "tool_name": "string" } }]
response = falcon.invoke_agent_version_external_v1(credit_cents_limit=integer, deadline_seconds=integer, id="string", messages=messages, version_id="string")print(response)from falconpy import AgentInvocation
falcon = AgentInvocation(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
messages = [ { "content": "string", "error": { "code": "string", "message": "string", "param": "string", "type": "string" }, "reasoning": "string", "role": "string", "tool": { "calls": [ { "function": { "arguments": "string", "name": "string" }, "id": "string", "type": "string" } ], "tool_id": "string" }, "tool_approval": { "external_approval": { "external_id": "string", "provider": "string" }, "id": "string", "invocation_id": "string", "parameters": "string", "request_message": "string", "requested_at": "string", "responded_at": "string", "responded_by": { "customer_id": "string", "service_id": "string", "user_id": "string" }, "response_message": "string", "source_agent_id": "string", "source_invocation_id": "string", "status": "string", "tool_call_id": "string", "tool_id": "string", "tool_name": "string" } }]
response = falcon.InvokeAgentVersionExternalV1(credit_cents_limit=integer, deadline_seconds=integer, id="string", messages=messages, version_id="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = { "credit_cents_limit": integer, "deadline_seconds": integer, "id": "string", "messages": [ { "content": "string", "error": { "code": "string", "message": "string", "param": "string", "type": "string" }, "reasoning": "string", "role": "string", "tool": { "calls": ["string"], "result": {}, "tool_id": "string" }, "tool_approval": { "external_approval": {}, "id": "string", "invocation_id": "string", "parameters": {}, "request_message": "string", "requested_at": "string", "responded_at": "string", "responded_by": {}, "response_message": "string", "source_agent_id": "string", "source_invocation_id": "string", "status": "string", "tool_call_id": "string", "tool_id": "string", "tool_name": "string" } } ], "version_id": "string"}
response = falcon.command("InvokeAgentVersionExternalV1", body=body_payload)print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/agent_invocation" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
id := "string" content := "string" role := "string" versionID := "string"
response, err := client.AgentInvocation.InvokeAgentVersionExternalV1( &agent_invocation.InvokeAgentVersionExternalV1Params{ Body: &models.APIInvokeAgentVersionExternalRequest{ CreditCentsLimit: integer, DeadlineSeconds: integer, ID: &id, Messages: []*models.APIMessage{ { Content: &content, Error: &models.APIInvocationErrorMessage{}, Reasoning: "string", Role: &role, Tool: &models.APIAgentInvocationTool{}, ToolApproval: &models.APIToolApproval{}, }, }, VersionID: &versionID, }, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}Examples coming soon.
Examples coming soon.
Examples coming soon.
Responses
[ { "ai_trace_id": "string", "compaction": {}, "conversation": [], "id": "string", "status": "string", "tool_approvals": [] }]{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}InvokePublishedAgentExternalV1
Section titled “InvokePublishedAgentExternalV1”Invoke a published agent by ID with the specified input.
Method POST
Route /agentic-studio/entities/agent-invocations/v1
Scope Charlotte AI Agent Definition: WRITE
PEP 8
invoke_published_agent_external_v1Parameters
Section titled “Parameters”body body · dictionary
Full body payload as JSON formatted dictionary.
credit_cents_limit body · integer
The credit_cents_limit value.
deadline_seconds body · integer
The deadline_seconds value.
id body · string
The id value.
messages body · array
The messages value.
Code Examples
from falconpy import AgentInvocation
falcon = AgentInvocation(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
messages = [ { "content": "string", "error": { "code": "string", "message": "string", "param": "string", "type": "string" }, "reasoning": "string", "role": "string", "tool": { "calls": [ { "function": { "arguments": "string", "name": "string" }, "id": "string", "type": "string" } ], "tool_id": "string" }, "tool_approval": { "external_approval": { "external_id": "string", "provider": "string" }, "id": "string", "invocation_id": "string", "parameters": "string", "request_message": "string", "requested_at": "string", "responded_at": "string", "responded_by": { "customer_id": "string", "service_id": "string", "user_id": "string" }, "response_message": "string", "source_agent_id": "string", "source_invocation_id": "string", "status": "string", "tool_call_id": "string", "tool_id": "string", "tool_name": "string" } }]
response = falcon.invoke_published_agent_external_v1(credit_cents_limit=integer, deadline_seconds=integer, id="string", messages=messages)print(response)from falconpy import AgentInvocation
falcon = AgentInvocation(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
messages = [ { "content": "string", "error": { "code": "string", "message": "string", "param": "string", "type": "string" }, "reasoning": "string", "role": "string", "tool": { "calls": [ { "function": { "arguments": "string", "name": "string" }, "id": "string", "type": "string" } ], "tool_id": "string" }, "tool_approval": { "external_approval": { "external_id": "string", "provider": "string" }, "id": "string", "invocation_id": "string", "parameters": "string", "request_message": "string", "requested_at": "string", "responded_at": "string", "responded_by": { "customer_id": "string", "service_id": "string", "user_id": "string" }, "response_message": "string", "source_agent_id": "string", "source_invocation_id": "string", "status": "string", "tool_call_id": "string", "tool_id": "string", "tool_name": "string" } }]
response = falcon.InvokePublishedAgentExternalV1(credit_cents_limit=integer, deadline_seconds=integer, id="string", messages=messages)print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = { "credit_cents_limit": integer, "deadline_seconds": integer, "id": "string", "messages": [ { "content": "string", "error": { "code": "string", "message": "string", "param": "string", "type": "string" }, "reasoning": "string", "role": "string", "tool": { "calls": ["string"], "result": {}, "tool_id": "string" }, "tool_approval": { "external_approval": {}, "id": "string", "invocation_id": "string", "parameters": {}, "request_message": "string", "requested_at": "string", "responded_at": "string", "responded_by": {}, "response_message": "string", "source_agent_id": "string", "source_invocation_id": "string", "status": "string", "tool_call_id": "string", "tool_id": "string", "tool_name": "string" } } ]}
response = falcon.command("InvokePublishedAgentExternalV1", body=body_payload)print(response)Examples coming soon.
package main
import ( "context" "fmt" "os"
"github.com/crowdstrike/gofalcon/falcon" "github.com/crowdstrike/gofalcon/falcon/client/agent_invocation" "github.com/crowdstrike/gofalcon/falcon/models")
func main() { client, err := falcon.NewClient(&falcon.ApiConfig{ ClientId: os.Getenv("FALCON_CLIENT_ID"), ClientSecret: os.Getenv("FALCON_CLIENT_SECRET"), Context: context.Background(), }) if err != nil { panic(err) }
id := "string" content := "string" role := "string"
response, err := client.AgentInvocation.InvokePublishedAgentExternalV1( &agent_invocation.InvokePublishedAgentExternalV1Params{ Body: &models.APIInvokePublishedAgentExternalRequest{ CreditCentsLimit: integer, DeadlineSeconds: integer, ID: &id, Messages: []*models.APIMessage{ { Content: &content, Error: &models.APIInvocationErrorMessage{}, Reasoning: "string", Role: &role, Tool: &models.APIAgentInvocationTool{}, ToolApproval: &models.APIToolApproval{}, }, }, }, Context: context.Background(), }, ) if err != nil { panic(falcon.ErrorExplain(err)) }
fmt.Printf("%+v\n", response.Payload)}import { FalconClient } from "crowdstrike-falcon";
const client = new FalconClient({ cloud: "us-1", clientId: process.env.FALCON_CLIENT_ID!, clientSecret: process.env.FALCON_CLIENT_SECRET!,});
const response = await client.agentInvocation.invokePublishedAgentExternalV1( { creditCentsLimit: integer, deadlineSeconds: integer, id: "string", messages: [{ content: "string", error: { code: "string", message: "string", param: "string", type: "string" }, reasoning: "string", role: "string", tool: { calls: [], toolId: "string" }, toolApproval: { id: "string", invocationId: "string", parameters: {}, requestMessage: "string", requestedAt: new Date(), respondedAt: new Date(), responseMessage: "string", sourceAgentId: "string", sourceInvocationId: "string", status: "string", toolCallId: "string", toolId: "string", toolName: "string" } }]} // body);
console.log(response);Examples coming soon.
require "crimson-falcon"
Falcon.configure do |config| config.client_id = ENV["FALCON_CLIENT_ID"] config.client_secret = ENV["FALCON_CLIENT_SECRET"] config.cloud = ENV["FALCON_CLOUD"]end
api = Falcon::AgentInvocation.new
body = Falcon::ApiInvokePublishedAgentExternalRequest.new( credit_cents_limit: integer, deadline_seconds: integer, id: 'string', messages: [{ content: 'string', error: { code: 'string', message: 'string', param: 'string', type: 'string' }, reasoning: 'string', role: 'string', tool: { calls: [], result: {}, tool_id: 'string' }, tool_approval: { external_approval: {}, id: 'string', invocation_id: 'string', parameters: {}, request_message: 'string', requested_at: 'string', responded_at: 'string', responded_by: {}, response_message: 'string', source_agent_id: 'string', source_invocation_id: 'string', status: 'string', tool_call_id: 'string', tool_id: 'string', tool_name: 'string' } }])
response = api.invoke_published_agent_external_v1(body)
puts responseResponses
[ { "ai_trace_id": "string", "compaction": {}, "conversation": [], "id": "string", "status": "string", "tool_approvals": [] }]{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}PatchAgentInvocationV3
Section titled “PatchAgentInvocationV3”Modify an in-flight agent invocation.
Method PATCH
Route /agentic-studio/entities/agent-invocations/v3
Scope Charlotte AI Agent Definition: WRITE
PEP 8
update_agent_invocationParameters
Section titled “Parameters”body body · dictionary
Full body payload as JSON formatted dictionary.
id body · string
The id value.
status body · string
The status value.
Code Examples
from falconpy import AgentInvocation
falcon = AgentInvocation(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.update_agent_invocation(id="string", status="string")print(response)from falconpy import AgentInvocation
falcon = AgentInvocation(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
response = falcon.PatchAgentInvocationV3(id="string", status="string")print(response)from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID, client_secret=CLIENT_SECRET )
body_payload = { "id": "string", "status": "string"}
response = falcon.command("PatchAgentInvocationV3", body=body_payload)print(response)Examples coming soon.
Examples coming soon.
Examples coming soon.
Examples coming soon.
Examples coming soon.
Responses
{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}{ "errors": [ { "code": 0, "id": "string", "message": "string" } ], "meta": { "pagination": { "limit": 0, "offset": 0, "total": 0 }, "powered_by": "string", "query_time": 0.0, "trace_id": "string", "writes": { "resources_affected": 0 } }}