Skip to main content

Overview

The lua logs command provides an interactive interface for viewing and navigating your agent’s execution logs with powerful filtering capabilities.
Looking for the canonical debug loop? See Debugging your agent for the recommended push → test → check flow that uses lua logs as the truth source.

When to run lua logs

There are three moments when lua logs is the most valuable command in the CLI: 1. Immediately after a lua chat -m "test". A chat response can look fine while the server quietly logged a billing failure, a tool exception, or an LLM provider error. Run lua logs --type agent_error --limit 5 after every test message — if the count is zero, the test passed cleanly. The CLI also runs a quiet agent_error probe automatically after each chat turn and prints a one-line warning when new errors fire (set LUA_NO_HINTS=1 to silence it). 2. After a lua push to verify a new version is healthy in production. The CLI prints a ✨ Tip: line at the end of every push pointing at the right lua logs --type X --limit 10 command for what you just deployed — follow it. 3. When investigating a user-reported issue. Filter to the affected user with --user-id <id> and to the most likely component type:

Non-Interactive Mode

--agent-id is useful for inspecting logs across multiple agents you own without switching project directories. If you don’t have admin access to the requested agent, the command returns an access-denied error.
Type values: Use runtime for platform runtime logs (was previously mastra). Use rag for knowledge base search logs, device-trigger for device trigger execution logs, and calls for voice call records.
agent_error vs runtime: Use --type agent_error to find pipeline failures (billing, validation, LLM provider errors) — these often don’t surface in the chat response itself. Use --type runtime for agent runtime / LLM SDK / framework-level diagnostics (low-level model and orchestration logs).

Post-deploy verification recipe

Verify pipeline errors:
lua logs returns nothing immediately after deploy. You must generate traffic (via lua chat, a webhook call, or a job trigger) before execution logs appear.
If agent_error --limit 5 returns no entries timestamped after your deploy, the version is healthy. If it does, read the entries before walking away. See Debugging your agent for the complete flow.

Filter by Type

Filter logs by Skills, Jobs, Webhooks, Preprocessors, or Postprocessors

See All Your Components

View logs for all your components, including dynamically created jobs

Detailed Information

See which component generated each log, including names and IDs

Color-Coded

Easily spot errors, warnings, and different log types

Log Types

Execution errors and failures
  • Tool execution failures
  • API errors
  • Invalid configurations
  • Stack traces for debugging
Color: Red

Interactive Flow

1

Choose What to View

2

Choose What to Filter (if filtering)

3

Select Specific Component (if filtering)

All Jobs Visible: All your jobs appear in the list, including ones created dynamically in your code.
4

View Logs

5

Navigate

Use Cases

Debug Tool Errors

Monitor Performance

Verify Tool Execution

Track Webhook Activity

Monitor Job Execution

Example Session

Filtering by Skill

Log Entry Details

Each log entry shows you:

For Skill Logs

  • Skill Name - Which skill generated the log
  • Skill ID - Unique identifier for the skill
  • Tool Name - Which tool was running (if applicable)
  • Timestamp - When the log was created
  • Log Type - Error, debug, info, warn, start, or complete
  • Message - The actual log message
  • Duration - How long the operation took (for completed operations)

For Job Logs

  • Job Name - Which job generated the log
  • Job ID - Unique identifier for the job
  • Timestamp - When the log was created
  • Log Type - Error, debug, info, warn, start, or complete
  • Message - The actual log message
  • Duration - How long the job took to run

For Webhook, Preprocessor, and Postprocessor Logs

  • Name - Which component generated the log
  • ID - Unique identifier
  • Timestamp - When the log was created
  • Log Type - Error, debug, info, warn, start, or complete
  • Message - The actual log message
  • Duration - How long the operation took
Tool Information: Tool names are only shown for skill logs, since tools belong to skills.
View the next page of logsDisabled if on last page

Best Practices

Troubleshooting

Causes:
  • Skills not deployed yet
  • Agent hasn’t been used
  • Viewing wrong agent
Solution:
Try:
  • Navigate through pages using the navigation menu
  • Filter by the specific component (skill, job, etc.)
  • Check the most recent pages first (page 1)
  • Look at the timestamp to find when the error occurred
Use refresh:
Reloads current page with latest data

Integration with Workflow

During Development

After Deployment

Debugging Issues

Debugging Loop

Canonical push → test → check flow

lua chat

Test agent (generates logs + auto agent_error probe)

lua test

Test tools locally (no remote logs)

lua push

Deploy skills (required for logs)

Next Steps

Test Your Agent

Generate logs to view

Deploy Skills

Push skills to generate logs

Troubleshooting

Common issues and solutions

Production Monitoring

Monitor production environment