Deploy agent with code changes
curl --request PATCH \
--url https://api.runflow.ai/api/v1/runtime/agents/{id}/deploy \
--header 'Content-Type: application/json' \
--data '
{
"repo": "my-repo",
"message": "<string>",
"tree": [
{
"path": "caminho/arquivo.txt",
"mode": "100644",
"type": "blob",
"content": "Conteúdo do arquivo"
}
],
"branch": "main",
"authorName": "Danrley Silva",
"authorEmail": "danrley@example.com"
}
'import requests
url = "https://api.runflow.ai/api/v1/runtime/agents/{id}/deploy"
payload = {
"repo": "my-repo",
"message": "<string>",
"tree": [
{
"path": "caminho/arquivo.txt",
"mode": "100644",
"type": "blob",
"content": "Conteúdo do arquivo"
}
],
"branch": "main",
"authorName": "Danrley Silva",
"authorEmail": "danrley@example.com"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
repo: 'my-repo',
message: '<string>',
tree: [
{
path: 'caminho/arquivo.txt',
mode: '100644',
type: 'blob',
content: 'Conteúdo do arquivo'
}
],
branch: 'main',
authorName: 'Danrley Silva',
authorEmail: 'danrley@example.com'
})
};
fetch('https://api.runflow.ai/api/v1/runtime/agents/{id}/deploy', 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.runflow.ai/api/v1/runtime/agents/{id}/deploy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'repo' => 'my-repo',
'message' => '<string>',
'tree' => [
[
'path' => 'caminho/arquivo.txt',
'mode' => '100644',
'type' => 'blob',
'content' => 'Conteúdo do arquivo'
]
],
'branch' => 'main',
'authorName' => 'Danrley Silva',
'authorEmail' => 'danrley@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.runflow.ai/api/v1/runtime/agents/{id}/deploy"
payload := strings.NewReader("{\n \"repo\": \"my-repo\",\n \"message\": \"<string>\",\n \"tree\": [\n {\n \"path\": \"caminho/arquivo.txt\",\n \"mode\": \"100644\",\n \"type\": \"blob\",\n \"content\": \"Conteúdo do arquivo\"\n }\n ],\n \"branch\": \"main\",\n \"authorName\": \"Danrley Silva\",\n \"authorEmail\": \"danrley@example.com\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.runflow.ai/api/v1/runtime/agents/{id}/deploy")
.header("Content-Type", "application/json")
.body("{\n \"repo\": \"my-repo\",\n \"message\": \"<string>\",\n \"tree\": [\n {\n \"path\": \"caminho/arquivo.txt\",\n \"mode\": \"100644\",\n \"type\": \"blob\",\n \"content\": \"Conteúdo do arquivo\"\n }\n ],\n \"branch\": \"main\",\n \"authorName\": \"Danrley Silva\",\n \"authorEmail\": \"danrley@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runflow.ai/api/v1/runtime/agents/{id}/deploy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"repo\": \"my-repo\",\n \"message\": \"<string>\",\n \"tree\": [\n {\n \"path\": \"caminho/arquivo.txt\",\n \"mode\": \"100644\",\n \"type\": \"blob\",\n \"content\": \"Conteúdo do arquivo\"\n }\n ],\n \"branch\": \"main\",\n \"authorName\": \"Danrley Silva\",\n \"authorEmail\": \"danrley@example.com\"\n}"
response = http.request(request)
puts response.read_bodyRuntime API - Agents Management
Deploy agent with code changes
Deploys agent with local code changes from CLI.
PATCH
/
api
/
v1
/
runtime
/
agents
/
{id}
/
deploy
Deploy agent with code changes
curl --request PATCH \
--url https://api.runflow.ai/api/v1/runtime/agents/{id}/deploy \
--header 'Content-Type: application/json' \
--data '
{
"repo": "my-repo",
"message": "<string>",
"tree": [
{
"path": "caminho/arquivo.txt",
"mode": "100644",
"type": "blob",
"content": "Conteúdo do arquivo"
}
],
"branch": "main",
"authorName": "Danrley Silva",
"authorEmail": "danrley@example.com"
}
'import requests
url = "https://api.runflow.ai/api/v1/runtime/agents/{id}/deploy"
payload = {
"repo": "my-repo",
"message": "<string>",
"tree": [
{
"path": "caminho/arquivo.txt",
"mode": "100644",
"type": "blob",
"content": "Conteúdo do arquivo"
}
],
"branch": "main",
"authorName": "Danrley Silva",
"authorEmail": "danrley@example.com"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
repo: 'my-repo',
message: '<string>',
tree: [
{
path: 'caminho/arquivo.txt',
mode: '100644',
type: 'blob',
content: 'Conteúdo do arquivo'
}
],
branch: 'main',
authorName: 'Danrley Silva',
authorEmail: 'danrley@example.com'
})
};
fetch('https://api.runflow.ai/api/v1/runtime/agents/{id}/deploy', 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.runflow.ai/api/v1/runtime/agents/{id}/deploy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'repo' => 'my-repo',
'message' => '<string>',
'tree' => [
[
'path' => 'caminho/arquivo.txt',
'mode' => '100644',
'type' => 'blob',
'content' => 'Conteúdo do arquivo'
]
],
'branch' => 'main',
'authorName' => 'Danrley Silva',
'authorEmail' => 'danrley@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.runflow.ai/api/v1/runtime/agents/{id}/deploy"
payload := strings.NewReader("{\n \"repo\": \"my-repo\",\n \"message\": \"<string>\",\n \"tree\": [\n {\n \"path\": \"caminho/arquivo.txt\",\n \"mode\": \"100644\",\n \"type\": \"blob\",\n \"content\": \"Conteúdo do arquivo\"\n }\n ],\n \"branch\": \"main\",\n \"authorName\": \"Danrley Silva\",\n \"authorEmail\": \"danrley@example.com\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.runflow.ai/api/v1/runtime/agents/{id}/deploy")
.header("Content-Type", "application/json")
.body("{\n \"repo\": \"my-repo\",\n \"message\": \"<string>\",\n \"tree\": [\n {\n \"path\": \"caminho/arquivo.txt\",\n \"mode\": \"100644\",\n \"type\": \"blob\",\n \"content\": \"Conteúdo do arquivo\"\n }\n ],\n \"branch\": \"main\",\n \"authorName\": \"Danrley Silva\",\n \"authorEmail\": \"danrley@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runflow.ai/api/v1/runtime/agents/{id}/deploy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"repo\": \"my-repo\",\n \"message\": \"<string>\",\n \"tree\": [\n {\n \"path\": \"caminho/arquivo.txt\",\n \"mode\": \"100644\",\n \"type\": \"blob\",\n \"content\": \"Conteúdo do arquivo\"\n }\n ],\n \"branch\": \"main\",\n \"authorName\": \"Danrley Silva\",\n \"authorEmail\": \"danrley@example.com\"\n}"
response = http.request(request)
puts response.read_bodyPath Parameters
Agent UUID
Body
application/json
The name of the repository
Example:
"my-repo"
The message of the commit
The tree of the commit
Show child attributes
Show child attributes
Example:
[
{
"path": "caminho/arquivo.txt",
"mode": "100644",
"type": "blob",
"content": "Conteúdo do arquivo"
}
]The branch of the commit
Example:
"main"
Git commit author name (from local git config)
Example:
"Danrley Silva"
Git commit author email (from local git config)
Example:
"danrley@example.com"
Target environment for deploy. If not provided, defaults to production (backward compat with old CLI).
Available options:
staging, production Response
200
Agent deployed successfully.
⌘I