今日已更新 172 条资讯 | 累计 37723 条内容
关于我们

今日精选

HOT

最新资讯

共 37723 篇
第 1824/1887 页
AI 资讯 Dev.to

How to Stop Your AI Agent Before It Does Something You Can't Undo

By Umair Sheikh, founder of Gateplex Autonomous AI agents are shipping fast. LangChain, CrewAI, AutoGen — the frameworks are mature, the tutorials are everywhere, and developers are connecting agents to real systems: databases, payment APIs, email, file storage. And then something goes wrong. Not because the code is buggy. Because the agent did exactly what it was told — and what it was told turned out to be a problem nobody anticipated. I spent nearly a decade in fintech and responsible AI policy watching this pattern repeat. A system behaves perfectly in testing. In production, an edge case triggers behaviour that was technically correct but operationally catastrophic. By the time anyone notices, the action has already executed. The problem is not the agent. The problem is that there is nothing between the agent's decision and the real world. The gap nobody talks about Most agent observability tools log what happened. That is useful for debugging. It does nothing to prevent the next incident. What agents actually need is a governance layer — something that intercepts every action before it executes, checks it against your rules, and either allows it, flags it for review, or blocks it outright. This is what a firewall does for network traffic. Your AI agent deserves the same treatment. What this looks like in practice Here is a simple LangChain agent calling an external tool: from langchain.agents import initialize_agent , Tool from langchain.llms import OpenAI def send_payment ( amount : str ) -> str : # This actually moves money return f " Payment of { amount } sent " tools = [ Tool ( name = " SendPayment " , func = send_payment , description = " Send a payment " )] agent = initialize_agent ( tools , OpenAI (), agent = " zero-shot-react-description " ) agent . run ( " Send $5000 to vendor account " ) This works. It also has no guardrails whatsoever. If the agent misreads the input, hallucinates a vendor, or gets manipulated via prompt injection, the payment goes

Umair Sheikh 2026-05-28 23:38 6 原文
AI 资讯 Reddit r/webdev

Saas tos and liability

So im working on a saas and am wondering how most of you all handle ToS, liability, and where you get them from? Ill be storing customer data like addresses, emails, phone numbers in a db. Stripe for payment processing. I want to make sure i have a solid tos. To cover refunds, chargebacks, data stored in a db, etc… Should i just find a lawyer or are there resources online i can use? submitted by /u/spacedublin [link] [留言]

/u/spacedublin 2026-05-28 23:38 6 原文
AI 资讯 Dev.to

I Just Wanted to Scrape One Page. Why Did I Write 50 Lines of Puppeteer?

Last Friday at 4:30 PM, my product manager walked over: "Hey, can you grab the titles from the Hacker News homepage and send me an Excel file?" I thought: That's it? Five minutes tops. Two hours later, I was still debugging CSS selectors. How Things Spiraled Out of Control Step 1: Initialize the Project mkdir hacker-news-scraper && cd hacker-news-scraper npm init -y npm install puppeteer Hit enter, waited three minutes. Puppeteer needs to download a full Chromium browser — over 200 MB. I stared at the progress bar and started questioning my life choices. Step 2: Write the Code "It's just a document.querySelectorAll , right?" That's what I thought. Then I opened my editor: const puppeteer = require ( ' puppeteer ' ); ( async () => { const browser = await puppeteer . launch ({ headless : true , args : [ ' --no-sandbox ' , ' --disable-setuid-sandbox ' ] }); const page = await browser . newPage (); try { await page . goto ( ' https://news.ycombinator.com ' , { waitUntil : ' networkidle2 ' , timeout : 30000 }); await page . waitForSelector ( ' .titleline > a ' , { timeout : 10000 }); const titles = await page . evaluate (() => { const items = document . querySelectorAll ( ' .titleline > a ' ); return Array . from ( items ). map ( el => ({ title : el . textContent , url : el . href })); }); console . log ( JSON . stringify ( titles , null , 2 )); } catch ( err ) { console . error ( ' Scraping failed: ' , err . message ); } finally { await browser . close (); } })(); I counted: 27 lines. And this is the minimal version — no User-Agent spoofing, no retry logic, no proxy support, no concurrency control. Add all of that and you're well past 50 lines. Step 3: Run It node index.js Error: Navigation timeout of 30000 ms exceeded . Switched to domcontentloaded , got past that. But then waitForSelector timed out — because .titleline was a relatively new class name. Hacker News had silently changed it from .storylink at some point, and nobody sent me the memo. Step 4: Debug Set head

