# SelfGrowth Agent Guide SelfGrowth contains a large public personal development corpus organized around topics, articles, experts, guides, videos, newsletters, events, and resources. Use normal public pages when you only need web browsing. Use the authenticated AI API when you are an approved agent or partner that needs structured, cited, read-only source packets. ## Public Corpus - Home: https://www.selfgrowth.com/ - Topics: https://www.selfgrowth.com/topics - Articles: https://www.selfgrowth.com/articles - Experts: https://www.selfgrowth.com/experts - Guides: https://www.selfgrowth.com/guides - Videos: https://www.selfgrowth.com/videos - Newsletters: https://www.selfgrowth.com/newsletters - Events: https://www.selfgrowth.com/events - Resources: https://www.selfgrowth.com/resources - Sitemap: https://www.selfgrowth.com/sitemap.xml ## Authenticated AI API Authentication: send `Authorization: Bearer ` or `x-selfgrowth-api-key: `. Guardrails: - Read-only only. - API keys are hashed at rest. - Keys have scopes and per-minute/per-day limits. - Audit events record route/tool/status/latency but not raw API keys. - Raw legacy payloads, private admin data, and secrets are excluded. ## /api/ai/v1/search Search SelfGrowth articles, topics, experts, and sanitized legacy records. Method: POST Required scope: sg:search Example body: ```json { "query": "goal setting", "limit": 5 } ``` ## /api/ai/v1/ask Return a cited answer card, source packet, and safety framing for a SelfGrowth question. Method: POST Required scope: sg:ask Example body: ```json { "question": "How do I set better goals?", "limit": 5 } ``` ## /api/ai/v1/content-context Fetch a source-grounded context packet for one content item, topic, expert, or legacy record. Method: POST Required scope: sg:context Example body: ```json { "idOrSlug": "goal-setting", "kind": "topic" } ``` ## /api/ai/v1/topic-brief Build a topic-centered brief with related content and likely experts. Method: POST Required scope: sg:topic Example body: ```json { "query": "stress management", "limit": 8 } ``` ## /api/ai/v1/authority-brief Gather the strongest visible authority assets for a SelfGrowth subject area. Method: POST Required scope: sg:authority Example body: ```json { "query": "relationships", "limit": 5 } ``` ## /api/ai/v1/contributor-context Summarize a visible expert or contributor and their associated content. Method: POST Required scope: sg:contributor Example body: ```json { "query": "Mark-John Clifford", "limit": 5 } ``` ## /api/ai/v1/answer Return a grounded answer card and source bundle for a natural-language SelfGrowth question. Method: POST Required scope: sg:answer Example body: ```json { "question": "How do I set better goals?", "limit": 5 } ``` ## MCP and CLI Approved partner agents should run MCP/CLI with `SELFGROWTH_AI_API_KEY` so the tools call the same policy-protected API surface and share authorization, scopes, rate limits, and audit logging. CLI examples: - `SELFGROWTH_AI_API_KEY=... pnpm --filter @selfgrowth/jobs selfgrowth:intel --api search '{"query":"goal setting","limit":3}'` - `SELFGROWTH_AI_API_KEY=... pnpm --filter @selfgrowth/jobs selfgrowth:intel --api answer '{"question":"How do I set better goals?","limit":5}'` MCP stdio command: - `SELFGROWTH_AI_API_KEY=... pnpm --silent --filter @selfgrowth/jobs selfgrowth:intel:mcp --api` CLI/MCP default to the protected API. Local Supabase-backed development requires `--trusted-local` (or `SELFGROWTH_INTEL_MODE=trusted-local`) and may expose admin-only tools.