Get Agent
curl --request GET \
--url https://api.magebank.ai/agentsWith/{id} \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.magebank.ai/agentsWith/{id}"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.magebank.ai/agentsWith/{id}', 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.magebank.ai/agentsWith/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-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"
"net/http"
"io"
)
func main() {
url := "https://api.magebank.ai/agentsWith/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.magebank.ai/agentsWith/{id}")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.magebank.ai/agentsWith/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"id": "agent_k77NTwxp2Ym3JCmVsKtXQA",
"name": "Payment Assistant",
"description": "Handles payment processing for customer support",
"status": "active",
"walletAddress": {
"addressId": "0x9d20dE668c8F9fb431cf6D6BBA48ee60Fe8E2BAB",
"networkId": "base-sepolia"
},
"balance": "100",
"currency": "USDC",
"paymentRules": {
"dailyLimit": 1000,
"transactionLimit": 100,
"requireApprovalAboveAmount": 50
},
"tags": ["customer-support", "payments"],
"created": "2025-04-15T11:00:08Z"
}
{
"error": "Agent not found"
}
{
"error": "Internal server error"
}
Agents
Get Agent
Fetch details of a specific agent
GET
/
agentsWith
/
{id}
Get Agent
curl --request GET \
--url https://api.magebank.ai/agentsWith/{id} \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.magebank.ai/agentsWith/{id}"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.magebank.ai/agentsWith/{id}', 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.magebank.ai/agentsWith/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-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"
"net/http"
"io"
)
func main() {
url := "https://api.magebank.ai/agentsWith/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.magebank.ai/agentsWith/{id}")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.magebank.ai/agentsWith/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"id": "agent_k77NTwxp2Ym3JCmVsKtXQA",
"name": "Payment Assistant",
"description": "Handles payment processing for customer support",
"status": "active",
"walletAddress": {
"addressId": "0x9d20dE668c8F9fb431cf6D6BBA48ee60Fe8E2BAB",
"networkId": "base-sepolia"
},
"balance": "100",
"currency": "USDC",
"paymentRules": {
"dailyLimit": 1000,
"transactionLimit": 100,
"requireApprovalAboveAmount": 50
},
"tags": ["customer-support", "payments"],
"created": "2025-04-15T11:00:08Z"
}
{
"error": "Agent not found"
}
{
"error": "Internal server error"
}
Quick Lookup: Retrieve comprehensive details about an agent using its unique ID.
Path Parameters
string
required
Agent ID (can be a short ID like agent_xxx)
Request Headers
string
required
Your API key for authentication
Response
string
Unique agent identifier
string
Name of the agent
string
Purpose and functionality of the agent
string
Current status of the agent (active, inactive, paused)
string
Current balance of the agent
string
Currency type used
object
array
Categories or labels assigned to the agent
string
Timestamp when the agent was created
{
"id": "agent_k77NTwxp2Ym3JCmVsKtXQA",
"name": "Payment Assistant",
"description": "Handles payment processing for customer support",
"status": "active",
"walletAddress": {
"addressId": "0x9d20dE668c8F9fb431cf6D6BBA48ee60Fe8E2BAB",
"networkId": "base-sepolia"
},
"balance": "100",
"currency": "USDC",
"paymentRules": {
"dailyLimit": 1000,
"transactionLimit": 100,
"requireApprovalAboveAmount": 50
},
"tags": ["customer-support", "payments"],
"created": "2025-04-15T11:00:08Z"
}
{
"error": "Agent not found"
}
{
"error": "Internal server error"
}
Status Codes
| Status Code | Description |
|---|---|
| 200 | Agent details successfully retrieved |
| 404 | Not Found - Agent ID doesn’t exist |
| 500 | Internal Server Error |
Balance Format: Balance is returned as a string to preserve precision for financial calculations.