05open source
Nimbus Account Assistant
native Agentforce · confirmation-gated writes · deterministic data
An account-service agent built natively in Agentforce Agent Script: a router, seven subagents (four doing work, three guardrails) and five Apex and Flow actions. Writes stay locked until a read-only preview fills the gate variables; record IDs pass through filter_from_agent so the model never sees them; money and outage figures come only from Apex or Flow. Deliberately no RAG — the data is structured.
- 7
- subagents, 3 of them guardrails
- 5
- actions: 1 Apex, 4 Flows
- 0
- figures computed by the model
The problem
An account assistant that changes plans and opens cases is only safe if the platform, not the model, controls the writes and the numbers. The design question is where to put each guarantee: in the prompt, in the router, or in Apex and Flow where it can be tested.
What I built
- Router that routes on full conversation history and never answers directly, in front of billing, plan change, outage status and troubleshooting subagents.
- Three guardrail subagents — escalation, off-topic and ambiguous question — with prompt-injection resistance in the system instructions.
- Billing as a deterministic Apex read (SOQL sum of unpaid invoices), with Apex test coverage.
- Plan change as two Flows: a read-only preview that resolves the account and validates the plan, and a commit that runs only when the preview has set the gate variables.
- Outage status as a grounded lookup by region; troubleshooting creates a Case or hands off to a live agent.
- Record IDs pass through filter_from_agent, so the LLM never handles them. Versioned v1 to v4 as source-tracked metadata.
Honest limits
- No RAG or Data Cloud, on purpose: outages, plans and invoices are structured and keyed, so a deterministic query is the auditable tool. Retrieval earns a place only if unstructured knowledge articles arrive.
- Built in a developer org; permissions are broader than a production deployment would grant, and tightening them is part of the path to production.
Stack
AgentforceAgent ScriptApexFlowSalesforce CLI