The doc Command
The doc (or doctor) command runs safe diagnostics to check your Asta installation.
Basic Usage
- Python version (3.12 or 3.13 required)
- Backend virtual environment
- Backend
.envconfiguration - Workspace
USER.mdfile - API health endpoint
- Enabled skill dependencies
Example Output
Auto-Fix with --fix
The --fix flag attempts to automatically resolve common setup issues.
What Auto-Fix Does
Backend Virtual Environment
Backend Virtual Environment
If the backend
.venv is missing, --fix will:- Find a suitable Python version (3.12 or 3.13)
- Create the virtual environment
- Install all required dependencies from
requirements.txt
Environment Configuration
Environment Configuration
If
backend/.env is missing and .env.example exists, --fix will copy it:Workspace USER.md
Workspace USER.md
If
workspace/USER.md is missing, --fix will create it with the default template:Skill Dependencies
Skill Dependencies
For enabled skills with missing dependencies,
--fix will attempt to install them automatically:Some dependencies require manual installation. The diagnostic output will indicate when manual intervention is needed.
Checking System Status
Thestatus command shows the current state of all Asta services and integrations.
Example Status Output
Status Information Includes
- Backend Status: Whether the backend is running and its process ID
- API Endpoints: URLs for the API and documentation
- Channels: Connected external channels (Telegram, etc.)
- Skills: Enabled skills and their availability
Log Files
Asta writes detailed logs that can help diagnose issues.Log Locations
Backend Log
Location:
backend.log (in repo root)Contains:- Backend startup messages
- API request/response logs
- Skill execution logs
- Error tracebacks
Cloudflare Tunnel Log
Location:
cloudflared.log (in repo root)Contains:- Tunnel connection status
- Public URL assignments
- Network errors
Viewing Logs
View the entire log:Log Rotation
Logs are automatically rotated when they exceed 5MB:- Current log:
backend.log - Previous log:
backend.log.old
Health Check Endpoint
The backend exposes a health check endpoint at/api/health.
Interactive API Documentation
Asta provides interactive API documentation powered by FastAPI. Access at: http://localhost:8010/docsWhat You Can Do
- View all available API endpoints
- See request/response schemas
- Test endpoints directly from the browser
- View authentication requirements
- Inspect model definitions
Common Diagnostic Workflows
Backend won't start
Backend won't start
- Run diagnostics with auto-fix:
- Check the backend log for errors:
- Verify Python version:
- Check if port 8010 is in use:
- Try a clean restart:
Skill not working
Skill not working
- Check skill status:
- Run diagnostics to check dependencies:
- Auto-fix missing dependencies:
- Check backend logs for skill-specific errors:
- Verify skill is enabled in Settings → Skills
Database issues
Database issues
- Check for lock errors in logs:
- Restart to release locks:
- Check database file permissions:
- Check disk space:
- If corrupt, back up and recreate:
Performance issues
Performance issues
- Check system resource usage:
- Check log file size:
- Monitor real-time logs:
- Check for repeated errors:
- Restart with fresh logs:
Getting Help
If diagnostics don’t resolve your issue:- Check the error reference: See Common Errors for specific error messages
- Review the logs: Look for ERROR or EXCEPTION messages in
backend.log - Verify your setup: Run
./asta.sh doc --fixto ensure proper configuration - Check the API docs: Visit
http://localhost:8010/docsto test endpoints - Report the issue: Include relevant log excerpts when seeking help
See Also
- Common Errors - Error messages and solutions
- Installation - Initial setup guide