{"openapi":"3.0.3","info":{"title":"AgentMind API","description":"Persistent memory and real-time live data for AI agents. Agents can store context across sessions, recall it instantly, and fetch fresh news, weather, and search results on demand — without burning context window tokens.","version":"1.0.0","contact":{"url":"https://www.agentmind.agency/docs"}},"servers":[{"url":"https://www.agentmind.agency","description":"Production"}],"paths":{"/api/agentmind/register":{"post":{"operationId":"registerAgent","summary":"Register a new agent and receive an API key with $0.50 free credits","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"}}}}}},"responses":{"200":{"description":"Agent registered","content":{"application/json":{"schema":{"type":"object","properties":{"agent_key":{"type":"string","example":"am_abc123..."},"credit_balance_cents":{"type":"integer","example":50}}}}}}}}},"/api/agentmind/memory":{"post":{"operationId":"storeMemory","summary":"Store or update a persistent memory for your agent (1 credit)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["agent_key","memory_key","memory_value"],"properties":{"agent_key":{"type":"string"},"memory_key":{"type":"string","description":"Unique key for this memory"},"memory_value":{"type":"string","description":"Content to store"},"memory_type":{"type":"string","enum":["context","preference","workflow","fact"],"default":"context"},"metadata":{"type":"object"}}}}}},"responses":{"200":{"description":"Memory stored","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"memory":{"type":"object"},"tokens_saved":{"type":"integer"},"cost_cents":{"type":"integer","example":1}}}}}}}},"get":{"operationId":"retrieveMemory","summary":"Retrieve a memory by key (1 credit)","parameters":[{"name":"agent_key","in":"query","required":true,"schema":{"type":"string"}},{"name":"memory_key","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Memory retrieved"},"404":{"description":"Memory not found"}}},"delete":{"operationId":"deleteMemory","summary":"Delete a memory (free)","parameters":[{"name":"agent_key","in":"query","required":true,"schema":{"type":"string"}},{"name":"memory_key","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted"}}}},"/api/agentmind/memory/search":{"get":{"operationId":"searchMemories","summary":"List all memories for an agent, with optional type filter (1 credit)","parameters":[{"name":"agent_key","in":"query","required":true,"schema":{"type":"string"}},{"name":"memory_type","in":"query","required":false,"schema":{"type":"string","enum":["context","preference","workflow","fact"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"List of memories"}}}},"/api/agentmind/data":{"post":{"operationId":"fetchLiveData","summary":"Fetch real-time data: news, web search, weather, or prices (2 credits, cached free)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["agent_key","query_type","query"],"properties":{"agent_key":{"type":"string"},"query_type":{"type":"string","enum":["news","search","weather","price"],"description":"news=latest articles, search=web results, weather=current conditions for a city, price=asset price lookup"},"query":{"type":"string","description":"Search term, topic, city name, or asset name"},"cache_minutes":{"type":"integer","default":15,"description":"How long to cache the result (cached responses are free)"}}}}}},"responses":{"200":{"description":"Live data response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object"},"from_cache":{"type":"boolean"},"cost_cents":{"type":"integer"}}}}}}}}},"/api/agentmind/balance":{"get":{"operationId":"getBalance","summary":"Check credit balance and usage statistics (free)","parameters":[{"name":"agent_key","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Balance and stats"}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}}}}}}