Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agentbot.raveculture.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Init-deep

Generate scoped AGENTS.md files for key directories in the project. Each generated file describes the directory’s purpose, key files, exports, conventions, and subdirectory links, giving AI agents focused context for the code they are working with.

Generate context files

POST /api/init-deep
Traverse the project directory tree and generate AGENTS.md files for directories that need them.
This endpoint requires an authenticated admin session. The caller’s email must appear in the server’s ADMIN_EMAILS allowlist; ordinary authenticated users receive 403 Forbidden.
Init-deep walks the project tree and writes AGENTS.md files into arbitrary subdirectories. Admin-only access is enforced to prevent ordinary users from triggering filesystem writes.

Request body

All fields are optional. An empty body or omitted Content-Type header is accepted.
FieldTypeRequiredDefaultDescription
pathstringNoProject rootRoot path to start generation from
forcebooleanNofalseOverwrite existing AGENTS.md files
dryRunbooleanNofalsePreview results without writing any files
maxDepthnumberNo5Maximum directory depth to traverse
curl -X POST https://agentbot.sh/api/init-deep \
  -H "Content-Type: application/json" \
  -d '{
    "force": false,
    "dryRun": true,
    "maxDepth": 3
  }'

Response

{
  "success": true,
  "summary": {
    "total": 15,
    "generated": 12,
    "skipped": 2,
    "errors": 1
  },
  "results": [
    {
      "path": "web/app/api",
      "generated": true,
      "skipped": false
    },
    {
      "path": "web/app/lib",
      "generated": false,
      "skipped": true,
      "error": "Already exists (use force: true to overwrite)"
    }
  ]
}
FieldTypeDescription
successbooleanWhether the operation completed without a fatal error
summary.totalnumberTotal directories evaluated
summary.generatednumberNumber of AGENTS.md files written
summary.skippednumberNumber of directories skipped (file already exists)
summary.errorsnumberNumber of directories where generation failed
resultsarrayPer-directory results
results[].pathstringRelative directory path
results[].generatedbooleanWhether an AGENTS.md was written
results[].skippedbooleanWhether the directory was skipped
results[].errorstringError message if generation failed or was skipped

Errors

CodeDescription
401Unauthorized — no valid session
403Forbidden — session is valid but the caller is not in the admin allowlist
500Failed to generate AGENTS.md files — an unexpected error prevented the operation. The detail field contains the error message.

Check generation status

GET /api/init-deep
Check which priority directories already have an AGENTS.md file.
This endpoint requires an authenticated admin session. The caller’s email must appear in the server’s ADMIN_EMAILS allowlist; ordinary authenticated users receive 403 Forbidden.

Query parameters

ParameterTypeRequiredDefaultDescription
pathstringNoProject rootRoot path to check

Priority directories

The endpoint checks these directories by default:
  • web/app/api
  • web/app/lib
  • web/components
  • agentbot-backend/src
  • skills

Response

{
  "rootPath": "/project",
  "status": [
    {
      "directory": "web/app/api",
      "hasAgentsMd": true,
      "path": "/project/web/app/api"
    },
    {
      "directory": "web/app/lib",
      "hasAgentsMd": false,
      "path": "/project/web/app/lib"
    }
  ],
  "allGenerated": false
}
FieldTypeDescription
rootPathstringResolved root path used for the check
statusarrayStatus of each priority directory
status[].directorystringRelative directory name
status[].hasAgentsMdbooleanWhether an AGENTS.md file exists
status[].pathstringAbsolute path to the directory
allGeneratedbooleantrue when every priority directory has an AGENTS.md

Errors

CodeDescription
401Unauthorized — no valid session
403Forbidden — session is valid but the caller is not in the admin allowlist
500Failed to check status — an unexpected error occurred