← Back to Blog
Engineering Babylon · Capture Client · Runtime Traces

Babylon: Proxy-Free Capture and Agent Runtime Traces in Rockxy

Babylon is a companion capture client that pairs with Rockxy and streams your app's HTTP, WebSocket, and runtime traces over an encrypted local connection — no system proxy, no CA certificate to install, and no traffic leaving your Mac.

· 11 min read · Rockxy Team

Rockxy captures traffic the classic way: it runs as a local HTTP/HTTPS proxy, and you point a device or app at it, then install and trust its root certificate to read HTTPS. That path is well understood and still the right tool for most third-party apps and devices.

But two situations break it. A request that uses certificate pinning refuses the proxy's certificate and never appears. And a proxy only ever sees bytes on the wire — it cannot tell you which step of an agent run issued a call, how long a tool invocation took, or why a workflow branched the way it did.

Babylon is the answer to both. It is a companion capture client that your app links directly. Instead of routing traffic through a proxy, the app streams its own captured requests — and its runtime execution trace — straight into Rockxy over an encrypted connection on your local network. Because the app is the source, pinning and proxy-ignoring stop mattering, and every captured request arrives already tied to the code path that made it.

This article explains what Babylon streams, how the pairing and encryption work, and where it fits alongside the proxy you already use.

1

What Babylon is

Babylon is a client-side capture path, not a second app you launch. It ships as a companion package your app links in its debug configuration — the client is open source at github.com/RockxyApp/Babylon. At runtime it discovers Rockxy on the local network, opens an authenticated connection, and pushes three kinds of data: a one-time connection handshake, ongoing traffic, and structured runtime events.

Rockxy owns the receiving side of the contract. The client implements the documented protocol without importing any Rockxy source, so the two evolve independently and nothing about your app's build depends on Rockxy internals. On the Rockxy side, captured Babylon requests land in the same traffic list as everything else — the same inspector, the same request and response bodies, the same filtering and search you already use.

The short version

  • Your app links the Babylon client in DEBUG builds only.
  • It pairs with Rockxy using a token you copy from Rockxy's Babylon window.
  • Traffic appears in the normal Rockxy traffic list; runtime events appear in a dedicated timeline.
  • No device proxy configuration, no CA certificate, no cloud round-trip.
2

Why a second capture path exists

The proxy and Babylon solve different problems. Neither replaces the other; they run side by side and their captures merge into one list.

Concern System proxy Babylon client
Setup Device proxy settings, install and trust a CA certificate Link the client, paste a pairing token
Certificate pinning Pinned requests reject the proxy and stay invisible Captured inside the app, before the network layer — pinning does not block it
Apps that ignore the proxy Not captured Captured, because the app reports it directly
Execution context Bytes on the wire only Requests correlated to sessions, traces, and steps
Third-party apps you can't modify Works — nothing to change in the app Not applicable — requires linking the client

Rule of thumb: use the proxy for apps and devices you don't control; use Babylon for your own app, especially when it pins TLS, runs in the iOS Simulator, or executes multi-step work you want to trace.

3

What Babylon streams

Every session opens with a connection message so Rockxy can establish project and device identity, then sends traffic and runtime messages in any order after that.

Message Sent Contents
connection Once, first Project name and bundle identifier, device name and model, and an optional app icon — this is what labels the session in Rockxy.
traffic Per request HTTP method, URL, headers, request and response bodies, status code, timing, and any captured error. Each can carry a correlation context.
websocket Per frame Individual WebSocket frames — send, receive, ping/pong, close — linked to their parent traffic package by id.
runtime Per event Session, trace, and step lifecycle events, plus marks, custom events, and errors — with names, timestamps, durations, and metadata.

HTTP and WebSocket packages flow into the same views you use for proxy captures. The runtime stream is where Babylon does something a proxy cannot.

4

Runtime traces: sessions, traces, and steps

