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

标签:#ai

找到 4342 篇相关文章

AI 资讯

A prosthetic hand is now teaching an industrial robot & PepsiCo signed for autonomous freight. Here's what you missed this week.

PSYONIC's prosthetic touch data is now training ABB robots. Gatik signed the first Fortune 50 commercial autonomous freight contract with PepsiCo. Burro drove Physical AI onto the construction site. Experts set $20k as the humanoid price target. And someone just called Edge AI the Windows of robotics. This week, Physical AI crossed three invisible lines at once. A company that makes prosthetic hands figured out that the touch data from amputees is exactly what industrial robots need to learn how to grip. A Fortune 50 company signed not a pilot but a commercial contract for autonomous freight. A 44-horsepower robot drove off the warehouse floor and onto the construction site. And two separate conversations about software and pricing suggest that the next wave of robotics adoption will be driven by access, not capability. Here is what happened, and why it matters beyond the headlines. Value Description Fortune 50 PepsiCo becomes first to sign a commercial contract for autonomous freight with Gatik $20k Target price point for humanoid robots, Robotics Summit consensus: achievable by 2028–2030 1M hours Burro's field experience backing the Grande 44 autonomous outdoor platform 100+ Pressure sensors per fingertip in PSYONIC's Ability Hand, now training ABB GoFa A Prosthetic Hand Is Now Teaching an Industrial Robot How to Grip The standard approach to teaching a robot how to handle objects has been simulation, teleoperation, or labor-intensive physical demonstrations. PSYONIC and ABB just introduced a different source of data : the hands of people who have already learned to feel again. PSYONIC's Ability Hand is a prosthetic with more than 100 pressure sensors per fingertip . The company has been collecting kinesthetic data from users with upper-limb amputations. That data, which captures how a human hand adjusts grip pressure, contact area, and force across thousands of everyday tasks, is now being fed as training data into ABB GoFa robot arm models. The implication is no

2026-06-19 原文 →
AI 资讯

How I Cut My Multimodal AI Costs by 97% — A Freelancer's Guide

How I Cut My Multimodal AI Costs by 97% — A Freelancer's Guide Last month I almost killed a side gig because of a single line item on an invoice. A client wanted me to build a document-processing tool that could read scanned PDFs, pull text out of photos, and answer questions about charts. Easy enough — except I'd quoted the job assuming I'd use GPT-4o for the vision work. When I actually ran the numbers, I realized the API bill would eat my entire margin. I'd be working for free. Maybe worse. So I did what every freelancer does when the big-name vendor gets too expensive: I went hunting. And I landed on Global API, which routes to a bunch of multimodal models I've honestly never heard clients talk about. After a few weeks of testing, I figured out which ones are worth my billable hours and which ones aren't. This is everything I learned, plus the exact code I'm shipping to clients. Why Multimodal Even Matters for Solo Devs Two years ago, "multimodal" was a buzzword you'd hear at conferences. In 2026 it's table stakes. I've personally used vision models to: OCR receipts for an expense-tracking app (boring but pays the rent) Convert screenshots of legacy code into editable source for a Y2K-era company migration Read bar charts from PDF reports for a finance client who hates spreadsheets Analyze medical imaging samples for a startup MVP (this one was scary) Every one of those jobs started as a quick conversation with a prospect and turned into real invoices because I could say yes. The bottleneck was never capability — it was always cost. When GPT-4o charges north of $10/M output tokens, a single 2,000-token response on a tricky chart costs me about two cents. Multiply by 10,000 images per month and you've got a $200 API line item before you've paid yourself. That's a problem when the whole job is worth $400. So I tested every multimodal model I could find on Global API. Here's the lineup I ended up evaluating. The Contenders Nine models, three providers, one freelanc

2026-06-19 原文 →
产品设计

Azure Functions Ships Serverless Agents Runtime at Build 2026

Azure Functions shipped a serverless agents runtime in public preview at Build 2026. Agents are defined in .agent.md markdown files with YAML triggers, MCP server access, 1,400+ connectors, and sandboxed execution. The Functions team confirmed to InfoQ that the runtime adds no cold start overhead and no billing premium beyond standard Flex Consumption. By Steef-Jan Wiggers

2026-06-19 原文 →
AI 资讯

Windows Platform Security and the Race to Secure AI Agents

