Skip to main content

bl run

Execute a resource (agent, model, job, function, sandbox)

Synopsis

Execute a Blaxel resource with custom input data. Different resource types behave differently when run:
  • agent: Send a single request (non-interactive, unlike ‘bl chat’) Returns agent response for the given input
  • model: Make an inference request to an AI model Calls the model’s API endpoint with your data
  • job: Start a job execution with batch input Processes multiple tasks defined in JSON batch file
  • function/mcp: Invoke an MCP server function Calls a specific tool or method
  • sandbox (sbx): Execute a command in a sandbox VM Runs shell commands via the sandbox process API
Local vs Remote:
  • Remote (default): Runs against deployed resources in your workspace
  • Local (—local): Runs against locally served resources (requires ‘bl serve’)
Input Formats:
  • Inline JSON with —data json-object
  • From file with —file path/to/input.json
Streaming: When agents respond via SSE (Server-Sent Events), the CLI automatically detects and parses the stream. Use —stream to explicitly request streaming mode and print chunks in real-time as they arrive. Advanced Usage: Use —path, —method, and —params for custom HTTP requests to your resources. This is useful for testing specific endpoints or non-standard API calls.

Examples

Options

Options inherited from parent commands

SEE ALSO

  • bl - Blaxel CLI - manage and deploy AI agents, sandboxes, and resources
Last modified on May 2, 2026