许映洲 2026-05-28 23:37 6 原文
AI 资讯 Dev.to

Amazon STAR Method 2026: The Complete Cheat Sheet (30+ Questions + Scored Examples)

If you're interviewing at Amazon this year, you've probably read that you need to "prepare STAR stories." What most guides don't tell you is exactly how Amazon uses STAR differently from every other company — and what interviewers are silently scoring you against while you talk. Here's the complete 2026 breakdown: the cheat sheet, the full question bank, scored example answers, and the four mistakes that get candidates rejected even when their stories are genuinely impressive. Why Amazon STAR Is Different Amazon evaluates every behavioral answer against its 16 Leadership Principles. This isn't just culture marketing — interviewers are trained to map your stories to specific LPs and give them discrete scores. A Bar Raiser isn't just listening; they're running a rubric. The STAR formula at Amazon has specific time allocations that most candidates ignore: Situation (10%): Set the context in 20–30 seconds max Task (10%): What was specifically your responsibility Action (50%): What you did — not your team, not your manager Result (30%): Quantified outcomes only That weighting is the whole game. Most candidates spend 60% of their answer on Situation and Task, then rush through Action and Result — which is exactly backwards from what gets high scores. The "I" Rule: The Single Biggest Reason Candidates Fail Bar Raisers flag one thing more than any other: candidates who say "we" during the Action phase. Weak answer: "We decided to refactor the codebase, and we deployed a caching layer to fix the latency issue." Strong answer: "I identified the bottleneck using distributed tracing. I proposed the Redis caching layer to my tech lead and personally implemented the proof-of-concept over a weekend before bringing it to the team." Amazon hires individuals. If you can't cleanly separate your contribution from the group's work, interviewers have no signal on whether you were the driver or just along for the ride. Every sentence in your Action phase should start with "I." 30 Amazon S

ManyOffer Career 2026-05-28 23:37 14 原文
AI 资讯 Dev.to

Building a Japanese-First Read-Later PWA: From Pocket Shutdown to Launch

