AI 资讯
Reclaiming Terabytes: How to Cut a Managed Database Bill Without Downtime
Managed databases are the cloud cost line people quietly stop looking at. Compute gets rightsized, storage on the instances gets cleaned, but the RDS, Aurora, or Azure SQL bill just grows, because a database feels too load-bearing to touch. It is not. Here is how I have cut managed database spend without a maintenance window, in the order of least risk to most. The theme throughout: databases give you more no-downtime levers than people assume, and the biggest wins are usually storage and rightsizing, not some exotic re-architecture. Start with the free win: reclaim dead storage Storage is where the surprise terabytes hide, and most of it comes off with zero downtime. Drop what nobody reads. Old audit tables, soft-deleted rows that were never purged, expired sessions, staging data that got promoted to prod years ago. A DELETE in batches plus a purge job is the boring, safe first move. Reclaim space after deletes. On Postgres, deleted rows leave bloat until vacuumed. Run VACUUM (and check pg_stat_user_tables for dead tuples). On SQL Server / Azure SQL, rebuild or reorganize fragmented indexes to reclaim pages. This is where the "reclaimed terabytes" headlines actually come from. Kill redundant indexes. Unused and duplicate indexes cost storage and slow writes. Postgres pg_stat_user_indexes (look for idx_scan = 0 ) and SQL Server's missing/unused index DMVs tell you which ones earn their keep. Dropping an unused index is online. Right-size your storage type. On AWS, moving from gp2 to gp3 lets you provision IOPS and throughput independently and usually costs less for the same performance. The modify is applied without downtime. None of the above requires a window. It is pure hygiene, and on a neglected database it is often the single biggest line-item drop. Rightsize the instance (yes, without downtime) The reflex fear is that resizing a database means an outage. With a Multi-AZ deployment it usually does not. Check if you are oversized first. Pull 30 days of CPU, fre
AI 资讯
KEDA 3.0 Scale-to-Zero: How We Cut Intermittent Kubernetes Workload Costs to Almost Nothing
KEDA 3.0 just landed, and the headline feature is the one I care about most as someone who watches a cloud bill: event-driven autoscaling now covers 80+ event sources (Kafka, RabbitMQ, and a long list more) with proper scale-to-zero. If you run workloads that sit idle most of the day and spike when work arrives, this is the difference between paying for capacity you use and paying for capacity that waits. I have been moving our intermittent workloads onto this pattern, so here is what scale-to-zero actually does to the bill, where it helps, and the sharp edges nobody mentions. The problem: HPA scales to one, not to zero Standard Horizontal Pod Autoscaler has a floor. minReplicas cannot be zero, so a workload that processes a queue twice a day still keeps at least one pod (and often the node under it) running 24/7. For a consumer that is busy 2 hours a day, you are paying for 22 hours of nothing. KEDA changes the shape of the question. Instead of "how many replicas does current CPU justify," it asks "are there events waiting." No events, zero pods. Events arrive, it scales from zero up to whatever the load needs. That floor of zero is the whole game for intermittent work. Where scale-to-zero actually pays off Not every workload benefits. The ones that do share a profile: bursty, event-triggered, and tolerant of a short cold start. In our environment the clear wins were: Queue consumers. A worker draining an SQS or RabbitMQ queue that fills a few times a day. Idle 80%+ of the time, now scales to zero between bursts. Kafka stream processors for low-volume topics that only see traffic during business hours. Scheduled batch jobs dressed up as long-running services because nobody wanted to re-architect them. Scale-to-zero gets most of the savings without the rewrite. Dev and staging consumers that had no reason to run overnight and did anyway. A rough sizing rule I use: if a workload is idle more than half the day and an extra few seconds of latency on the first event is
AI 资讯
The hard part of an AI feature is knowing where NOT to use AI
A payment decision has to be exact and repeatable. So in the product I built, the money logic is deterministic code, and the agent only touches the parts where judgement is genuinely open-ended. Every AI demo right now is an agent doing everything. Point it at the problem, let it reason end to end, marvel at the trace. It demos beautifully. Then you try to put it in front of a real workflow with real money and it falls apart, because the thing that makes a demo impressive, the model deciding freely, is exactly the thing you cannot allow when the output is a payment. I spent a while building a procure-to-pay product: a vendor invoice comes in, gets extracted, matched against a purchase order, routed through an approval workflow, and reconciled. It is the kind of thing everyone now wants to put an agent on. So I did, sort of. But the interesting decision, the one that took the longest to get right, was not where to add the agent. It was where to refuse to. The rule: a payment decision must be exact and repeatable A model is a probability distribution. Ask it the same question twice and you can get two answers. That is a feature when the task is fuzzy and a liability when the task is "does this $48,200 invoice match this purchase order". Matching, the approval engine, reconciliation: these have to be exact, auditable, and identical every run. So they are plain deterministic code. No model in the path. If a controller asks why this got approved, the answer is a code path they can read, not "the model felt it was fine". That sounds obvious written down. It is not how most people are building AI features right now. The default has become: agent first, and carve out the deterministic parts only when something breaks. I did the opposite. Deterministic by default, agent only where the trajectory is genuinely open-ended. The three places the agent actually earns its keep Once you hold that line, the places where AI belongs get very clear, because they are exactly the places a
AI 资讯
I built the approval gate, then put a price on it
In ledgerloop, a clean invoice under $1,000 posts with no human involved. I built the approval gate, then put a price on it. A company raised $30M last week to take the human out of agent payments. The expected take from someone with my background is a post defending the human. I agree with them, up to a thousand dollars. Two conditions, and nothing else The manager gate fires on two conditions: any exception, or a clean bill over $1,000. Below that, a clean three-way match posts straight through and no one signs. From the seeded scenarios: $730 clean goes straight through. $9,360 clean still stops, because a material bill gets a human whatever the match says. A steel bar invoiced 9% over the PO stops. Invoiced 100 units, received 80, stops. Two things exactly, and they are the load-bearing ones. Below the floor, what posts the invoice is deterministic tested code, not the model: the agent reads, investigates and proposes, it does not decide an amount. And these are seeded demo scenarios, not production traffic. The argument I actually want It is not whether humans should approve payments. It is that "a human approves payments" stops being a control the moment no one wrote down which payments. An unwritten threshold is not a policy, it is a habit, and a habit cannot be audited. The number itself is arguable and probably wrong for your business. Its existence, in code, with a reason next to it, is not. If you run AP: what is your straight-through limit, and who set it? The whole loop, an agent deriving the workflow then a real invoice routed through it, is in the ledgerloop case study . Originally published at dylan.merigaud.com .
AI 资讯
Enterprise fintech deals die in onboarding, and the config already exists
Enterprise fintech deals don't die in the demo. They die in week six of onboarding, while someone re-types the customer's approval rules into a canvas. I spent two years inside a procurement fintech and the pattern was consistent: the product demos great, the contract gets signed, and then comes the wall. Setup that drags for weeks. Change requests every single week. Users who don't fully understand what was configured for them, so they ask instead of doing. The three things that cut onboarding time by 90% Integrating end to end with the systems the client already runs. The ERP connection wasn't a checkbox: granular sync per data type, bulk imports, master data flowing both ways. Every field the client doesn't re-enter is a support ticket that never exists. Generating a v1 of their approval workflow instead of handing them a blank canvas : business rules and best practices, applied to the real people pulled from their HRIS. The client reviews and adjusts a draft. Nobody designs from zero. Giving clients simple tools to help themselves , including a chatbot, so "how do I change this?" stopped requiring us. None of it was glamorous. All of it was product engineering aimed at time-to-first-value. A CTO building in this space told me recently that time-to-first-value, not features, is what decides procurement deals. That matches everything I saw from the inside. The workflow was never missing Watch an enterprise onboarding for any workflow product and you'll see the same ritual: a kickoff call, a shared screen, and someone rebuilding the org's approval logic box by box. Who approves above $10k. Who signs off on IT purchases. What happens when the manager is on leave. None of that information is new. It sits in the HRIS (who reports to whom, titles, departments) and in the ERP (vendors, open POs, spend history). The customer is being asked to re-enter reality the software could have read. What the next iteration looks like ledgerloop is that idea taken further. An agent
AI 资讯
"It's just an approval workflow" is the most expensive sentence in procurement software
In the demo, it's three boxes: request, manager, CFO. Everyone nods. Then production shows up with questions the canvas never asked. The questions the canvas never asked The approver left the company last month, and the workflow still points at them. The amount lands exactly on the threshold. Above 10k goes to finance. Is 10k above 10k? The request was approved, then someone edited one line. Does the whole chain re-run, or just the delta? Who decides that? The manager is on leave and delegated their approvals. Does the delegate's own delegation count? Until when? Approval by group: any of the five? All of them? Three out of five? In what order? A condition depends on an answer given two steps earlier. That answer just changed. I spent two years shipping and maintaining an approval workflow engine at a procurement fintech. The three boxes took a sprint. The list above took the rest. How we actually answered it We froze the workflow at init: conditions resolved once at launch, and a running request never re-derived them. Mid-flight edits simply didn't exist. Approval groups came straight from the teams in the HRIS. Vacations earned a proper feature, a replacement approver that applied even to workflows already running, because absence is the one thing you can't freeze. And the approver who had left the company? Fixed by hand, more often than I'd like to admit. Freezing at init isn't a hack. It's the honest trade-off: deterministic, auditable, and it quietly declines half the list above. A workflow builder is a programming language your users never asked to learn Every condition is syntax, every unhandled edge case is a bug they'll file. So my opinion hasn't moved: keep the engine boring, deterministic, tested code, and derive the configuration from the systems that already know the answer, editable in plain language. That is what ledgerloop does with the HRIS, and what the components in approvals-ui model directly: quorum gates, amount thresholds, and a policy lint th
AI 资讯
JetBrains Details Its First Steps to Bring Rapidly Growing AI Spend Under Control
JetBrains has described how it began centralising AI usage after development-related spending increased roughly tenfold in six months. Rather than restricting engineers to a small set of approved tools, the company built a shared access and accounting layer intended to preserve tool choice while giving teams greater visibility and control over consumption. By Matt Foster
AI 资讯
Where Will Durable AI Competitive Advantage Accrue?
The Supply Chain of Intelligence framework: The best structural answer to the question every...
AI 资讯
Instant Payments Risk Management: What Every Fintech Developer Should Know
The rise of instant payment networks has changed the way money moves. Transactions that once took hours—or even days—now settle in seconds. Whether it's FedNow, RTP, UPI, or other real-time payment systems, users expect payments to be fast, available 24/7, and completed almost instantly. For developers and fintech teams, however, speed creates a new challenge. When payments settle in real time, there's little opportunity to detect fraud, reverse errors, or manually review suspicious transactions. That makes instant payments risk management one of the most important aspects of building modern payment applications. Real-time payment systems leave only seconds to make fraud, compliance, and operational decisions before settlement becomes final. Why Instant Payments Change Everything Traditional payment systems often include a processing window where transactions can be reviewed before settlement. Instant payments remove that safety net. Once a payment is authorized and processed, the funds are typically transferred immediately. If a fraudulent transaction slips through, recovering the money becomes significantly more difficult. That's why payment platforms must shift from reactive fraud detection to proactive risk prevention. What Is Instant Payments Risk Management? Instant payments risk management is the combination of technologies, policies, and automated decision-making that helps businesses detect and reduce risks before an instant payment is completed. Instead of reviewing transactions after settlement, modern payment systems analyze risk while the payment is being processed. Typical risk management includes: Real-time fraud detection Identity verification Device and behavioral analysis Transaction monitoring Sanctions and compliance screening Velocity and limit controls Continuous risk scoring Every one of these checks must happen within milliseconds without creating noticeable delays for legitimate users. Why Traditional Fraud Rules Are No Longer Enough Older p
AI 资讯
I blocked XSS attacks and API Key extraction in the browser by monkey-patching `crypto.subtle`. Why isn't everyone doing this?
Here is how I hardened the browser runtime for a Zero-Knowledge, Non-Custodial FinTech trading terminal. 👇 Client-Side Envelope Encryption: I derive a KEK from the user's password using PBKDF2-SHA256 (310,000 iterations). Then, a secure random 32-byte DEK (AES-256-GCM) encrypts the data. The password NEVER touches the server, and the DEK has a strict 15-min TTL in RAM before a wipe. Secure Enclave Anti-Export Guard: CryptoKeys are generated via crypto.subtle with {extractable: false} . To prevent injected malicious scripts from bypassing the sandbox, I implemented an isolated closure that overrides (monkey-patches) the native browser API: crypto.subtle.exportKey = async function(format, key) { if (isProtectedKey(key)) { _AuditChain.append('EXPORT_ATTEMPT', 'CRITICAL'); throw new Error('Export BLOCKED — unauthorized'); } return _origExport(format, key); }; If our database is breached, hackers find ZERO financial data. If the local session is compromised, runtime gating blocks extraction. Plus, client-side validation rejects API keys with withdrawal permissions enabled (zero custodial risk under MiCA, built for GDPR). The entire architecture runs client-side (WebSocket throttled at 100ms + local AI Advisor), keeping server costs near zero. Where does this runtime isolation logic fail? Why do major SaaS platforms still rely on standard local storage? Let's discuss. 💬
AI 资讯
Beyond Borders: Building the Technology for a Caribbean Regional Stock Exchange
On July 27, 2026, the Caribbean Development Bank announced that it had approved a US$100,000 grant to the CARICOM Private Sector Organization to support the first phase of a study examining the feasibility and possible design of a regional stock exchange for participating states of the CARICOM Single Market and Economy. Together, the Caribbean Development Bank and the Inter-American Development Bank are contributing US$324,700 towards Phase I. [1] The proposed study will examine market demand, legal and regulatory requirements, international exchange models and the needs of public- and private-sector stakeholders. It will also consider how regional capital markets could become more connected, improve liquidity, lower financing costs and expand access to capital for Caribbean businesses. [1] These are important economic goals. However, achieving them would depend heavily on the technology supporting the exchange. More Than a Trading Website When people hear the term “stock exchange”, many may picture a website displaying company names, share prices and complex charts. This mental image is, by no means, incorrect, but it admittable fails to grasp the complex financial infrastructure that must be put in place to support a proper exchange. Behind the website with the complex charts, lies systems which process orders, match buyers to sellers, record and broadcasts trades, protect investor information and maintain an accurate history of every market. The birth of a regional exchange would require a great deal of thought, since it would need to operate across multiple Caribbean jurisdictions. Investors in Guyana, Jamaica, Barbados, Trinidad and Tobago and other participating states should be able to interact with the same market without the barrier of geography. This would require several closely connected systems, including: A high-performance order-matching engine Secure investor and broker portals Real-time market-data services Trade clearing and settlement infrastructu
AI 资讯
India moves to give its instant payments network a business model
The legislation lays the groundwork for a potential overhaul of India's zero-merchant-discount-rate regime, under which businesses have not paid fees to accept UPI payments since 2020.
AI 资讯
Orthogonality Is an Acceptance Test
A portfolio can look good on the usual scorecard and still answer the wrong question. One line says return was high. Another says risk-adjusted performance was acceptable. A third says drawdown stayed inside a tolerable range. Then the market turns, the benchmark starts recovering, and the thing I actually care about is different: how efficiently did the portfolio catch up? That is where a new metric can fool its own author. If I build a recovery measure and it moves almost exactly like an existing ratio, I have created a longer name for the same signal. The right acceptance test is geometric: a useful metric should cast a different shadow. This is the rule I used while validating Hyperlogarithmic Benchmark Catch-Up Ratio (HBCR): orthogonality to existing measures is a first-class test, not a chart for the appendix. 1. A new metric has to earn its axis HBCR was built to measure benchmark-relative recovery dynamics. The research page states the motivation plainly: traditional benchmark-relative metrics often fail to capture the true dynamics of investment performance, especially during market recoveries [ A New Metric for Private Equity Risk Adjusted Returns , Calibration of Risk and Correlation in Private Equity ]. That framing matters because the obvious validation path is tempting and weak. You compare the new number with familiar performance measures, find a comforting relationship, and declare victory. But a high correlation with a well-known score can be a warning. If HBCR strongly tracked Sharpe Ratio, it would probably be an expensive synonym for risk-adjusted return. The acceptance test I wanted was sharper. HBCR should have some relationship with performance, because recovery has economic content. It should also avoid collapsing into the same direction as Sharpe Ratio, Beta, Volatility, Alpha, Total Return, or Max Drawdown. Written as a predicate, the test has two sides. Let $\mathcal{T}$ be the set of metrics already on the scorecard, $\rho_{n,m}$ the corr
开发者
Atomic Money: Making a PHP/MySQL Wallet Safe Under Concurrency
The lost-update bug that quietly corrupts homegrown wallet balances — and the five disciplines we used across PayWithToken to make money movement correct under concurrency. There is a bug that lives in a large share of the world's homegrown wallet systems. It doesn't throw an error. It doesn't show up in tests. It surfaces months later as a balance that is quietly, inexplicably wrong — and in a payments system, a wrong balance is either a customer who has lost money or a company that has given it away. This is the story of that bug, why the "obvious" wallet code causes it, and the handful of disciplines we used across PayWithToken to make money movement correct under concurrency. The bug: lost updates Here is wallet code almost everyone writes first. Credit a user's balance: // DON'T do this $row = $db->query("SELECT balance FROM users WHERE id = $id")->fetch(); $new = $row['balance'] + $amount; $db->exec("UPDATE users SET balance = $new WHERE id = $id"); Read the balance, add to it in PHP, write it back. It works perfectly — until two things happen at the same time. Picture a wallet at ₦1,000. Two credits of ₦500 arrive simultaneously — say a bank webhook and the user tapping "confirm" on their phone: Request A reads balance = 1000. Request B reads balance = 1000 (A hasn't written yet). A computes 1500, writes 1500. B computes 1500, writes 1500. Two credits landed; the balance rose by ₦500. ₦500 vanished. This is a lost update, and it is a race condition, which means it is invisible until you have real concurrent traffic — exactly when you can least afford it. The debit version of the same bug lets a balance go negative or double-spends a token. Fix #1: let the database do the arithmetic The read-modify-write happened in PHP, across three round trips, with a gap where another request could interleave. The fix is to make the update a single atomic statement and let the database's row lock serialise it: // DO this — one atomic statement $db->prepare("UPDATE users SET
AI 资讯
Can AI Handle KYC? Grounding LLMs For Due Diligence Tools
#ai #kyc #compliance #duediligence #api #llm #fintech #rapidapi AI Writes Code. You Still Own the Verdict. ChatGPT can spin up a KYC dashboard in an afternoon. It will generate React components, SQL schemas, and swagger documentation that look production-ready. But ask it whether fintech-example.io is a legitimate payment processor or a sanctions-evasion shell, and it will confidently fabricate ownership records, misread registrar data, or hallucinate a clean bill of health. That is the gap AI cannot close on its own: grounding . Large language models reason over tokens, not truth. A reliable due-diligence or compliance tool must anchor every LLM answer in real, verifiable, timestamped data—WHOIS records, IP geolocation, company registries, email infrastructure, and sanctions lists. This article shows how to use the Portfolio Investigate API to feed your AI agents factual domain dossiers and compliance verdicts, turning a prototype into something a compliance officer can actually trust. The Hallucination Problem in Due Diligence LLMs are autocomplete engines. They predict what words should come next based on training data, not live facts. In a KYC context, that creates three failure modes: Stale knowledge — model weights freeze; a domain can change ownership next week. Fabricated citations — the model may invent registrar names or corporate addresses. Missing signals — an LLM has no built-in access to WHOIS history, IP blocks, or OFAC lists. The fix is not to abandon LLMs. It is to constrain them: give them a structured evidence packet first, then let them summarize, classify, and answer natural-language questions on top of it. That evidence packet is exactly what Portfolio Investigate API returns. What Portfolio Investigate API Delivers Portfolio Investigate API is a one-call domain investigation report. It aggregates five underlying portfolio APIs into a single dossier: WHOIS — registration dates, registrar, name servers, privacy status. IP Geolocation — where the
AI 资讯
Create God and Ask Him for Money
This is obviously a bubble Jim Rickards, a former adviser to the CIA and Pentagon, warns that the United States is currently facing a tectonic economic crisis driven by an unprecedented bubble in Artificial Intelligence (AI). According to his analysis, this impending crisis has the potential to be more destructive than the dot-com crash, the 2008 financial crisis, and the pandemic-related market crashes combined. He is not alone in his dire outlook; veteran investor Jeremy Grantham has warned, "This is obviously a bubble. The probabilities it doesn't burst are slim to none. And when it does, it could be an economic catastrophe unprecedented in the last 97 years" . Furthermore, former SEC Chairman Gary Gensler has stated that "the next financial crisis will come from AI". Create God and ask him for money The Unprecedented Scale of the AI Bubble The current market relies dangerously on a single sector, with the AI bubble estimated to be 17 times larger than the dot-com bubble of the late 1990s. Many AI companies are burning through cash at an alarming rate. For instance, OpenAI is reportedly losing more than a billion dollars a month; as it is noted in the source, "for every dollar they make, they have to spend at least three". This massive cash burn led a Deutsche Bank analyst to observe, "No startup in history has operated with losses on anything approaching this scale". Despite the astronomical costs and high valuations, OpenAI’s CEO was quoted as previously saying, "I have no idea how we're going to generate revenue". Former Goldman Sachs banker and Bloomberg columnist Matt Levine summarized this extreme speculative mindset, noting, "The business model they believe they need seems to be create God and ask him for money". "Subprime AI" and Toxic Debt Just as the 2008 financial crisis was fueled by toxic subprime mortgages, the AI boom is being fueled by dangerous debt structures used to fund massive data centers. Private equity firms are financing data centers as r
AI 资讯
yfinance NG=F Not Working? Why Natural Gas Futures Data Fails and 3 Fixes That Work
If your script suddenly started printing this: >>> import yfinance as yf >>> df = yf . download ( " NG=F " , period = " 1mo " ) 1 Failed download : [ ' NG=F ' ]: YFPricesMissingError ( ' possibly delisted; no price data found ' ) …you didn't break anything. NG=F (the natural gas futures ticker on Yahoo Finance) periodically stops returning data for everyone, and futures tickers get hit harder than stocks. This post covers why it happens and the three fixes that actually work, ordered from "quick patch" to "never deal with this again." 1. What the error actually means yfinance is not an official API . It's a (great) community library that scrapes Yahoo Finance's internal endpoints — the same ones Yahoo's own website uses. Yahoo doesn't document them, doesn't promise they'll keep working, and changes them whenever it suits their frontend. When Yahoo changes something — an endpoint, a rate limit, a response format — yfinance breaks until its maintainers reverse-engineer the change. Futures symbols like NG=F and GC=F are the most fragile: they've had recurring gaps and failures reported over the years, for example #2620 (missing recent data for NG=F/GC=F) , #2635 (whole missing days in futures history) and the evergreen #865 "Futures only work sometimes" . So: "possibly delisted" almost never means delisted. It means "the scrape came back empty." 2. Fix #1 — the quick patches (works today, breaks tomorrow) Three things fix most transient failures: Upgrade first. The maintainers usually patch Yahoo changes within days: pip install -U yfinance Retry with backoff. Failures are often intermittent rate-limiting, not hard breaks: import time import yfinance as yf def download_with_retry ( ticker , retries = 3 , wait = 5 , ** kwargs ): for attempt in range ( 1 , retries + 1 ): df = yf . download ( ticker , progress = False , ** kwargs ) if not df . empty : return df print ( f " attempt { attempt } came back empty, retrying in { wait } s… " ) time . sleep ( wait * attempt ) rai
AI 资讯
Stopping Runaway AI Loops: Implementing Enterprise FinOps and Observability with PolicyAware
Autonomous agents don't just fail loudly—they fail expensively. A single misconfigured retry loop between an agent and an LLM can generate thousands of redundant tool calls and API requests before anyone notices, turning a minor logic bug into a five-figure cloud bill. PolicyAware is built to be the operational safety net that catches this class of failure before it reaches your finance team's dashboard. 1. The Recursive Agent Crisis Every SRE and platform engineer who has run agentic workloads in production has a version of this story. An agent is wired to call an LLM, interpret the response, and take an action—often invoking another tool, which produces output that gets fed straight back into the same LLM. Under normal conditions this loop terminates in a few steps. Under a bad prompt, a malformed tool response, or a subtle logic error, it doesn't. The agent gets stuck reasoning in circles: it calls a tool, receives an ambiguous or malformed result, decides the task is incomplete, and calls the LLM again to "retry." Each retry consumes tokens, each tool call hits a downstream API, and there is no natural circuit breaker unless one has been explicitly engineered. Within minutes, a single stuck session can produce: Thousands of duplicate or contradictory API calls to internal and third-party services. Sustained LLM token consumption that dwarfs normal daily usage. Cascading load on downstream systems that were never designed for machine-speed request volume. By the time monitoring dashboards catch the anomaly—if they catch it at all—the damage is already done: a runaway bill, a rate-limited API partner, or a compromised production database from thousands of unchecked write attempts. Traditional APM tools tell you a service is under load; they don't tell you an autonomous agent is the one generating that load, or why. This is why the recursive agent crisis is fundamentally a governance problem, not just a monitoring problem. Rate limits and cost alerts fire after the
AI 资讯
Building an MCP Server on 31 Million Rows of Financial Data
This is the architecture of Shibui Finance , an MCP server that gives Claude direct SQL access to 64 years of US stock market data. About 10,000 symbols, 31 million daily price records, quarterly financials back to 1990, 56 pre-computed technical indicators, and 6.4 million SEC filing records. Free to use. Stack: Python, PostgreSQL, dbt, DuckDB, FastMCP, Caddy. Runs on a single VPS. Data pipeline Three stages: ingest into PostgreSQL, transform with dbt, export to DuckDB. Data APIs / SEC EDGAR / FRED | Python ETL (Polars, ADBC) | PostgreSQL clean_* schemas (~50 raw tables) | dbt (27 models) staging -> integration schema (17 analytical tables) | DuckDB export (daily, ~14 GB file) | FastMCP server (read-only, streamable-http) | Caddy (TLS) -> mcp.shibui.finance Multiple sources feed the pipeline: commercial data APIs for prices, fundamentals, valuations, and estimates. SEC EDGAR for filing metadata and insider transactions (bulk historical + a 5-minute Atom feed for near-real-time). FRED for FX rates to normalize non-USD fundamentals. Public registries for ticker classification. The ETL is a Python CLI organized by data source. Each module has its own fetcher, loader, and CLI. A single all command runs everything in fixed sequence. You can't refresh 10,000 tickers daily without hitting rate limits, so the ETL rotates: each run refreshes the stalest 5% of tickers. Full universe cycles in about 20 runs. Recent prices always refresh on every run. Every table write is a single transaction. DROP + CREATE inside a transaction, rollback on failure. The database never serves partial data, and dbt always sees complete tables even when ingest jobs overlap. The dbt layer 27 models in two tiers. The process layer handles standardization: enriching symbols with security types and exchange mappings, linking SEC amendment filings to their originals, repairing filer date typos. The integration layer produces the 17 tables that Claude actually queries. This is where raw normalized tabl
开发者
An agent can burn a month's budget overnight. Mine gets stopped before the turn runs.
I run agents for many customers, on my own infrastructure, and I pay for every token they burn. You...