Export to Message Queues: Amazon SQS and Google Pub/Sub

Stream Agent Command Center logs from Future AGI to Amazon SQS or Google Pub/Sub for real-time processing and downstream event handling.

📝
TL;DR

Connect your SQS queue or Pub/Sub topic and Future AGI will publish Agent Command Center request logs as JSON messages on every sync cycle. Build your own consumers for custom processing, alerting, or data pipelines.

What this does

This integration exports stored Agent Command Center request logs as JSON messages to your SQS queue or Pub/Sub topic on each sync cycle. Delivery can include duplicates, and SQS partial-batch failures can lose messages; consumers must not treat this as a lossless event stream.

Useful when you want to build custom processing on top of your LLM traffic - for example, feeding requests into your own analytics pipeline or triggering custom alerts based on your own rules.

What gets published

Each message is a JSON object:

{
  "request_id": "req_abc123",
  "model": "gpt-4o",
  "provider": "openai",
  "resolved_model": "gpt-4o",
  "latency_ms": 842,
  "input_tokens": 1200,
  "output_tokens": 323,
  "total_tokens": 1523,
  "cost": 0.02,
  "status_code": 200,
  "is_stream": false,
  "is_error": false,
  "error_message": "",
  "cache_hit": false,
  "fallback_used": false,
  "guardrail_triggered": false,
  "routing_strategy": "",
  "timestamp": "2026-03-31T14:22:10.000Z",
  "event_type": "request"
}

Error messages can include sensitive details. Review your data handling policy before enabling export.

SQS messages include message attributes: source = agentcc-gateway, event_type = request. Messages are sent in batches of up to 10 (SQS limit).

Pub/Sub messages include the same attributes and are published asynchronously.


Before you start

You’ll need credentials for one of the supported providers:

  • An SQS standard queue (already created)
  • The Queue URL (e.g., https://sqs.us-east-1.amazonaws.com/123456789/my-queue)
  • AWS Access Key ID and Secret Access Key with sqs:SendMessage and sqs:GetQueueAttributes permissions
  • The queue’s region
  • A Pub/Sub topic (already created)
  • The full topic path (e.g., projects/my-project/topics/agentcc-logs)
  • A service account key (JSON) with pubsub.topics.publish and pubsub.topics.get permissions
  • Optionally, the GCP Project ID

You also need Admin or Owner role in your Future AGI workspace, and the Agent Command Center set up and receiving traffic.


Connect a Message Queue

Open Integrations

Go to Settings > Integrations in your Future AGI workspace. Click Add Integration or click the Message Queue card.

Integrations list page

The Integrations page includes the Message Queue connection option.

Choose provider and enter credentials

Select SQS or Pub/Sub, then fill in the credentials.

Message Queue credentials form with Amazon SQS selected

Select a queue provider and enter its credentials; Amazon SQS is selected here.

FieldRequiredDescription
Queue URLYesFull SQS queue URL
RegionYesAWS region (e.g., us-east-1)
Access Key IDYesAWS access key
Secret Access KeyYesAWS secret key
FieldRequiredDescription
Topic PathYesFull path: projects/{project-id}/topics/{topic-name}
GCP Project IDNoYour GCP project ID
Service Account JSONYesFull service account key JSON

Click Validate & Continue.

Configure sync settings

Set the sync interval and historical data option. Without a backfill start time, the first sync exports the previous 24 hours. Subsequent sync windows overlap by one minute, so consumers should deduplicate repeated messages using request_id.

Warning

SQS export can lose messages when SQS accepts only part of a batch: failed entries are not retried before the sync checkpoint advances, and the connection can still show Active. Do not rely on this export for lossless delivery.

Click Connect Integration.

Done

Messages start publishing on the next sync cycle.


Sync status

Monitor your integration from the detail page (Settings > Integrations > click your Message Queue connection).

StatusMeaningAction
ActiveEnabled for scheduled syncs; not a delivery guaranteeMonitor sync history and your consumer; SQS partial-batch failures can still show Active
SyncingA batch is being published right nowWait for it to finish
PausedYou paused the export manuallyClick Resume when ready
ErrorCredentials invalid or queue/topic not accessibleCheck permissions

Troubleshooting

No messages appearing in my queue

Check that your credentials have publish permission. For SQS, the IAM user needs sqs:SendMessage and sqs:GetQueueAttributes on the queue. For Pub/Sub, the service account needs pubsub.topics.publish and pubsub.topics.get on the topic.

Messages are delayed

Messages are published in batches on each sync cycle. A shorter sync interval can reduce latency, but processing time and errors can add delay. Check the sync history for errors.

SQS messages are being dropped

SQS partial-batch failures can leave messages unpublished even when Future AGI shows Active; this export is not lossless. For messages already in SQS, also check retention, consumer processing and any dead-letter queue.


What’s next

Was this page helpful?

Questions & Discussion