Internal Agents Map

AI Investigation Agent

Flex runs an internal Slack agent that support, operations, and engineering use to debug HSA and FSA payment problems. Given an email, order number, or error string, it traces the transaction across systems and answers in plain English. On high-confidence bugs it opens a pull request for review.

Company
Flex
Approach type
Agent
Human involvement
Drafts reviewed
Invocation
Interactive
Interfaces
Slack
Deployment stage
Deployed
Evidence strength
Detailed primary
Entry reviewed
Copy as MDAsk ChatGPT

How it works

Slack request through transaction trace, confidence gate, and reviewed pull request.

Resolve the identifier and walk the transaction

A universal resolver maps an email, order number, transaction ID, or ticket to the relevant records, and the agent walks the transaction lifecycle across payments, refunds, consultations, webhooks, and payouts[Source 1]

Dig into the failing path

When something looks wrong the agent pulls provider responses and real-time payment state, searches production logs, and inspects error traces and the source code around the failure[Source 1]

Assess confidence before acting

The agent verifies the failure mode in the affected code path and assesses its confidence before taking any action[Source 1]

Spawn the coding sub-agent for a high-confidence fix

The agent creates an engineering ticket and a coding sub-agent clones the repository, applies the fix, and opens a pull request posted back to the Slack thread[Source 1]

Where people stay involved

People review, approve, or guide the agent’s work here.

Reported: High-confidence fixes return as a pull request posted for review; the agent never merges or deploys.

  • Supervision level

    Work-product review

    A person reviews the draft or implementation.

    Level 3 of 5

    • payment investigation → proposed code fix[Source 1]

How supervision levels work

Implementation details

Model
Anthropic (named for the tool-calling investigation loop and the coding sub-agent); specific model version not named[Source 1]
Harness
Investigation-to-fix loop running as a serverless application on Modal; Slack requests are acknowledged, the investigation runs in a spawned background function, and fixes come from a spawned coding sub-agent[Source 1]
Sandbox
Not reportedThe capture names the Modal serverless runtime but no execution isolation boundary.
Tool access
Traces a payment end-to-end across payment systems; can open a PR with a proposed fix when a bug is found[Source 1]
Knowledge
Not reportedRecords arrive through scoped tools (a read-only replica, payment infrastructure, logs, Sentry, Linear, GitHub, PostHog); no separate knowledge store is documented.
Context management
Follow-up questions continue in the same Slack thread with full context; investigation length and thread depth are capped[Source 1]
Credentials
Not reportedSlack request verification and log redaction are named; how the agent authenticates to connected systems is not documented.
Interfaces
  • slack
[Source 1]

Mechanisms

Investigation-to-fix loop

Payment trace → root-cause hypothesis → proposed code fix as a PR[Source 1]

Validation and failure handling

Run the validation pipeline before the pull request

The coding sub-agent runs compile checks, linting, formatting, and tests before opening the pull request[Source 1]

Reported observations

These results come from the sources. Notes below each result explain what it covers and any reported limits.

Key observation

Flex reports routine investigations compressed from about 20 minutes of engineering time to seconds[Source 1]

Routine HSA and FSA payment investigations handled by the internal agent

About this result
Category
Cost latency
Evidence type
Qualitative
What it covers
Routine HSA and FSA payment investigations handled by the internal agent

Lessons

Flex retains investigation audit records and tool traces that engineers can inspect when a diagnosis is incomplete or wrong.[Source 1]

Flex routes high-confidence diagnoses to a coding sub-agent and PR review, medium-confidence cases to an engineering ticket, and inconclusive cases to a report.[Source 1]

Back to agents
Improve this record

Give your coding agent the context and instructions to prepare a source-backed update.

Paste the prompt into your coding agent, then describe the correction or add a public source.

Preview prompt

Sources and research details

Citations link to the original publisher. Each source also keeps a preserved copy in the repository, so a changed or removed page stays checkable.

  1. The Flex AI Investigation Agent for HSA/FSA paymentshttps://www.withflex.com/blog/the-flex-ai-investigation-agent-for-hsa-fsa-paymentsEngineering blog · First party · Last source verification: 2026-08-31
Question coverage and scope
purpose
Reported
workflow
Reported
human involvement
Reported: High-confidence fixes return as a pull request posted for review; the agent never merges or deploys.
implementation
Reported
validation
Reported
observations
Reported
lessons
Reported
Research details for every claim on this page
  1. Summary
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  2. Harness
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  3. Model
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  4. Interfaces
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  5. Tool access
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  6. Context management
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  7. Investigation-to-fix loop
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  8. Resolve the identifier and walk the transaction
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  9. Dig into the failing path
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  10. Assess confidence before acting
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  11. Spawn the coding sub-agent for a high-confidence fix
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  12. Run the validation pipeline before the pull request
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Not assessed
    Confidence reason
    No explicit confidence assessment is recorded for this claim.
  13. Key observation
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Medium
    Confidence reason
    Flex states the before-and-after in its own engineering blog without measured timings or a defined sample of investigations.
    Scope
    Routine HSA and FSA payment investigations handled by the internal agent
  14. Lesson
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Medium
    Confidence reason
    The audit section distinguishes the query, timing, and response log from the reasoning and tool trace; these records support inspection rather than prove correctness.
  15. Lesson
    Statement type
    Fact
    Provenance
    Reported
    Confidence
    Medium
    Confidence reason
    The three confidence branches are described explicitly, including validation before a PR and the prohibition on the agent merging or deploying.
  16. Operating model assessment
    Statement type
    Inference
    Provenance
    Catalog judgment
    Confidence
    High
    Confidence reason
    The source describes a trace, diagnosis, and proposed pull request returned for review.
    Observation date
    2026