beam-debug-issue-tasks
Beam Debug Issue Tasks
Debug failed Beam.ai tasks using Langfuse traces.
When to Use
- Diagnose why a task failed, stopped, or needs input
- Find root cause from Langfuse trace reasoning
- Generate debug reports for documentation or handoff
Prerequisites
.env file at project root:
# Beam.ai - BID instance
BEAM_API_KEY=your_bid_api_key
BEAM_WORKSPACE_ID=your_bid_workspace_id
# Beam.ai - Prod instance
BEAM_API_KEY_PROD=your_prod_api_key
BEAM_WORKSPACE_ID_PROD=your_prod_workspace_id
# Langfuse (self-hosted)
LANGFUSE_PUBLIC_KEY=pk-lf-...
LANGFUSE_SECRET_KEY=sk-lf-...
LANGFUSE_HOST=https://tracing.beamstudio.ai
Dependencies: pip install requests python-dotenv
Quick Start
# List issue tasks (default: last 1 day, BID workspace)
python 03-skills/beam-debug-issue-tasks/scripts/debug_issue_tasks.py <agent_id>
# Debug specific task with full trace analysis
python 03-skills/beam-debug-issue-tasks/scripts/debug_issue_tasks.py <agent_id> --task-id <task_id>
# Use prod workspace
python 03-skills/beam-debug-issue-tasks/scripts/debug_issue_tasks.py <agent_id> --workspace prod
Workspaces
| Workspace | API Endpoint | Langfuse Project |
|---|---|---|
bid (default) |
api.bid.beamstudio.ai | cmauxbgww000582ry4644c2qr |
prod |
api.beamstudio.ai | clw5gbhuy0003u3rv4jzzoesh |
Issue Statuses
Tasks are flagged as "issue" if status is:
FAILED- Execution failedERROR- Processing errorSTOPPED- Condition failedCANCELLED- User cancelledTIMEOUT- Execution timeoutUSER_INPUT_REQUIRED- Missing input data
Debug Reports
Reports saved to: 04-workspace/agents/{agent_name}/debug/
Format: Smart Brevity (headline, takeaway, why it matters, details, fix)
Key spans analyzed:
ParameterSelection/v2- How parameters were matchedExecuteGPT_Tool/v1- Tool execution reasoningNodeSelection:EdgeEvaluation/v1- Routing decisionsTaskSuccessCriteriaCheck/v1- Why task stopped
CLI Reference
| Flag | Description | Default |
|---|---|---|
agent_id |
Beam agent ID (required) | - |
--workspace, -w |
Workspace: bid or prod | bid |
--days, -d |
Look back period (1, 3, 7, 14, 30) | 1 |
--task-id, -t |
Debug specific task ID | - |
--summary, -s |
Show grouped summary | false |
--limit, -l |
Max tasks to show | 10 |
--output, -o |
Save to JSON file | - |
--no-trace |
Skip Langfuse lookup | false |
Example Output
Debug Report (Smart Brevity)
# Task stopped: condition failed
Checklist evaluation: subfolder must equal 'Schreiben Schuldner' but was null.
**Why it matters**: This task did not complete successfully and may need attention.
**The details**:
- **Status**: `STOPPED`
- **Task**: `ab3cbbb8-28da-41aa-b726-25931d14d7d4`
- **Latency**: 159.6s
- **Cost**: $0.1043
**Key spans**:
- NodeSelection:EdgeEvaluation/v1 (23.4s)
- TaskSuccessCriteriaCheck/v1 (7.2s)
**Root cause**:
> The criterion is not met because subfolder is not set to required value.
**Fix**: Review the condition that stopped execution. Check if input data meets requirements.
Langfuse Links
Each report includes direct links:
- Session URL: All traces for the task
- Trace URL: Specific execution with full details
Error Handling
| Error | Solution |
|---|---|
BEAM_API_KEY not found |
Add to .env |
Invalid workspace |
Check workspace parameter (bid/prod) |
No traces found |
Verify agent has Langfuse integration |
401 Unauthorized |
Verify API keys |
Related Skills
beam-get-agent-analytics- Performance metricsbeam-create-agent-task- Create test tasksbeam-list-agents- List available agents
More from abdullahbeam/nexus-design-abdullah
mental-models
Load when user says "mental model", "think through this", "structured thinking", "help me decide", "analyze this problem", "first principles", "pre-mortem", "stakeholder mapping", "what framework should I use", or any specific model name. Provides 59 thinking frameworks for decision-making, problem decomposition, and strategic analysis.
64notion-connect
Connect to any Notion database by name. Load when user mentions 'notion', 'connect notion', 'setup notion', 'query [database-name]', 'add to [database]', 'notion databases', or any database name from persistent context. Meta-skill that discovers workspace, caches schemas, and routes to appropriate operations.
24google-tasks
Manage Google Tasks and task lists. Load when user mentions 'google tasks', 'tasks', 'todo list', 'create task', 'complete task', or references task/todo management.
21google-sheets
Read and write Google Sheets data. Load when user mentions 'google sheets', 'spreadsheet', 'update sheet', 'read sheet', 'append to sheet', or references extracting data to update a tracking sheet.
20airtable-master
Shared resource library for Airtable integration skills. DO NOT load directly - provides common references (setup, API docs, error handling, field types) and scripts used by airtable-connect, airtable-query, and airtable-sync.
19google-integration
Complete Google Workspace integration (Gmail, Docs, Sheets, Calendar, Drive, Tasks, Slides). Load when user mentions 'google', 'gmail', 'email', 'google docs', 'google sheets', 'spreadsheet', 'google calendar', 'schedule meeting', 'calendar', 'google drive', 'upload file', 'download file', 'google tasks', 'todo', 'google slides', 'presentation', or any Google service operation.
18