A runtime event describes what your app was doing, not just what it sent. Babylon models execution as a small hierarchy:

  • A session is one run — an app launch, an agent invocation, a test scenario.
  • A trace groups the work of a single logical task inside that session.
  • A step is one unit of that task. Steps nest through a parent reference, so a tool call inside a reasoning step keeps its place in the tree.
  • Marks, events, and errors annotate the trace with points of interest and failures.

Each event carries a name, creation time, optional start and end times, a duration, an error message when it failed, and up to 100 metadata key/value pairs for whatever context you attach — a model name, a prompt token count, a feature flag, a retry number.

The reason this matters is correlation. A traffic package can carry a correlation context naming the session_id, trace_id, and step_id that produced it, so every request lines up with the exact step that issued it.

Take one checkout agent run — session checkout-agent-run-8f2a, trace resolve shipping quote. In the timeline its steps read cleanly, each tied to the call it made:

Step Network call Result
call pricing tool POST /v1/quotes 200 · 412 ms
call model POST /v1/chat/completions 200 · 1.9 s
validate response Failed — schema mismatch on field eta

For an AI agent or any multi-step workflow, that is the view you actually need when something goes wrong. Instead of scrolling a flat list of requests and guessing which one belonged to which step, you see the steps, the network call each one made, and the point where the run failed — in the same window, correlated by id. This is what turns Rockxy from a request viewer into a place you can debug agent behaviour end to end.

5

Pairing and the encrypted channel

Babylon carries request and response bodies off your app, so the channel is authenticated and encrypted from the first captured frame. There is no cleartext fallback.

When you open Rockxy's Babylon pairing window, Rockxy generates 32 cryptographically random bytes, shows them as a 64-character hex pairing token, and stores the token in the macOS Keychain. The token is never sent over the connection and never written to a log — it is a shared secret you copy into your app's debug configuration.

Property How it works
Per-frame key Each frame's key is derived from the pairing token with HKDF-SHA256, bound to the client and session identity. The token itself never travels.
Frame encryption Payloads are sealed with AES-GCM, with the protocol version and message identifiers mixed in as authenticated data, so a tampered frame fails to open.
Replay protection Sequence numbers increase monotonically per client, and Rockxy remembers the most recent 2,048 message IDs — a state that survives TCP reconnects while Rockxy runs.
Idempotent retries An authenticated retry with the same message ID and sequence is acknowledged again without reprocessing, so a flaky connection never double-records a request.
Revocation Regenerating the token disconnects every paired client and clears session and replay state. Old builds stop connecting until their configuration is updated.

Keep the token in a debug-only configuration, never in a shipping build. Because the whole path stays on your Mac and the LAN, none of this traffic reaches an external server.

6

Transport, discovery, and limits

Babylon finds Rockxy over Bonjour and connects over TCP. The same port works for a physical device on your network and for the iOS Simulator over localhost.

Detail Value
Discovery Bonjour service _Rockxy._tcp
Port 10909, for Bonjour and Simulator localhost
Framing 8-byte big-endian length prefix, then a GZIP-compressed JSON frame
Request / response body Up to 50 MiB each
WebSocket limits 10 MiB per frame, 100 MiB per connection
Wire frame cap 72 MiB, with headroom over the largest captured body
7

Using Babylon in Rockxy

On the Rockxy side, Babylon lives under its own Babylon menu with two windows.

1

Open Babylon → Pairing…

The pairing window shows the Bonjour service, the port, and your current pairing token. Copy the token, or regenerate it if you need to revoke existing clients. Keep it private — regenerating disconnects any client still using the old value.

2

Link the client in your app's debug build

Add the Babylon client to your DEBUG configuration and give it the pairing token. On launch it discovers Rockxy and opens the secure connection. Nothing here ships in a release build.

3

Watch traffic arrive in the main list

Captured HTTP and WebSocket requests appear alongside proxy captures, labelled by the project and device from the connection handshake. Inspect bodies, headers, timing, and status exactly as you would for any request.

