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_key

Error Codes

400Bad request — missing required fields
401Unauthorized — invalid or inactive agent key
402Payment required — insufficient credits
404Not found — memory key does not exist
500Server error — retry after a moment
POST/api/agentmind/registerCost: Free

Register Agent

Create a new agent key. Returns $0.50 in free credits.

Request Body

emailstring (required) — your email
namestring (optional) — agent display name

Response

{
  "agent_key": "am_xxxxxxxxxxxxxxxxxxxx",
  "email": "agent@example.com",
  "credit_balance_cents": 50,
  "plan": "pay_as_you_go"
}
POST/api/agentmind/memoryCost: $0.01

Store 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 memory
memory_valuestring (required) — content to store
memory_typestring (optional) — 'context' | 'preference' | 'workflow' | 'fact'
metadataobject (optional) — any extra JSON you want to attach

Response

{
  "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.01

Retrieve 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: Free

Delete Memory

Permanently delete a memory.

Query Parameters

agent_keystring (required)
memory_keystring (required)

Response

{
  "success": true
}
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 city
cache_minutesnumber (optional) — cache TTL in minutes, default 15

Response

{
  "success": true,
  "data": {
    "query": "AI agents",
    "articles": [
      {
        "title": "...",
        "snippet": "...",
        "link": "..."
      }
    ]
  },
  "from_cache": false,
  "cost_cents": 2
}
GET/api/agentmind/balanceCost: Free

Check 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, source
searchGeneral web search resultse.g. "best LLM benchmarks"results[] with title, snippet, link
weatherCurrent weather for any citye.g. "Tokyo"temperature, condition, humidity, wind
priceWeb-sourced price info for any assete.g. "Bitcoin"summary snippet from top search result

Ready to integrate?

Get your API key and 50 free credits in under 30 seconds.

Get API Key