API Reference
Two services, one API. Persistent memory + live data for AI agents.
Authentication
All endpoints require an agent_key parameter. Get yours from the dashboard.
# Pass your agent key in the request body (POST) or query string (GET/DELETE)
{ "agent_key": "am_xxxxxxxxxxxxxxxxxxxx" }
# Or as a query parameter
GET /api/agentmind/memory?agent_key=am_xxxx&memory_key=my_keyError Codes
400Bad request — missing required fields401Unauthorized — invalid or inactive agent key402Payment required — insufficient credits404Not found — memory key does not exist500Server error — retry after a momentPOST
/api/agentmind/registerCost: FreeRegister Agent
Create a new agent key. Returns $0.50 in free credits.
Request Body
emailstring (required) — your emailnamestring (optional) — agent display nameResponse
{
"agent_key": "am_xxxxxxxxxxxxxxxxxxxx",
"email": "agent@example.com",
"credit_balance_cents": 50,
"plan": "pay_as_you_go"
}POST
/api/agentmind/memoryCost: $0.01Store Memory
Store or update a key-value memory for your agent. Overwrites if key already exists.
Request Body
agent_keystring (required)memory_keystring (required) — unique identifier for this memorymemory_valuestring (required) — content to storememory_typestring (optional) — 'context' | 'preference' | 'workflow' | 'fact'metadataobject (optional) — any extra JSON you want to attachResponse
{
"success": true,
"memory": {
"id": 1,
"memory_key": "user_prefs",
"memory_value": "dark mode",
"memory_type": "preference"
},
"tokens_saved": 12,
"cost_cents": 1
}GET
/api/agentmind/memoryCost: $0.01Retrieve Memory
Get a single memory by key. Updates access timestamp and count.
Query Parameters
agent_keystring (required)memory_keystring (required)Response
{
"success": true,
"memory": {
"id": 1,
"memory_key": "user_prefs",
"memory_value": "dark mode",
"access_count": 7
}
}DELETE
/api/agentmind/memoryCost: FreeDelete Memory
Permanently delete a memory.
Query Parameters
agent_keystring (required)memory_keystring (required)Response
{
"success": true
}GET
/api/agentmind/memory/searchCost: $0.01Search Memories
List all memories for an agent, optionally filtered by type.
Query Parameters
agent_keystring (required)memory_typestring (optional) — filter by typelimitnumber (optional) — max 50, default 50Response
{
"success": true,
"memories": [
{
"memory_key": "ctx_1",
"memory_value": "...",
"memory_type": "context"
}
],
"count": 1
}POST
/api/agentmind/dataCost: $0.02 (cached: free)Fetch Live Data
Get real-time data from the web. Results are cached for 15 minutes by default — cached queries are free.
Request Body
agent_keystring (required)query_type'news' | 'search' | 'weather' | 'price'querystring (required) — your search term or citycache_minutesnumber (optional) — cache TTL in minutes, default 15Response
{
"success": true,
"data": {
"query": "AI agents",
"articles": [
{
"title": "...",
"snippet": "...",
"link": "..."
}
]
},
"from_cache": false,
"cost_cents": 2
}GET
/api/agentmind/balanceCost: FreeCheck Balance
Get credit balance, usage stats, and recent activity.
Query Parameters
agent_keystring (required)Response
{
"success": true,
"balance": {
"credit_balance_cents": 450,
"total_memory_calls": 120,
"total_data_calls": 30
},
"recent_usage": []
}Live Data Query Types
newsLatest news articles on any topice.g. "AI agents 2026"articles[] with title, snippet, link, sourcesearchGeneral web search resultse.g. "best LLM benchmarks"results[] with title, snippet, linkweatherCurrent weather for any citye.g. "Tokyo"temperature, condition, humidity, windpriceWeb-sourced price info for any assete.g. "Bitcoin"summary snippet from top search result