Developer Reference
Documentation
API reference for the Agentic Bank protocol. Read endpoints (explorer, status, history, rates) are public; borrowing endpoints (loan request, credit-line draw) require an API key. A2A uses agent signatures.
Getting Started
What is Agentic Bank?
RSoft Agentic Bank is a decentralized lending protocol designed for AI agents. Autonomous agents can request USDC loans that are evaluated through an automated multi-agent pipeline — from identity verification to on-chain settlement.
Base URL
https://rsoft-agentic-bank.comAll endpoints are prefixed with /api/v1 except health checks.
Authentication
All read endpoints listed here are public — no API key or wallet connection required. Responses are JSON format with ISO 8601 timestamps.
How Agents Borrow
An agent can originate debt through four surfaces. REST, MCP and A2A are one-shot loans that share the same underwriting (caps, EIP-712 signature, replay-protected nonce); the credit line is revolving.
POST /api/v1/loan/requestDirect REST
Simplest path. Sign the loan terms and POST them.
Sign the EIP-712 LoanRequest (agentWallet, loanAmountUsdc6, nonce, deadline) and POST it. The bank runs the full 5-agent pipeline and disburses USDC to your wallet.
POST /api/v1/loan/request
X-API-Key: <bank_api_key>
{
"agent_wallet": "0x…",
"loan_amount": 5,
"nonce": "…",
"deadline": 1893456000,
"signature": "0x…" // EIP-712 LoanRequest
}tool: bank.request_loanMCP tool (x402)
For autonomous agents that already use an MCP toolset.
Add the bank's MCP server to your agent's tools. Calls are metered with x402 — your agent pays per request, no separate account needed. Same underwriting as REST.
// agent MCP config
mcpServers:
rsoft-bank:
url: https://<mcp-host>/mcp // x402-gated
// then your agent calls the tool
tool bank.request_loan
args { "agent_wallet": "0x…", "loan_amount": 5, … }bank.negotiateLoan → bank.executeLoanAgent-to-Agent
When your agent talks to the bank agent directly (no API key).
Negotiate terms with bank.negotiateLoan, sign the returned quote, then submit bank.executeLoan. Authenticated by your agent signature, not a shared key.
// 1) negotiate — get signable terms
POST /a2a
{ "method": "bank.negotiateLoan",
"params": { "agent_wallet": "0x…", "amount": 5 } }
// 2) sign the quote, then execute
POST /a2a
{ "method": "bank.executeLoan",
"params": { "signature": "0x…", … } }POST /credit-lines/request → /{id}/drawRevolving credit
For agents with recurring capital needs.
Open an approved credit line once, then draw against it repeatedly during the window instead of requesting a new loan each time. Repay to restore available credit.
// open a line (once)
POST /api/v1/credit-lines/request
{ "agent_id": "0x…", "requested_limit": 50 }
// draw against it (repeat, owner-signed)
POST /api/v1/credit-lines/{line_id}/draw
{ "amount": 5, "signature": "0x…" }API Reference
Public GET endpoints for querying loan data, workflow status, and protocol information.
Loans
/api/v1/loan/status/{request_id}Get Loan Status
Retrieve the current status and details of a specific loan request.
Path Parameters
request_idstringThe unique loan request identifierResponse
{
"request_id": "req_abc123def456",
"status": "disbursed",
"agent_wallet": "0x1234...abcd",
"loan_amount": 1000,
"amount_approved": 1000,
"interest_rate": 0.085,
"term_days": 30,
"tx_hash": "0xabc...def",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:31:45Z"
}/api/v1/loan/workflow/{request_id}Get Workflow Steps
Retrieve the detailed execution status of each agent in the workflow pipeline. Includes timing, results, and errors for every step.
Path Parameters
request_idstringThe unique loan request identifierResponse
{
"request_id": "req_abc123def456",
"loan_status": "disbursed",
"workflow_status": "completed",
"total_duration_ms": 12450,
"current_step": null,
"steps": [
{
"step": "gatekeeper",
"step_order": 1,
"status": "completed",
"started_at": "2025-01-15T10:30:00Z",
"completed_at": "2025-01-15T10:30:02Z",
"duration_ms": 2100,
"result": { ... },
"error": null
}
],
"created_at": "2025-01-15T10:30:00Z",
"completed_at": "2025-01-15T10:31:45Z"
}/api/v1/loan/history/{wallet_address}Get Agent Loan History
Retrieve the loan history for a specific wallet address. Returns all past and current loan requests.
Path Parameters
wallet_addressstringThe agent's wallet addressQuery Parameters
limitintegerMax number of results (default: 10)Response
[
{
"request_id": "req_abc123def456",
"status": "repaid",
"agent_wallet": "0x1234...abcd",
"loan_amount": 1000,
"amount_approved": 1000,
"interest_rate": 0.085,
"term_days": 30,
"current_node": null,
"tx_hash": "0xabc...def",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-20T14:00:00Z"
}
]/api/v1/loan/explorerLoan Explorer
Public paginated endpoint to browse all protocol loans. Supports filtering by status. No authentication required.
Query Parameters
pageintegerPage number (default: 1)limitintegerItems per page (default: 20)statusstringFilter by loan statusResponse
{
"loans": [
{
"request_id": "req_abc123",
"agent_wallet": "0x1234...abcd",
"amount": 1000,
"currency": "USDC",
"status": "disbursed",
"interest_rate": 0.085,
"duration_days": 30,
"disbursement_tx_hash": "0xabc...def",
"created_at": "2025-01-15T10:30:00Z"
}
],
"total": 42,
"page": 1,
"limit": 20,
"total_pages": 3
}/api/v1/loan/active/{wallet_address}Get Active Loans
Retrieve all currently active loans for a wallet address. Includes outstanding balance summary.
Path Parameters
wallet_addressstringThe agent's wallet addressResponse
{
"active_loans": [
{
"request_id": "req_abc123def456",
"amount": 1000,
"interest_rate": 0.085,
"duration_days": 30,
"repayment_amount": 1085,
"status": "disbursed",
"disbursement_tx_hash": "0xabc...def",
"created_at": "2025-01-15T10:30:00Z"
}
],
"active_loans_count": 1,
"total_outstanding": 1085,
"wallet_address": "0x1234...abcd",
"agent_id": "agent-001"
}Agents & Rates
/api/v1/agents/{agent_id}/creditworthinessCheck Creditworthiness
Evaluate an agent's creditworthiness based on loan history and risk profile.
Path Parameters
agent_idstringThe unique agent identifierResponse
{
"agent_id": "agent-001",
"credit_score": 750,
"risk_tier": "low"
}/api/v1/interest-ratesInterest Rates
Retrieve current protocol interest rates. Rates are updated dynamically based on protocol utilization.
Response
{
"base_rate": 0.05,
"risk_tiers": {
"low": { "rate": "..." },
"medium": { "rate": "..." },
"high": { "rate": "..." }
},
"yield_strategies": {
"conservative": { "apy": "..." },
"balanced": { "apy": "..." },
"aggressive": { "apy": "..." },
"dynamic": { "apy": "..." }
},
"updated_at": "2025-01-15T00:00:00Z"
}Health Checks
/healthHealth Check
Returns the overall health status of the API and its dependencies.
Response
{
"status": "healthy"
}/health/readyReadiness Check
Kubernetes-style readiness probe. Returns 200 when the service is ready to accept traffic.
Response
{
"status": "ready"
}/health/liveLiveness Check
Kubernetes-style liveness probe. Returns 200 as long as the service process is running.
Response
{
"status": "alive"
}Status Codes & Loan States
Loan Statuses
HTTP Status Codes
Request succeeded
Invalid parameters or request body
Resource not found (invalid request_id, wallet, etc.)
Internal server error
Error Response Format
All error responses follow a consistent format with a detail field describing the error.
{
"detail": "Loan request not found: req_invalid_id"
}