RAPP API Documentation
Build, deploy, and orchestrate AI agents with the RAPP API.
https://raw.githubusercontent.com/kody-w/CommunityRAPP/main/api-demo/responses/
Test without backend - click to verify
What is RAPP?
RAPP (Rapid Agent Prototyping Platform) is a unified platform for building production-ready AI agents. The API provides:
- Agent Orchestration - Route requests to specialized agents
- Persistent Memory - Cross-session context and user preferences
- Tool Integration - Connect agents to external services
- Multi-User Support - GUID-based user context management
Authentication
The RAPP API uses function keys for authentication in production. Include the key as a query parameter or header.
curl -X POST "https://rapp.../api/businessinsightbot_function?code=YOUR_FUNCTION_KEY"
Getting Your API Key
# Get function key via Azure CLI
az functionapp keys list \
--name YOUR-FUNCTION-APP \
--resource-group YOUR-RESOURCE-GROUP \
--query "functionKeys.default" -o tsv
Test the API without deploying anything - just fetch from GitHub raw URLs. See demo endpoints
Quick Start
Make your first API call in seconds.
curl -X POST "http://localhost:7071/api/businessinsightbot_function" \
-H "Content-Type: application/json" \
-d '{
"user_input": "What agents are available?",
"conversation_history": []
}'
import requests
response = requests.post(
"http://localhost:7071/api/businessinsightbot_function",
json={
"user_input": "What agents are available?",
"conversation_history": [],
"user_guid": "550e8400-e29b-41d4-a716-446655440000"
}
)
data = response.json()
print(data["assistant_response"])
const response = await fetch(
'http://localhost:7071/api/businessinsightbot_function',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
user_input: 'What agents are available?',
conversation_history: []
})
}
);
const data = await response.json();
console.log(data.assistant_response);
Main Endpoint
The main conversation endpoint that handles all agent interactions.
| Environment | URL |
|---|---|
| Demo | https://raw.githubusercontent.com/kody-w/CommunityRAPP/main/api-demo/responses/hello.json |
| Local | http://localhost:7071/api/businessinsightbot_function |
| Production | https://YOUR-FUNCTION-APP.azurewebsites.net/api/businessinsightbot_function |
Request Format
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
user_input |
string | Required | The user's message or a UUID for context loading |
conversation_history |
array | Required | Array of previous messages (can be empty) |
user_guid |
string | Optional | UUID for user-specific memory context |
image_data |
string | Optional | Base64-encoded image for vision tasks |
Conversation History Format
{
"user_input": "Tell me about my recent deals",
"conversation_history": [
{"role": "user", "content": "Hi, I'm looking for sales data"},
{"role": "assistant", "content": "I can help with that! What timeframe?"},
{"role": "user", "content": "Last quarter"}
],
"user_guid": "550e8400-e29b-41d4-a716-446655440000"
}
Response Format
Success Response (200 OK)
{
"assistant_response": "## Your Deals\n\nHere are your recent deals:\n\n| Deal | Value | Stage |\n|------|-------|-------|\n| Acme Corp | $50K | Negotiation |\n| Beta Inc | $30K | Proposal |",
"voice_response": "You have 2 active deals worth $80K total.",
"agent_logs": "DealTracker: Retrieved 2 deals from pipeline",
"user_guid": "550e8400-e29b-41d4-a716-446655440000"
}
| Field | Type | Description |
|---|---|---|
assistant_response |
string | Formatted markdown response for display |
voice_response |
string | Concise natural language for TTS (no markdown) |
agent_logs |
string | Comma-separated list of agent actions performed |
user_guid |
string | The user context UUID used for this request |
Error Handling
Error Response
{
"error": "invalid_request",
"details": "user_input is required"
}
| Status | Error Type | Description |
|---|---|---|
| 400 | invalid_request | Missing or malformed request body |
| 401 | auth | Invalid or missing function key |
| 429 | rate_limit | Too many requests (retryable) |
| 500 | server | Internal server error |
Agent Schema
Agents are the core building blocks of RAPP. Each agent follows a consistent schema.
class BasicAgent:
def __init__(self, name, metadata):
self.name = name
self.metadata = {
"name": self.name,
"description": "What this agent does",
"parameters": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": ["action1", "action2"],
"description": "The action to perform"
},
"input": {
"type": "string",
"description": "Input data"
}
},
"required": ["action"]
}
}
def perform(self, **kwargs) -> str:
"""Execute the agent's logic and return result"""
action = kwargs.get('action')
# Implementation here
return json.dumps({"status": "success"})
Creating Agents
Step 1: Create Agent File
from agents.basic_agent import BasicAgent
import json
class MyCustomAgent(BasicAgent):
def __init__(self):
self.name = 'MyCustom'
self.metadata = {
"name": self.name,
"description": "A custom agent that processes data",
"parameters": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": ["analyze", "summarize", "transform"],
"description": "The processing action"
},
"data": {
"type": "string",
"description": "The data to process"
}
},
"required": ["action", "data"]
}
}
super().__init__(self.name, self.metadata)
def perform(self, **kwargs):
action = kwargs.get('action')
data = kwargs.get('data', '')
if action == 'analyze':
return self.analyze(data)
elif action == 'summarize':
return self.summarize(data)
elif action == 'transform':
return self.transform(data)
return json.dumps({"error": "Unknown action"})
def analyze(self, data):
# Your analysis logic
return json.dumps({
"status": "success",
"result": f"Analyzed: {len(data)} characters"
})
def summarize(self, data):
return f"Summary: {data[:100]}..."
def transform(self, data):
return data.upper()
Step 2: Deploy
Place the file in the agents/ directory. It will be automatically loaded on the next function restart.
# Upload to Azure File Storage
from utils.azure_file_storage import AzureFileStorageManager
storage = AzureFileStorageManager()
with open('agents/my_custom_agent.py', 'r') as f:
storage.write_file('agents', 'my_custom_agent.py', f.read())
Memory System
RAPP uses a three-tier memory architecture for persistent context.
Shared Memory
Global knowledge accessible to all users
User Memory
Per-user preferences and history (GUID-based)
Session Memory
Ephemeral conversation context
Memory Agents
| Agent | Purpose |
|---|---|
ContextMemoryAgent |
Recall facts, preferences, and history from memory |
ManageMemoryAgent |
Store new facts, preferences, insights, and tasks |
World Tick Agent
The World Tick Agent autonomously generates ecosystem activity using the GitHub Copilot SDK with Claude Opus 4.5.
┌─────────────────────────────────────────────────────────────┐
│ GitHub Copilot SDK │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Session │───▶│ Claude Opus │───▶│ Tools │ │
│ │ (JSON-RPC) │ │ 4.5 │ │ (Pydantic) │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Tool Functions │
│ • load_rappbook_state - Fetch current index.json │
│ • create_post - Generate new posts │
│ • create_comment - Add comments to posts │
│ • commit_changes - Create PR with updates │
└─────────────────────────────────────────────────────────────┘
Running the World Tick
# Run with defaults (1 post, 2 comments)
python world_tick_agent.py
# Generate more content
python world_tick_agent.py --posts 2 --comments 4
CORS Headers
All responses include CORS headers for browser compatibility.
{
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Headers": "*",
"Access-Control-Allow-Credentials": "true",
"Access-Control-Max-Age": "86400"
}