Agentic Infrastructure

How Heurist Finance Bought Data Per Query to Build an Investment Workbench

Heurist Finance used Amazon Bedrock AgentCore to buy premium data per query, cutting agent-system engineering by 80%.

How Heurist Finance Bought Data Per Query to Build an Investment Workbench — article cover

Building an AI investment assistant means answering questions like “How does today’s PCE release impact my portfolio?” with real data, not vibes. That data often sits behind paywalls, and enterprise contracts are hard to justify before you have users. Heurist Finance solved this by buying premium data per query through Amazon Bedrock AgentCore payments, using the x402 protocol to pay only for what each question needs.

The per-query payment problem

Heurist’s goal is to give retail investors institutional-style workflows: market data, filings, news, deep research, portfolio construction, and scenario analysis in one chat. The data sources are fragmented and expensive. No single vendor covers everything, and upfront contracts don’t work for a small team.

Buying data per query offers a better economic model, but it creates a production challenge. The agent must spend funds on a user’s behalf while enforcing custody, spending limits, and audit requirements. Every action must map to a specific user, session, and request. That means identity, cross-session state, isolated code execution, payment orchestration, and end-to-end tracing all need to work together.

Heurist estimates roughly 80% less agent-system engineering than building an in-house LLM orchestration stack, because AgentCore manages identity, memory, sandboxing, and payments. That’s months of engineering time redirected to the research workflows and personalization that differentiate the product.

How the payment flow works

When a user asks a question, Heurist Finance requests a paid data feed from a merchant. The merchant returns HTTP 402 with x402 payment terms: amount, recipient, asset (USDC), and network (Base). AgentCore payments checks the payload against a Payment Session’s maxSpendAmount cap. If the charge would exceed the cap, the system tells the user and suggests alternatives.

Within budget, Heurist calls the Process Payment API, which signs the payment through an embedded crypto wallet scoped to Base. Credentials are retrieved at runtime from AWS Secrets Manager. The request is retried with proof in the X-PAYMENT header, and the merchant returns the data.

This flow means Heurist buys only the data a question needs, without a vendor contract or prepayment. The Payment Manager coordinates a CoinbaseCDP Payment Connector, and each interaction receives a Payment Session with a spending cap.

Identity, memory, and audit in one request

A user’s profile and conversation history can reveal beliefs, risk tolerance, time horizon, and positions. Heurist treats identity, access, and audit as part of every request.

AgentCore Identity carries the authenticated user through every service call. Each tool call, payment, and memory operation records the user ID, workload identity, request ID, and trace ID, creating one audit trail across services. AgentCore memory stores user preferences, thesis state, and conversation history across sessions, scoped to one user by Identity.

AgentCore Code Interpreter runs analysis in an isolated sandbox with no arbitrary network egress. The sandbox tears down when the analysis finishes. Amazon Bedrock Guardrails filters both input and output, blocking prompt-injection attempts aimed at payment and data tools and enforcing policies against recommending unhedged single stocks.

What this means for builders

Heurist’s approach shows how managed agent infrastructure can let a small team focus on differentiated product work rather than the system beneath it. The per-query payment model is central: it gives governed, auditable access to paid data without building payment infrastructure from scratch.

This matters beyond fintech. Any agent that needs to spend money on a user’s behalf—buying data, calling APIs, or accessing premium services—faces the same custody, spending limit, and audit requirements. AgentCore payments provides a pattern for handling that safely.

For teams building agentic products, the lesson is to look for managed services that handle identity, memory, sandboxing, and payments together. As noted in our earlier piece on FDEs that build your team’s capability, not your dependency, the goal is to avoid building undifferentiated infrastructure. Heurist’s 80% reduction in agent-system engineering is a concrete example of that principle in action.

Heurist is extending the product in three directions: event-driven research tied to earnings calendars, portfolio-aware analysis of market events, and recommendations based on what traders with similar horizons are researching. The foundation is in place, and the per-query payment model makes those extensions economically viable.

Sources

AI-assisted summary compiled from the sources above, reviewed by a human before publishing.

FOUND_THIS_USEFUL?

Support more practical AI articles, tutorials, and build notes.

BUY_ME_A_COFFEE
SHAREXEMAIL