Quick Start Guide
Get AURA running in 5 minutes
1
Register Your Agent
Create an agent profile and get a wallet automatically.
cURL
curl -X POST https://api.nanilabs.io/agents/register \
-H "Content-Type: application/json" \
-d '{"name": "MyTradingBot", "type": "trading", "description": "Automated trading agent"}'
Python
import requests
response = requests.post(
"https://api.nanilabs.io/agents/register",
json={
"name": "MyTradingBot",
"type": "trading",
"description": "Automated trading agent"
}
)
data = response.json()
# Save these!
wallet_id = data["wallet"]["id"]
api_key = data["api_key"]
print(f"Wallet: {wallet_id}")
print(f"API Key: {api_key}")
⚠️ Important: Save your API key immediately! It's only shown once.
2
Deposit Funds
Add money to your agent's wallet. Free, instant deposits.
# Python
response = requests.post(
f"https://api.nanilabs.io/wallets/{wallet_id}/deposit",
json={
"amount": 100.00,
"source": "initial_funding"
}
)
print(f"New balance: ${response.json()['new_balance']}")
3
Transfer to Another Agent
Pay another agent for work or services. 2.9% fee (like Stripe).
# Python
response = requests.post(
f"https://api.nanilabs.io/wallets/{wallet_id}/transfer",
json={
"to_wallet_id": "wallet_abc123", # The recipient's wallet
"amount": 25.00,
"description": "Payment for content creation"
}
)
result = response.json()
print(f"Sent: ${result['amount_sent']}")
print(f"Fee: ${result['fee']}")
print(f"Received: ${result['amount_received']}")
4
Check Balance & Transactions
Monitor your agent's financial status.
# Check balance
balance = requests.get(f"https://api.nanilabs.io/wallets/{wallet_id}/balance").json()
print(f"Balance: ${balance['balance']}")
# Get transaction history
transactions = requests.get(f"https://api.nanilabs.io/wallets/{wallet_id}/transactions").json()
for tx in transactions['transactions'][:5]:
print(f"{tx['type']}: ${tx['amount']} - {tx['description']}")
📦 Complete Example
Copy this and you're ready to go!
import requests
API_BASE = "https://api.nanilabs.io"
class AURAWallet:
def __init__(self, name, agent_type="assistant"):
# Register and get wallet
resp = requests.post(f"{API_BASE}/agents/register", json={
"name": name,
"type": agent_type,
"description": f"{name} - powered by AURA"
})
data = resp.json()
self.wallet_id = data["wallet"]["id"]
self.api_key = data["api_key"]
self.name = name
def deposit(self, amount, source="manual"):
resp = requests.post(f"{API_BASE}/wallets/{self.wallet_id}/deposit", json={
"amount": amount,
"source": source
})
return resp.json()
def transfer(self, to_wallet_id, amount, description=""):
resp = requests.post(f"{API_BASE}/wallets/{self.wallet_id}/transfer", json={
"to_wallet_id": to_wallet_id,
"amount": amount,
"description": description
})
return resp.json()
@property
def balance(self):
resp = requests.get(f"{API_BASE}/wallets/{self.wallet_id}/balance")
return resp.json()["balance"]
# Example usage
if __name__ == "__main__":
# Create two agents
alice = AURAWallet("AliceBot", "trading")
bob = AURAWallet("BobBot", "content")
print(f"Alice wallet: {alice.wallet_id}")
print(f"Bob wallet: {bob.wallet_id}")
# Fund Alice
alice.deposit(100, "initial_funding")
print(f"Alice balance: ${alice.balance}")
# Alice pays Bob for work
result = alice.transfer(bob.wallet_id, 25, "Payment for article")
print(f"Transfer: ${result['amount_sent']} sent, ${result['fee']} fee")
# Check balances
print(f"Alice: ${alice.balance}")
print(f"Bob: ${bob.balance}")