Create an upload key
Run this in a trusted setup process with a full Arga credential:ARGA_TRACE_KEY in the agent. It can upload evidence for that exact source, but cannot read collections, generate tasks, approve them or provision environments. The key expires after 30 days. Renew it in your trusted setup process. Legacy account-key rotation or session revocation invalidates it; v1 has no individual upload-key revocation endpoint.
Wrap the provider clients
Provider libraries retain their own Node requirements. CI covers Gmail 18/Stripe 22 on the supported Node matrix and Gmail 22/Stripe 23 on Node 22. The following code belongs alongside your existingstripeClient, gmailClient and runAgent application objects. A Gmail client from googleapis or @googleapis/gmail is supported. Arga does not create provider clients or read their credentials.
filterTrainingText is your synchronous local function. It must return a string and must not send raw text to Arga. Use it to remove names, proprietary facts and other information your organization excludes. Increase revision when its behavior changes. Built-in credential masking and email/Stripe-ID aliases supplement your filter; they do not guarantee removal of all personal information.
No free text leaves by default. Select gmail.subject and gmail.body explicitly only when those fields are needed and your local filter handles them. Supported text selectors are goal, policy, gmail.subject and gmail.body. A failed filter marks incomplete coverage and does not fall back to exporting the original text.
Use an explicit episode
For a direct async workflow:AsyncLocalStorage; simultaneous agent invocations remain isolated. Synchronous functions and Gmail callbacks are also supported. Keep the episode open until callbacks finish. Consume generators inside an explicit episode.
After close(), a function wrapped by agent() continues to run without collection. Explicit episode() calls on a closed tracer raise an error.
There are no global monkey patches or additional provider calls. Original provider results and errors reach your application. Use manual page iteration with supported list calls when you need complete evidence. Stripe’s automatic pagination helpers are delegated but create a coverage gap because subsequent internal requests are not individually observed.
Preview and delivery
flush() reports queue drainage; check uploaded, failed and dropped counters to verify delivery. Recent receipts contain only collection IDs and relative Training paths. There is no durable disk spool, so flush before process shutdown.
Coverage and limits
- Stripe projection supports
customers,payment_intents,chargesandrefunds; Gmail supportsmessages,draftsandprofile. - Gmail
messages.insertandmessages.importnormalize to the evidence contract’smessages.create; raw MIME arguments remain excluded. - Only executed calls through the wrapped clients are observed. Unknown operations detected through those wrappers create coverage gaps. Calls using other clients are not automatically captured.
- Source code, provider credentials, arbitrary metadata, system prompts, model reasoning, raw MIME, attachments, HTML and Gmail snippets are excluded.
- Identity aliases are consistent within an episode and differ across episodes. Amounts, dates, resource relationships, provenance and selected operating policy remain available.
- Lists describe result pages, not the entire account. Missing fields mean unknown. Parallel reads are accepted; overlapping mutations, including overlapping reads and writes, create an ordering gap.
- Each episode is limited to 100,000 bytes, 100 events, 50 records per event, 4,000 characters per selected text and 10 policy strings. Exceeding a limit records a coverage issue rather than claiming completeness.