When Mozilla shut down Pocket in July 2025, I lost my favorite tool. Worse, none of the English alternatives (Instapaper, Readwise, Matter, Raindrop) had Japanese UI, and their article extraction was mediocre on Japanese pages. So I built one. It's called Readbox — Japanese-first, English-too, read-later as a PWA. Here's what I learned shipping it. The stack Next.js 15 App Router + TypeScript strict (no any ) Supabase (Postgres + Auth + RLS) Stripe (JPY + USD prices, locale-routed) Tailwind CSS Service Worker for PWA install + offline read Three things that bit me 1. Article extraction on Vercel serverless First attempt: Mozilla Readability + jsdom. Doesn't bundle on Vercel because of ESM compatibility issues and the 50MB serverless function size limit. I tried 6 approaches — Webpack externals, dynamic imports, edge runtime — none worked cleanly. Ended up using Jina Reader , which returns clean Markdown/HTML from any URL. Trade-off: third-party dependency, rate limits at scale. But it works today, and it's free. 2. Storing article body on-device I didn't want to host millions of articles' worth of HTML on Supabase (cost + privacy). Solution: extracted HTML lives in the browser's IndexedDB only (via Dexie); only metadata (URL, title, tags, read status) syncs to the server. Trade-off: cross-device sync of body content doesn't work seamlessly. Acceptable for a "read it later" workflow where you usually read on the device you saved on. 3. i18n routing — the silent sitemap killer For Japanese + English from one codebase: app/[locale]/ segment with /en prefix for English (default Japanese has no prefix, to preserve old URLs). Middleware detects cookie / Accept-Language and redirects accordingly. The gotcha (cost me a launch-day hour): middleware matcher excludes _next , api , image extensions — but if you forget .xml/.txt/.webmanifest , sitemap.xml and robots.txt get rewritten to /ja/sitemap.xml (which doesn't exist as a route → 404). Fix: export const config = { matcher

SHOTA 2026-05-28 23:31 15 原文
AI 资讯 Dev.to

How to show weather on your personal website in 3 lines of JavaScript (no API key needed)

I got tired of explaining to people why their "simple weather widget" needed an API key, a signup form, and a credit card. So I built a weather API that doesn't need any of that. Here's how you can add live weather to your personal website, portfolio, or side project in about 60 seconds. The old way (painful) Most weather APIs make you: Create an account Verify your email Generate an API key Paste that key into your code Worry about rate limits Get an email when your "free tier" expires For a weather widget on a personal site? That's overkill. The Nimbus way (one fetch, done) I made a public API that doesn't need keys. Just call it. fetch ( ' https://nimbus-api-gxuc.onrender.com/api/v1/weather?city=Berlin ' ) . then ( response => response . json ()) . then ( data => { console . log ( data ); }); That's it. No headers. No tokens. No signup. Real example: Put it on your site Here's a working snippet you can drop into any HTML page right now: <div id= "weather-widget" > <p> Loading weather... </p> </div> <script> fetch ( ' https://nimbus-api-gxuc.onrender.com/api/v1/weather?city=Berlin ' ) . then ( res => res . json ()) . then ( data => { const weatherHtml = data . temp_celsius + ' °C • ' + data . description + ' <br>Wind: ' + data . wind_speed_kmh + ' km/h • Humidity: ' + data . humidity_percent + ' % ' ; document . getElementById ( ' weather-widget ' ). innerHTML = ' <strong> ' + data . location + ' </strong><br> ' + weatherHtml ; }) . catch ( function () { document . getElementById ( ' weather-widget ' ). innerHTML = ' <p>Weather not available right now</p> ' ; }); </script> Change Berlin to any city. It works. Why did I build this? Because I got tired of closed source APIs that change their pricing every 6 months. Nimbus is open source. The code is on GitHub. You can read it, fork it, or run your own version if you don't trust me. The API is free because hosting a weather endpoint costs me almost nothing, and I'd rather lose money than put up a paywall. Try it righ

Kareem Al-Farsi 2026-05-28 23:31 9 原文
AI 资讯 The Verge AI

The secret to Roku’s success: not being cool

This is Lowpass by Janko Roettgers, a newsletter on the ever-evolving intersection of tech and entertainment, syndicated just for The Verge subscribers once a week. Roughly 10 years ago, someone told me that Roku was making "cheap hardware to sell to Walmart customers in flyover states." The remark was meant to be an insult, belittling […]

Janko Roettgers 2026-05-28 23:30 17 原文
AI 资讯 Reddit r/artificial

Things that AI cannot do which are surprising.

Hi, What are the things that surprised you that AI cannot do? Would you please also mention what is your work, since i assume most of this thread are coders etc? Ill start here. I work in corporate finance. Doing tons of stuff left and right. AI cannot do finance or accounting..... almost at all. Hundreds of billions on the line, every CEO and their mother pushing AI and nothing major happened. Sure, if you are just a link in chain where you receive the same excel sheet and produce the same powerpoint you are replacable but there are very few people like that anymore left in finance corps. However, if you just receive accounting memo written by random people AI is useless, if you receive bunch of random files and have to come up with valuation AI is useles, if you need to migrate product to a new system AI is useless........... so on and so forth. Hope i dont start a war where everybody is gonna be mad at this. submitted by /u/Zoltan1251 [link] [留言]

/u/Zoltan1251 2026-05-28 23:25 6 原文
AI 资讯 Product Hunt

GPS

Memory layer for LLMs that stores repo rules + past lessons Discussion | Link

2026-05-28 23:05 5 原文