AI agent instructions
AI agent instructions
Viewing Functions
List All Functions
View all deployed Functions:list_functions.py
Get Function Details
Retrieve specific Function information: Setfunction_id (Python) or functionId (Node) to your deployed Function’s ID.
Updating Functions
Update Function Code
Deploy a new version of your Function:update_code.py
Update Function Metadata
Change Function name or description:Versioning
Version Management
Functions automatically version on each update:Run Specific Version
Execute a specific Function version:run_specific_version.py
Version History
Track changes across versions:Monitoring Executions
View Run History
List recent Function executions: Before running this example, setfunction_id (Python) or functionId (Node)
to the ID of the Function whose history you want to inspect.
Check Run Status
Monitor specific execution: Setfunction_id and run_id (Python), or functionId and runId (Node),
to your Function’s ID and the run ID returned by its execution.
active- Function is currently runningclosed- Function completed successfullyfailed- Function encountered an error
Filter Active Runs
View only running executions:Viewing Replays
Access Function Replay
Watch MP4 replay of Function execution:access_replay.py
- Video recording of browser session
- Shows all actions taken
- Useful for debugging failures
- Available after running a function
Replay After Run
Get replay immediately after execution:replay_after_run.py
Managing Runs
Stop Running Function
Cancel a long-running execution:stop_running.py
Monitoring Long Runs
Track execution progress:Forking Functions
Fork Shared Function
Create your own copy of a shared Function:fork_function.py
- Customize shared Functions
- Create templates from marketplace
- Copy teammate’s Functions
- Experiment without affecting original
Modify Forked Function
After forking, update as needed:modify_forked.py
Downloading Functions
Download Function Code
Retrieve Function source code:download_code.py
- Decryption key (available in Console) - passed when creating Function instance
- Only works for Functions you own or have access to
Download for Backup
Back up all your Functions:backup_functions.py
Deleting Functions
Delete Function
Remove a Function permanently:delete_function.py
- Deletion is permanent
- All versions are deleted
- Run history is preserved
- Cannot be undone
Sharing Functions
Make Function Public
Share Functions with others:make_public.py
- ✅ Others can view and fork
- ✅ Original remains under your control
- ❌ Others cannot modify your version
- ✅ Usage tracked to your account
Private Functions
Keep Functions private (default):Best Practices
1. Version Your Functions
Update incrementally with clear changes:version_backup.py
2. Monitor Function Health
Regular health checks:function_health_check.py
3. Clean Up Old Runs
Archive or analyze old execution data:cleanup_old_runs.py
4. Document Changes
Keep change log for Function updates:document_changes.py
5. Test Before Production
Validate updates before deploying:test_before_prod.py
Troubleshooting
Function Fails to Run
Check run details for errors:troubleshoot_fails.py
Missing Environment Variables
Verify configuration:missing_env_vars.py
High Failure Rate
Analyze failure patterns: Setfunction_id (Python) or functionId (Node) to your Function’s ID.
Include completed runs with only_active=False / only_active: false so failed runs appear.
Next Steps
Creating Functions
Learn how to write Functions
Invocations
Call Functions via API or SDK
Schedules
Schedule Functions with cron
Functions Concept
Back to Functions overview