{"slug": "how-to-make-a-better-api-for-claude-codex", "title": "How to make a better API for claude/codex?", "summary": "A developer built an API for sales research that finds LinkedIn profiles with a 75% success rate and returns decision-maker information, but is struggling with AI agents like Claude losing context of the API key, endpoints, and documentation mid-conversation. The developer hypothesizes that poor documentation structure or schema may be causing the issue, and is seeking solutions for agent-friendly API design.", "body_md": "So I built a few API calls for sales research purposes, mainly to help people gather better information about their prospects and leads.\n\nThe API can currently find LinkedIn profiles with around a 75% success rate, and it can also return decision-makers together with their LinkedIn profiles.\n\nWhere I’m struggling now is making the API more useful and reliable for AI agents. It’s not bad at the moment, but I’ve received feedback that Claude often “loses memory” of the API key, available endpoints, or what the API is supposed to do, even when the API key and documentation were provided in the conversation.\n\nMy current hypothesis is that this may be strongly connected to a poor documentation structure or schema. Maybe the docs are not clear enough for an agent to understand when and how to use each endpoint consistently.\n\nHas anyone had a similar experience with Claude or other AI agents losing context, even when the API key and documentation were already shared?\n\nI’d be very curious to learn how you solved it — especially around documentation structure, OpenAPI schemas, endpoint naming, examples, or agent-friendly API design.", "url": "https://wpnews.pro/news/how-to-make-a-better-api-for-claude-codex", "canonical_source": "https://dev.to/paul_callprep_8f897a6fca6/how-to-make-a-better-api-for-claudecodex-46fm", "published_at": "2026-06-12 17:19:01+00:00", "updated_at": "2026-06-12 17:41:23.042048+00:00", "lang": "en", "topics": ["ai-agents", "large-language-models", "artificial-intelligence", "ai-tools", "ai-products"], "entities": ["Claude", "LinkedIn"], "alternates": {"html": "https://wpnews.pro/news/how-to-make-a-better-api-for-claude-codex", "markdown": "https://wpnews.pro/news/how-to-make-a-better-api-for-claude-codex.md", "text": "https://wpnews.pro/news/how-to-make-a-better-api-for-claude-codex.txt", "jsonld": "https://wpnews.pro/news/how-to-make-a-better-api-for-claude-codex.jsonld"}}