LocalCloud Cloud Tasks Local Emulator
Get started
local.cloud — Cloud Tasks Local Emulator .md Open tab

Cloud Tasks

Cloud Tasks queues work for later delivery to a handler. Rate limits, retries, and scheduling help control how background requests reach application workers.

When to use Cloud Tasks

Typical uses

Use when a known handler should process queued work with controlled dispatch rates, scheduled delivery, and per-task retry behavior.

Examples

  • Deferred HTTP work
  • Rate-limited background processing
Messaging & Workflow

Explore another service

View all
Local workflow

Example usage

Install the CLI, start LocalCloud, and export its environment in the same shell. Generated endpoints account for remapped ports.

1. Install and start · shell
curl -fsSL https://local.cloud/install.sh | sh
localcloud start --local-only
# Export GOOGLE_CLOUD_PROJECT and CLOUD_TASKS_EMULATOR_HOST
eval "$(localcloud env)"

Dispatch a background HTTP task

  1. Create a queue with a dispatch rate and retry policy.
  2. Enqueue a request for a local HTTP handler.
  3. Inspect attempts and verify the handler completes the work.

Documented workflows

  • Queue lifecycle, pause/resume, and purge
  • Task CRUD and manual/automatic HTTP dispatch
  • Rate/concurrency limits, deadlines, retries, and attempt history
  • HTTP delivery with locally issued OAuth/OIDC credentials

Service boundaries

  • No App Engine delivery or routing/header overrides
  • Authenticated receivers must trust LocalCloud's issuer and JWKS
  • No logging sampling
  • Restart may redeliver; pause/purge/delete cannot cancel in-flight requests
  • Check attempt history before replaying ambiguous requests
Try it in your project

Code examples and integrations

Start with the local guides. Official Google Cloud samples may need endpoint changes and can cover features outside the workflows listed here.

Agent testing

Use Cloud Tasks with an AI agent

Before the agent changes application logic, have it create local Cloud Tasks state, read it back with the project SDK, and note which feature the check covered. That first local call catches accidental production routing and needs no GCP account, service-account key, or billing project.

Configure this repo

Set up this repository to use LocalCloud for local GCP development. First read https://local.cloud/ai/agents.md, then inspect this repo, identify the GCP services and SDK language, configure emulator environment variables, and run the narrowest integration test against localhost. Do not use real GCP credentials or production endpoints.

Production endpoints, auth, IAM, quotas, regional behavior, and final release validation still need the target Google Cloud project.

Agent resources has more prompts and the AGENTS.md template.

Related guides

Desktop view