AI Agent Documentation

These comprehensive guides help AI coding assistants (like Claude, ChatGPT, or Cursor) understand how to integrate with StackForDevs services. Each document includes:

  • Complete API reference with request/response examples
  • Authentication patterns and security best practices
  • Error codes and handling strategies
  • Common use cases and integration patterns
  • Copy-paste ready code examples

How to Use

  1. Copy or download the documentation you need
  2. Add it to your project (recommended: create a .claude/ or docs/ folder)
  3. Reference it when asking your AI assistant to implement StackForDevs integrations
  4. The AI will use these docs to generate correct, secure code with proper error handling

StackForDevs Platform (Master)

Complete platform overview with all services, authentication patterns, and integration examples. Start here for a high-level understanding.

s4d-AGENTS.md

Auth Service

User authentication, project management, API keys, OAuth providers, and multi-tenant isolation.

s4d-auth-service-AGENTS.md

LLM Service

AI completions via OpenAI/Anthropic, complexity-based model selection, batch processing, and cost optimization.

s4d-llm-service-AGENTS.md

Mailer Service

Transactional emails, template management, multi-provider support (SendGrid, Mailgun, Resend), and delivery tracking.

s4d-mailer-service-AGENTS.md

Billing Service

Stripe integration, subscriptions, usage tracking, plan enforcement, and webhook handling.

s4d-billing-service-AGENTS.md

CMS Service

Content management, custom content types, external news aggregation (NewsAPI, GNews), and structured data storage.

s4d-cms-service-AGENTS.md

Notification Service

In-app notifications, real-time updates, read/unread tracking, and batch operations.

s4d-notification-service-AGENTS.md

Best Practices

  • Start with the Master doc (s4d-AGENTS.md) for platform-wide patterns and authentication
  • Use service-specific docs when implementing features for individual services
  • Keep docs updated by checking this page when new features are released
  • Include in version control so your team's AI assistants stay in sync
  • Reference explicitly in your prompts: "Use the s4d-llm-service-AGENTS.md guide to implement LLM completions"

Security Reminder

These documentation files are safe to commit to your repository. They contain API patterns and examples, but NOT your actual API keys or credentials. Your AI assistant should use these docs along with your environment variables to generate secure integrations.