4

Open Babylon → Runtime Timeline…

The runtime timeline lists session, trace, and step events as they arrive, with their source, name, timestamp, and any error. This is where you read the shape of a run and find the step that broke.

When to reach for Babylon

Babylon is the right path in a few clear cases:

  • Certificate-pinned APIs. The proxy can't read them; Babylon reports them from inside the app.
  • iOS Simulator work. Connect over localhost:10909 with no device proxy setup at all.
  • AI agents and multi-step workflows. The runtime timeline plus request correlation shows what each step did and which call it made.
  • Fast onboarding. When installing and trusting a CA certificate is more friction than pasting a token into a debug build.

Stay with the proxy for third-party apps, for devices you can't modify, and when you need to intercept and edit requests at the proxy layer. The two paths are complementary, and their captures share one traffic list — you don't choose one at the expense of the other.

Frequently asked questions

Where do I get the Babylon client?

The Babylon capture client is open source at github.com/RockxyApp/Babylon. Add it to your app's debug configuration, then pair it with the token from Rockxy's Babylon → Pairing window.

Do I still need to install a CA certificate?

Not for traffic captured through Babylon. The app reports its own requests over the encrypted Babylon connection, so there is no man-in-the-middle certificate to install or trust. You still need the certificate for anything you capture through the system proxy.

Does Babylon work in the iOS Simulator?

Yes. The Simulator connects to Rockxy on localhost port 10909, the same port used for Bonjour discovery on a physical device.

Can Babylon capture certificate-pinned requests?

Yes. Babylon captures inside the app before the request leaves the network layer, so pinning — which rejects a proxy's substituted certificate — does not prevent capture.

Is any of this traffic sent to the cloud?

No. Babylon streams over your local network to Rockxy running on your Mac. Request and response bodies stay on the machine, consistent with Rockxy's local-first approach to network evidence.

Can I run Babylon and the system proxy at the same time?

Yes. They are independent capture paths, and their results appear together in one traffic list. Use the proxy for apps you don't control and Babylon for your own app.

How is the connection secured?

A pairing token generated by Rockxy and stored in the Keychain seeds an HKDF-SHA256 key derivation; each frame is sealed with AES-GCM and protected against replay by monotonic sequence numbers and a remembered-message-ID window. There is no cleartext fallback, and regenerating the token disconnects existing clients.

Is Rockxy free and open source?

Yes. Rockxy's core is free to download and open source under AGPL-3.0, with the source publicly available on GitHub at github.com/RockxyApp/Rockxy.

Coming soon In development · covered in the next post

What this post didn't cover yet

This post introduced what Babylon is and where it fits alongside the proxy. A hands-on integration guide is in development and will walk through the parts skipped here — coming in the next post:

  • Installing the SDK — Swift Package Manager setup, the Info.plist keys for local-network discovery, and calling Babylon.start() with your pairing token.
  • Automatic capture — how Babylon hooks URLSession through method swizzling, with no changes to your networking code.
  • gRPC capture — logging unary and streaming gRPC calls as inspectable traffic.
  • Manual logging API — recording traffic from non-URLSession sources such as C++ libraries and custom transports.
  • Header redaction — stripping auth tokens and API keys before anything leaves the app.
  • Platform coverage — iOS 16+, macOS 13+, tvOS 16+, and watchOS 10+, beyond the Simulator workflow shown here.

Until the follow-up lands, the SDK, quick-start, and security notes live in the Babylon repo (Apache-2.0): github.com/RockxyApp/Babylon.

Rockxy — native macOS network debugger

Try Rockxy — Free and Open Source

A native macOS network debugger for HTTP, HTTPS, WebSocket, and API traffic. Proxy capture, Babylon client capture, runtime traces, SSL inspection, request breakpoints, and more — running entirely on your Mac. No cloud account. No subscription.

Open source · AGPL-3.0 · Native macOS · No account required · Source available to audit