AWS Architecture Review

MesonX Flow.
Lean by design.

A cost-effective Agentic AI Workflow backend — self-contained, production-verified, and running at a fraction of a dollar.

Account 8423-5276-8489 · sQuarkAI
~$1–5/mo
Estimated live cost at your volume — genuinely cost-effective.

Question 01

Is MesonX Flow (8423)
cost-effective?

Yes — it's already lean, with just two trimmable pieces. The 29 deployed resources break down like this.

✓ Cost-effective as-is
Component Count Needed for Agentic Workflows? Est. cost
Lambda (workflow API) 1 ✓ Core ~free (1M req free tier)
DynamoDB (4 tables, on-demand + PITR) 4 ✓ Core workflows · executions · audit · templates ~$1–5/mo
API Gateway HTTP 1 ✓ Core ~$0.04/mo
Lambda IAM role + DynamoDB policy 3 ✓ Core free
CloudWatch logs (2) + alarms (2) 4 ✓ Core ~free
S3 buckets ×2 + CodeBuild + role/policy/logs 9 ⚠ Build tooling only ~$0.50/mo
Cost Explorer IAM policy + attachment 2 ✗ Not for workflows feeds the MesonX Pulse “costs” dashboard free (IAM)

The two exceptions

Not for Agentic Workflows.

Everything else is core runtime. Only these two pieces sit outside the workflow path — and both cost almost nothing at idle.

01 · BUILD TOOLING

CodeBuild + 2 S3 buckets + role

9 of 29 resources · ~$0.50/mo

This is a build pipeline that recompiles the Lambda zip in Linux. It's only needed when you deploy a new code version — it runs on demand, not 24/7, so it costs almost nothing at idle. It's deploy-time scaffolding, not runtime.

02 · COST DASHBOARD

Cost Explorer IAM policy

2 resources · free (IAM)

Lets the Lambda read ce:* and organizations:*. That powers the /api/v1/costs/* endpoints — the MesonX Pulse financial dashboard. It's a separate concern from Agentic workflows and costs nothing to keep.

Bottom line on cost: the live backend is ~$1–5/month at your volume. Even the CodeBuild/S3 “extra” adds only cents. So — yes, 8423 is cost-effective as-is.

Question 02

Do we have the components to
support Agentic AI Workflows only?

Yes — 100%. The workflow feature set is fully self-contained in 8423.

✓ Fully self-contained
✓
Lambda serving the workflow API FastAPI backend, verified live.
✓
4 DynamoDB tables workflows · executions · audit-logs · templates
✓
The app code has exactly the workflow modules
routers/workflows.py · routers/executions.py · routers/agents.py · services/executor.py · services/compiler.py · services/llm_provider.py
✓
Endpoint already verified live
/api/v1/agents → 9 agents · /api/v1/workflows working
✓
Uses Upstash Redis external, ~free tier — for state & streaming
The only non-workflow thing bundled in is the costs router + Cost Explorer IAM — which is harmless (unused by the canvas, near-zero cost).

Runtime path

Order of LLM calls.

Every workflow LLM call walks the same MesonX standard chain as the chatbot — the first provider that succeeds answers; an upstream hiccup never fails the graph.

✓ 3-provider failover
1
Gemini (gemini-flash-latest)
Always tried first — keys loaded from mesonx-flow/api-keys in Secrets Manager.
2
OpenRouter (meta-llama/llama-3.1-8b-instruct)
Engaged when Gemini errors or lacks a key — verified live: Gemini 503/429 → OpenRouter served the reply.
3
AWS Bedrock (anthropic.claude-3-5-sonnet-20241022-v2:0) — last resort
Claude 3.5 Sonnet in-region (us-east-2) — the AWS-native backstop of the chain.
4
Per-node model override (optional)
A node's config.model is honoured when it matches the provider's format — e.g. gemini-* → Gemini, org/slug → OpenRouter, anthropic.claude-* → Bedrock; otherwise the chain defaults apply.
5
All providers exhausted → graceful mock
Only when every step fails does the graph see [MOCK] output — the workflow still completes instead of erroring.
Identical to the MesonX Bot chain — same models, same order, one call per LLM node. Token usage and cost_usd are reported back per node in the execution result.