Skip to main content

Command

Description

Sends a query to your default agent hosted on the sb0 platform and streams the response.

Usage

Query your deployed agent:

Expected Output

Quoting

Always use quotes around your question:

Streaming Response

The command streams the response in real-time as the agent generates it, similar to ChatGPT or Claude.ai.

Requirements

Before using sb0 query:
  1. Login - Authenticate with sb0 login
  2. Deploy agent - Push at least one agent with sb0 push
  3. Set default - The platform uses your most recently deployed agent by default

Multi-line Queries

For longer queries, use heredoc syntax:

Selecting a Specific Agent

If you have multiple deployed agents, you can specify which one to query:
The --agent flag is coming soon. Currently, queries are sent to your default (most recently deployed) agent.

Common Issues

Not Authenticated

Solution:

No Agents Deployed

Solution: Deploy an agent first:

Network Errors

Possible solutions:
  • Check your internet connection
  • Verify the platform is accessible
  • Try again in a few moments

Development Workflow

Use sb0 query to verify your deployed agent works correctly:

Comparison with Local Testing

Featuresb0 run --promptsb0 query
LocationLocal Python environmentPlatform (cloud)
SpeedInstantNetwork latency
ChangesImmediateAfter sb0 push
PurposeDevelopment/testingProduction verification
Use sb0 run --prompt for rapid iteration during development. Use sb0 query to verify your deployed agent works in production.

Next Steps