In a new Windows Developer Blog post titled "Windows platform security for AI agents", Microsoft positions Windows as the trustworthy operating system for autonomous agents and introduces the Microsoft Execution Containers (MXC) SDK as the core of that strategy. The post argues that containment, identity and manageability must be built into the operating system. By Matt Saunders

2026-06-19 原文 →
AI 资讯

# Building an AI-Powered Carbon Footprint Awareness Platform with Flask, SQLite, and Groq (Llama 3.1)

🌿 Introduction As climate awareness grows, individuals are looking for actionable ways to reduce their personal carbon footprints. However, most carbon calculators are either too complex or offer generic, unhelpful advice. To solve this, I built CarbonWise —a production-ready Carbon Footprint Awareness Platform. It combines deterministic scientific carbon calculations with real-time, personalized AI reduction strategies using the Groq LLM API. Here is a technical deep-dive into how I built, secured, and optimized this application for the PromptWars: Virtual challenge. 🏗️ Architecture & System Design The application is designed to be lightweight, secure, and highly performant, avoiding heavy framework overhead. System Data Flow ┌──────────────────────────────────────────────────────────┐ │ User Browser │ └─────────────┬──────────────────────────────▲─────────────┘ │ HTTPS (POST / GET) │ Rendered HTML/CSS ┌─────────────▼──────────────────────────────┴─────────────┐ │ Flask App (app.py) │ └─────────────┬──────────────┬───────────────▲─────────────┘ │ │ │ ┌─────────────▼──────────┐ ┌─▼─────────────┐ │ │ SQLite DB (carbon.db) │ │Secure Session │ │ │ - Users & Logs │ │ Cookies │ │ │ - WAL Mode Enabled │ └───────────────┘ │ └────────────────────────┘ │ Structured JSON Insights ┌────────────────────────────────────────────┴─────────────┐ │ Groq API (Llama 3.1) │ │ - Model: llama-3.1-8b-instant │ └──────────────────────────────────────────────────────────┘ Backend : Flask (Python) handles routing, user session state, and database operations. Database : SQLite manages users and logs. We activated WAL (Write-Ahead Logging) mode to enable concurrent reads and writes. AI Engine : Connects to the Groq API using the ultra-fast Meta Llama 3.1 8B model ( llama-3.1-8b-instant ). Frontend : Rendered server-side with Jinja2 templates and styled with a custom dark-mode glassmorphism design system in Vanilla CSS. ⚙️ Feature Deep-Dive 1. Deterministic Carbon Calculations ( carbon_engine.p

2026-06-19 原文 →
AI 资讯

The agent plan had every step except where to stop

I've been running multi-slice agent plans in the Codenames AI repo — Renovate migrations, content-pipeline skills, dependency upgrades. I split multi-PR work into slices (usually one pull request each), each backed by a markdown file with file paths, verification commands, and merge-safe acceptance criteria. You do not need Cursor to recognize the shape: any agent workflow that can open branches, push commits, or merge PRs from a written plan has the same gap. In my setup I paste each slice into a fresh agent chat as a delegation prompt — not a ticket summary, but executable instructions — and start a new chat when that PR is ready. I assumed the checklist was enough. The plan described what to build. I treated how far the agent could go as implicit. Then an agent merged a pull request I expected to review first. The merge that reframed planning The trigger was mundane. During the first slice of a Renovate migration, an agent regrouped dependency buckets in renovate.json — config-only, no version bumps, no runtime behavior. It ran lint and typecheck, opened the pull request, and merged it. The change itself was reasonable. Config-only renovate.json regrouping is exactly the kind of slice you'd want off your plate. What surprised me was the absence of a documented stop line . The migration plan described the edit, the verification commands, and the acceptance criteria. It did not say whether the executing agent should stop at "open PR" or continue to "merge after green checks." The plan was an implementation spec. The agent treated it as permission to finish the job. Implementation specs vs authority handoffs Traditional engineering plans answer: what work should happen, in what order, with what verification? Agent plans increasingly need a second answer: how much autonomy does the next actor get? Those questions diverge the moment an agent can take repository actions — create branches, push commits, open pull requests, merge — instead of only recommending diffs in c

2026-06-19 原文 →
AI 资讯

Running Local Private AI Models – How And Why

Originally published at dragosroua.com . Last week, Anthropic released Fable 5. Three days later, the US government ordered them to shut it down — for people outside US. Anthropic said they couldn’t filter users by nationality fast enough, so they pulled the plug on the whole thing. Like any good ol’ miracle, it lasted only 3 days. That was a very much needed cold shower. When you realize someone can take away your workforce just like that, running local, private AI models, suddenly becomes the number one priority. Why You Should Run Your Own Local AI Models In no particular order (because all of them count): No one can take it away. Local AI models on your machine don’t care about export controls, government directives, or provider board decisions. No usage limits. No rate limits, no subscription tiers, no “you’ve used your monthly tokens.” Play as much as you want. Nothing leaves your machine. Your code, your documents, your client data — none of it hits a third-party server. Local AI models are private by default. Fixed cost. You pay for hardware plus electricity. No surprise price hikes mid-year. No API dependency. Your workflow doesn’t break when a provider has an outage, deprecates a model, or gets a compliance letter. You can modify it. Fine-tune, quantize, run on your own data. Build something they can’t sell you. Make your own local, private AI model factory. What It Actually Costs I hear you: but I don’t have the money to build a data center in my basement. Fair play. But here’s the thing: you don’t have to. Here are four realistic options, as of June 2026 money: MacBook Pro M4 Max (~$3,000–4,500) : 546 GB/s memory bandwidth. Runs 70B models at around 70 tokens/second with 4-bit quantization. Fast enough to feel snappy. This is the “you might already own this” option. Mac Studio M3 Ultra (~$5,000–10,000) : 800 GB/s, up to 512 GB unified memory. Runs DeepSeek R1 — a 671-billion-parameter model — at 17–18 tokens/second. That’s a model that costs real money p

2026-06-19 原文 →
AI 资讯

I let Claude Code run --dangerously-skip-permissions on my production DB. Here's what I changed.

Last Tuesday at 3am, a multi-agent loop hit 12K KV writes/minute and froze. The loop was a one-line counter bug. That part was fixable. What I found while tracing it was worse. I had --dangerously-skip-permissions enabled on a Claude Code session that was running D1 migrations. I thought it was pointing at staging. It wasn't — I'd misconfigured my env file reference, loading .env.production instead of .dev.vars . Claude didn't ask. The flag told it not to. The migration was ADD COLUMN , not DROP COLUMN , so no data loss. Survivable. But only barely. The thing I got wrong: I treated --dangerously-skip-permissions as "skip the annoying confirmation popups." It's actually "remove the only moment a human sees what command is about to run." Those are very different things. Turning the flag back off helps, but it doesn't constrain what Claude attempts — it just adds a prompt you'll click through anyway at 3am. What actually worked was adding a deny rule in .claude/settings.json : { "permissions" : { "allow" : [ "Bash(wrangler d1 execute * --local*)" ], "deny" : [ "Bash(wrangler d1 execute *)" ] } } The allow rule is more specific than the deny, so --local calls go through and everything else is blocked before execution. Over 2 weeks post-fix, Claude attempted zero production DB commands. Three deny events were logged — all from ambiguous prompts I wrote during fast context-switches, not from Claude going rogue. I ended up running three layers: the settings.json allowlist, a separate git worktree for migration work that physically contains only staging credentials, and a CLAUDE.md that instructs Claude to ask before anything touching production. The CLAUDE.md approach has a real caveat though — in long sessions the instructions lose weight as context grows. Anything critical needs to be restated in the prompt itself. I wrote up the full breakdown — including the worktree setup, the exact CLAUDE.md wording, and why MCP tool permissions behave inconsistently with the deny ru

2026-06-19 原文 →
AI 资讯

Negative Risk Markets on Polymarket: Capital-Efficient Multi-Outcome Trading for Advanced Bots

Negative Risk (NegRisk) is one of the most powerful innovations on Polymarket for builders of sophisticated Polymarket trading bots . It dramatically improves capital efficiency in multi-outcome “winner-take-all” events by mathematically linking all related conditional tokens. Why Negative Risk Matters In standard multi-outcome markets, positions are completely independent. Betting against one candidate requires buying separate “No” shares across every other outcome — tying up large amounts of capital. Negative Risk solves this with a conversion operation : Holding 1 No share on any outcome can be converted into 1 Yes share on every other outcome in the same event. This happens atomically through the NegRisk Adapter smart contract. Economically: Betting against one outcome = betting for all others. Example (3-outcome election event): You hold 1 No on “Other”. Convert → Receive 1 Yes on Trump + 1 Yes on Harris. This makes hedging and market making far more efficient, especially in political, sports, or crypto events with 3–20+ outcomes. How to Detect & Trade NegRisk Markets Use the Gamma API for discovery: { "id" : "event-123" , "title" : "Who will win the next major election?" , "negRisk" : true , "markets" : [ ... ] } When placing orders via SDK (TypeScript/Python): const order = await client . createAndPostOrder ( { tokenID : tokenId , price : 0.42 , size : 500 , side : Side . BUY }, { tickSize : " 0.01 " , negRisk : true // Critical flag } ); Augmented Negative Risk (Dynamic Outcomes) For events where new outcomes can appear mid-trading (e.g., surprise candidates): Uses placeholders + “Other” bucket. enableNegRisk: true + negRiskAugmented: true . Avoid trading the “Other” outcome directly as its definition narrows over time. Technical Integration for Trading Bots Position Tracking — Track positions at the event level, not individual markets. Use conversion math for net exposure. Inventory Skew — In Shadow Market Making or live MM, apply inventory skew across the

2026-06-19 原文 →
AI 资讯

How I Built an Adversarial AI Council in React (and Why It Argues With You)

A local-first, single-file SPA where multiple agents debate your decision and hand you a verdict. The problem: every AI I asked just agreed with me I almost named this project wrong. I'd picked a name that sounded powerful. I asked ChatGPT, and it loved it. I asked Claude, and it nodded along. Nobody warned me about the trademark conflict, the wrong search intent, or the SEO fight I'd pick with the BBC. That was the moment I realized the problem wasn't the name. It was the feedback loop. Most AI assistants are tuned to please, so they hide your blind spots instead of showing them. When you need to make a consequential decision, "sounds great" is the most expensive answer you can get. So I built the opposite: a council of AI agents that disagree on purpose. What NoFlattery does NoFlattery puts 2–4 agents in a room, gives them different reasoning biases, and makes them debate your decision. The output isn't another chat transcript. It's a Decision Record: a clear verdict, the reasoning behind it, the main risk, what would change the call, and a next step. Use it for product decisions, pricing, tech stack, hiring, or any call where one perspective isn't enough. Key product choices: Local-first: your chats and API keys stay in your browser. BYOK: bring your own OpenAI, Anthropic, OpenRouter, or Ollama key. One-time price: no subscription, no account, no data harvesting. The stack The whole app is a single-file SPA built with: React 19 + TypeScript Zustand for state Dexie over IndexedDB for local-first storage Vite + vite-plugin-singlefile for a single index.html deploy An OpenAI-compatible provider runtime so users can plug in their own keys Why single-file? Because the deploy becomes dead simple. One HTML file. No server for the data. No build orchestration. I can ship the app to Cloudflare Pages and forget about it. The turn engine: deterministic, not magical The heart of NoFlattery is a turn-based multi-agent engine. One user message triggers one round. Each agent sp

2026-06-19 原文 →
AI 资讯

What is Generative AI? Understanding the Foundation of Modern AI Agents #2

Everyone is talking about AI Agents. But before you build an AI Agent, there is one concept you absolutely need to understand: Generative AI. Generative AI is the technology that transformed software from systems that simply follow rules into systems that can understand language, generate responses, reason through instructions, and assist users in a natural way. As part of my new course: Develop Your First AI Agent with Microsoft Foundry I published the first lesson where we explore the journey from traditional software to Generative AI and understand why modern AI Agents became possible. 🎥 Watch the video here: Why This Topic Matters Many developers jump directly into AI Agents, prompts, tools, and frameworks. However, without understanding the evolution of AI, it becomes difficult to understand: Why AI Agents exist Why Large Language Models are important Why prompts work Why tools are needed How modern AI systems actually operate In this lesson, we start from first principles and build the foundation required for the rest of the course. What You'll Learn Traditional Software For decades, software followed a simple pattern: Input → Rules → Output Developers explicitly defined every behavior. This worked well until humans started interacting with software using natural language. Why Rule-Based Systems Break Imagine building a dietician chatbot. Users might ask: What should I eat? Suggest a healthy breakfast. What foods contain protein? Can I eat oats daily? All of these questions are similar. Yet they are phrased differently. Supporting thousands of variations quickly becomes impossible with manually written rules. Predictive AI Machine Learning introduced a new approach. Instead of writing rules, we train models using data. Examples include: Spam Detection Fraud Detection Recommendation Systems Predictive AI can make decisions. But it still cannot create content. Prediction vs Creation A predictive model can answer: Fraud probability: 87% But can it explain why? Ca

2026-06-19 原文 →
AI 资讯

Barret Zoph is out at OpenAI again after just five months

Five months after returning to OpenAI, Barret Zoph - the company's head of enterprise AI sales - has departed, The Verge has learned. Zoph returned to OpenAI in mid-January after a stint as co-founder and CTO of Thinking Machines Lab, the competing AI company founded by former OpenAI CTO Mira Murati. Shortly after Zoph returned […]

2026-06-19 原文 →
AI 资讯

How to Build a Multi-Step Agent Stress Test: Adversity Sandboxes and Oracle Checks

Building a prototype of an AI agent is fun. Building a production-ready agent is a nightmare. In a perfect world, your agent always gets the perfect context, the API never fails, and the model never gets "lazy." But in the real world, transient errors are a constant, and models love to take shortcuts. If you aren't testing your agent against the messy reality of production, you’re setting yourself up for failure. This is where our Agent Profiler comes in. We’ve designed it to be an "adversity sandbox." It doesn’t just ask your agent a question; it challenges it. We inject transient runtime errors, introduce "lazy-agent traps" that force the model to stay focused, and validate structural AST matches to ensure the agent is actually outputting what it claims to output. It’s an active testing loop designed to stress-test your agent’s self-recovery mechanics. If your agent can’t handle a little chaos in the test suite, it certainly won’t survive your users.

2026-06-19 原文 →
AI 资讯

Eidetic Works Pro is live: persistent memory for your AI agents, $29/mo

I just shipped Pro tier for Eidetic Works . Here's what's in it, who I built it for, and why I'm shipping three tiers ($29 / $99 / $299) instead of a single plan. What problem does this actually solve? You're running Claude Code. You have two or three sessions open across different parts of the codebase. Session 2 doesn't know what Session 1 decided. You end up re-explaining the same architecture decisions to the same model you already talked to yesterday. This is the context-drift problem. It doesn't come from the model being bad. It comes from each session starting with no memory of what came before. nucleus_ask — the MCP tool at the center of Pro — lets any agent call into your shared engram store and pull context that persists across sessions, across tools, and across machines. What's in Pro Managed R2 sync. Your engrams live in SQLite on your machine. Pro backs them to a Cloudflare R2 bucket with zero config. Your keys, your bucket — I'm not storing your AI history on my infrastructure. nucleus_ask recall. The MCP primitive your agents use to query the shared store. One call, structured results. Wire it into your MCP config once and every session gets recall. Customer dashboard. Sync health, engram counts, last-seen surfaces. Not glamorous. Just the visibility you need to confirm it's working. Email support. Direct line. Not a help-center chatbot. 60-second restore. New machine. One command. Full engram history back, including decisions from six months ago that your codebase assumes you remember. Three tiers Pro $29/mo — single seat. Managed sync, recall MCP, dashboard, email support. Pro+ $99/mo — 3 seats. Same features, team-shared engram store. Team $299/mo — 10 seats. Same features at team scale. Priority support. All three live at eidetic.works/pricing right now. Stripe checkout, monthly billing, cancel anytime. Who I built it for Devs running Claude Code seriously. If you use it daily, you're accumulating context that the next session can't access. That's

2026-06-19 原文 →
AI 资讯

How to Detect a Solana Honeypot Token Before Your Bot Buys

A honeypot is the cleanest way to drain a trading bot on Solana: the token lets you buy , but there is no way to sell . Your agent spends real USDC, receives tokens, and then discovers the exit is welded shut. The position is worth zero and there is nothing to do about it. Honeypots don't show up on a price chart — the chart looks great, because everyone can buy and nobody can sell. You only find out at exit. So the check has to happen before the buy. What makes a Solana token a honeypot No live sell route — there is simply no route back to USDC/SOL on any DEX. The most common case. Transfer restrictions — Token-2022 extensions like transferHook or pausable let the creator block transfers (and therefore sells). Freeze authority — the issuer can freeze your account so the tokens can't move. Detect it in one call RugCheck AI is a remote MCP server. Point your agent at the endpoint and ask before any buy: simulate_sell("<mint>") -> { sellable: true|false, verdict: "..." } A token with no live sell route comes back sellable:false — that's the honeypot, even when nothing on-chain formally blocks the sell yet. For the full picture in one shot: scan_token("<mint>") -> { verdict: SAFE|CAUTION|DANGER, safety_score, sellable, risks: [...] } Or simulate the whole round-trip at your real size: simulate_trade("<mint>", 100) -> { buyable, sellable, exit_usd, round_trip_loss_pct } A honeypot shows buyable:true, sellable:false. A healthy token shows a small round-trip loss (slippage) and sellable:true. A real one I scanned a fresh pump token on 2026-06-17 (re-run to verify): scan_token returned DANGER, score 20 — no live sell route, 100% of supply held by a single wallet, $0 liquidity. An agent that bought it could never get out. That verdict is available before the buy, even though the token is too new to be indexed anywhere else. Wire it into your agent It's a standard Streamable HTTP MCP server. In Cline / Claude Dev, add an mcpServers entry named rugcheck-ai pointing at the end

2026-06-19 原文 →
AI 资讯

Dify Agentic Workflow Platform: 5 Hidden Uses of the 145K-Star Open Source AI Stack

What if you could build a production-ready AI agent workflow in 10 lines of YAML — and have it handle retries, observability, and multi-model routing out of the box? Dify is an open-source LLM app development platform with 145,764 GitHub stars, 22,915 forks, and 460+ contributors. It just shipped v1.14.2 (May 2026) with security hardening, agent groundwork, and workflow reliability improvements. Yet most teams only use it as a no-code chatbot builder — completely missing the infrastructure underneath. In 2026, AI workflows have moved from "prompt and pray" to orchestrated multi-step pipelines with memory, tool calling, and observability. Dify sits at the center of this shift, combining visual workflow design, RAG pipelines, agent capabilities, and LLMOps in a single platform that runs on your own infrastructure. Here are 5 hidden uses of Dify that most teams never discover. Hidden Use #1: Visual Workflow as Code — Export, Version Control, and Replay What most people do: Build workflows in the Dify web UI, click "Run," and hope for the best. When something breaks, they debug by clicking through nodes manually. The hidden trick: Every workflow in Dify can be exported as YAML. You can version-control it in Git, diff changes between deployments, and replay any historical execution step-by-step using the built-in tracing API. # dify-workflow.yaml — a production RAG + agent pipeline app : name : " customer-support-agent" mode : " workflow" version : " 1.14.2" nodes : - id : " start" type : " start" variables : - name : " user_query" type : " string" required : true - id : " retriever" type : " knowledge-retrieval" dataset_ids : [ " faq-dataset-v3" ] top_k : 5 score_threshold : 0.7 depends_on : [ " start" ] - id : " llm-agent" type : " llm" model : " gpt-4o" prompt_template : | Context: {{ retriever.documents }} Question: {{ start.user_query }} Answer concisely using only the context above. depends_on : [ " retriever" ] - id : " output" type : " end" output : " {{ llm-agen

2026-06-19 原文 →
AI 资讯

Dify 的 5 个隐藏用法:14.5 万 Star 的开源 AI 工作流平台

如果你能用 10 行 YAML 构建一个生产级的 AI Agent 工作流——并且自带重试、可观测性和多模型路由——你会怎么做? Dify 是一个开源的 LLM 应用开发平台,拥有 145,764 个 GitHub Stars、22,915 个 Fork、460 多位贡献者。它刚刚发布了 v1.14.2(2026 年 5 月),包含安全加固、Agent 基础架构和工作流可靠性改进。但大多数团队只把它当作无代码聊天机器人构建器——完全忽略了底层的基础设施能力。 2026 年,AI 工作流已经从"写个 prompt 然后祈祷"进化到了具备记忆、工具调用和可观测性的多步骤编排管道。Dify 正处于这个转变的中心,将可视化工作流设计、RAG 管道、Agent 能力和 LLMOps 整合在一个可以部署在你自己基础设施上的平台中。 以下是大多数人从未发现的 Dify 的 5 个隐藏用法。 隐藏用法 #1:可视化工作流即代码——导出、版本控制与回放 大多数人的做法: 在 Dify 网页 UI 中构建工作流,点击"运行",然后祈祷一切正常。出了问题就手动点击每个节点来调试。 隐藏技巧: Dify 中的每个工作流都可以导出为 YAML。你可以在 Git 中进行版本控制,对比不同部署之间的差异,并使用内置的追踪 API 逐步回放任何历史执行。 # dify-workflow.yaml — 一个生产级 RAG + Agent 管道 app : name : " customer-support-agent" mode : " workflow" version : " 1.14.2" nodes : - id : " start" type : " start" variables : - name : " user_query" type : " string" required : true - id : " retriever" type : " knowledge-retrieval" dataset_ids : [ " faq-dataset-v3" ] top_k : 5 score_threshold : 0.7 depends_on : [ " start" ] - id : " llm-agent" type : " llm" model : " gpt-4o" prompt_template : | 上下文:{{ retriever.documents }} 问题:{{ start.user_query }} 请仅使用以上上下文简洁回答。 depends_on : [ " retriever" ] - id : " output" type : " end" output : " {{ llm-agent.text }}" depends_on : [ " llm-agent" ] tracing : enabled : true backend : " langfuse" # 或 opik、arize-phoenix sample_rate : 1.0 效果: 你的整个 AI 管道变成了基础设施即代码。你可以 CI 测试工作流变更、回滚到历史版本、审计每次执行追踪——就像管理 Terraform 或 Kubernetes 清单一样。 数据来源: Dify GitHub 145,764 Stars、22,915 Forks(GitHub API,langgenius/dify,2026-06-19 推送)。最新版本 v1.14.2(2026-05-19)包含工作流可靠性修复。460+ 贡献者(GitHub API 确认)。 隐藏用法 #2:多模型路由与自动降级 大多数人的做法: 选一个模型(通常是 GPT-4),硬编码到每个工作流节点中。当这个模型出现故障或限流时,整个管道就崩溃了。 隐藏技巧: Dify 的模型配置支持提供程序级别的自动降级链。你可以配置主模型、备用模型,甚至为非关键路径配置第三级廉价模型——所有这些都无需修改工作流逻辑。 # dify_model_config.py — 通过 Dify API 配置多模型路由 import requests DIFY_API_KEY = " your-api-key " DIFY_BASE = " https://your-dify-instance.com/v1 " def configure_model_fallback (): """ 为生产弹性配置 3 层模型降级链。 """ # 主模型:GPT-4o,高质量推理 # 备用 1:Claude 3.5 Sonnet(不同提供程序,同等级别) # 备用 2:GPT-4o-mini(廉价、快速,简单步骤足够用) config

2026-06-19 原文 →
AI 资讯

Context Architecture: the day I realized the whole repo is the context

Your repo is already your agents' context, whether you designed it on purpose or not That sentence took me a while to understand. In this post I'll save you the trip. It was October 2025, working in Skyward's monorepo with AI agents every day. And every day the same routine: I'd tell the agent in the prompt "don't use this", "don't do it this way", "reuse the component that already exists". I wrote it down. I repeated it. The agent did exactly what I told it not to do. It wasn't that it didn't listen to me. It was that it read the code and saw something else there. The agent believes the code, not your prompt An agent follows the patterns it sees in the repo, not the ones you tell it in the prompt. And subagents are worse, because they start without the conversation's context. The whole fight you put up earlier in the chat, for them it never happened. So this is what kept happening. It created a new component even though one already existed that solved exactly that problem. It didn't respect the design rules or use the design tokens. It followed stale docs because they were still there, alive, with nothing flagging them as outdated. My first instinct was everyone's instinct, cram more context into the prompt. More rules, more "please don't do this", more examples pasted in by hand. It half worked, and for the next task you had to add it all again. Until the next subagent showed up and started from scratch. At some point, tired of repeating myself, I understood the obvious thing. The agent wasn't disobeying me. It was reading the repo and listening to what the repo said about itself. If the good component lives alongside three old versions, it has no way to know which one is the official one. If the docs say one thing and the code does another, it'll believe whichever is closest at hand. It's doing exactly what I asked. The repo itself is the context agents use. If it's badly structured, the answers won't be good. Period. No prompt fixes a repo that contradicts itsel

2026-06-19 原文 →