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

标签:#architecture

找到 723 篇相关文章

AI 资讯

Your Free AI Tier Is Shared. Build the Gate.

This week, DEV is arguing about who reviews AI output ( discussion ). The community keeps asking the same question. My answer is different. Review the boundary first, not the output. The output is visible. The boundary is not. That is where the risk hides. Agents get the memory debates. The gateway gets none. A free AI tier is a shared service. It has a budget, a concurrency ceiling, and no SLA. Treat it that way. Put a gateway between your app and the model. The gateway owns the budget, the queue, and the breaker. MonkeyCode is an open source project. It offers free model access and a free server option. The free tier gives you a 10M token monthly budget. That number is a constraint, not a feature. Design around it before you build on it. Disclosure: This article was prepared as part of MonkeyCode's product outreach. Think of the free tier as a water pipe. The pipe has a fixed diameter and a monthly meter. Your app is a set of open taps. Without a valve, the meter empties fast and the pipe floods. The gateway is the valve. Direct calls look simpler. They are simpler for one request. They fail at the tenth. The gateway absorbs the variance. Your app never sees a 429. Your app never sees an empty budget. Constraints Three constraints define the design. First, the 10M token budget is monthly. It does not reset daily. It does not roll over. Second, the free server serializes work. Concurrency of one is a safe assumption. Third, there is no SLA. The endpoint can stall, throttle, or return 429 at any moment. These constraints are not bugs. They are the contract. A good architecture reads the contract. Then it shapes the data flow around it. Data flow The flow has six stages. The client sends a prompt to the gateway. The gateway checks the token budget. It enqueues the request. A single worker drains the queue. The worker calls the model endpoint. The response returns to the client. Add two escape paths. When the budget is empty, the gateway returns a fallback answer. Whe

2026-08-27 原文 →
AI 资讯

Local-First LLM Routing: A Decision Table for Latency, Secrets, and Offline Mode

A field-service team learns the hard way A field-service team built a support chatbot that sent every message to a cloud LLM endpoint. The design held until a technician drove through a tunnel, and the request queue grew into an eleven-minute backlog. The same week, a support ticket containing a customer's account number appeared in a third-party log because the payload was never classified. The fix was not a bigger cloud budget but a local-first router that decides where each request runs. Why cloud-first fails in three specific ways Latency is the first failure mode, because a round trip to a hosted endpoint adds network time on top of model time. Autocomplete-style features feel broken when every keystroke waits for a distant server instead of a local process. Secrets are the second failure, because any payload sent to a third party can leak into logs or vendor systems. Offline is the third, because a tablet in a tunnel simply has no route to the cloud. The decision table that replaces the either-or debate Local inference and cloud APIs are two legs of a routing policy, not a binary choice. Each request deserves an evaluation against the same conditions, and the table below captures those conditions. The router implementation in the next section turns that table into executable logic with a small Python module. The recent wave of free and cheap model announcements makes this decision more urgent, because every new endpoint adds another leg to the routing table. Condition Local model Cloud free server Payload contains PII Always Never Network unreachable Always Never Latency budget under 300 ms Prefer Avoid Task requires strong reasoning Avoid Prefer Local queue deeper than three Avoid Prefer Token budget nearly exhausted Prefer Avoid The table encodes a simple principle: privacy and availability win over capability. Capability wins only when the network is healthy and the payload is safe. The table also exposes the hidden assumption that a local model is always a

2026-08-27 原文 →
AI 资讯

Agent-to-Agent Discovery in SMESH: Why Coordination Isn't Enough Without Runtime Introductions

You can build a working agent mesh with QUIC transport, encrypted messaging, and decentralized coordination. Five processes can reinforce independent conclusions and let unsupported signals decay. The mesh works. Then you try to introduce it to another agent and discover you have no standard way to ask what the swarm can do. No retained task to retrieve after an internal signal expires. No interoperable progress stream. No cancellation contract. No artifact another framework would understand. SMESH is a Rust-based decentralized agent framework that hit this boundary. The author had built a society with no border crossing. The solution was Google's Agent2Agent (A2A) protocol, announced in April 2025 and moved under Linux Foundation governance in June 2025. A2A provides the missing public contract: a way for agents built by different vendors to discover one another, exchange messages, and collaborate without sharing private memory, tools, or internal plans. The Cold-Start Problem in Agent Meshes Traditional service meshes solve discovery with a central registry. Kubernetes has etcd. Consul has its catalog. Envoy has xDS. You register your service, get a DNS name or IP, and other services find you. This works because services are relatively static and the registry is the source of truth. Agent meshes are different. Agents are ephemeral, context-dependent, and often spawned on demand. They need to: Discover peers without a central registry Exchange capability metadata at runtime Negotiate protocols without pre-shared configuration Maintain security boundaries during introduction The coordination primitives (message passing, consensus, signal decay) assume agents already know about each other. Discovery is the layer below coordination. SMESH had the top layer working but no way to bootstrap the bottom layer without manual wiring. What A2A Provides A2A is not a coordination protocol. It is an introduction protocol. The spec defines: Discovery handshake : How agents announ

2026-08-27 原文 →
AI 资讯

Stop Designing Agentic AI Systems Backwards: Start With Constraints, Then Choose the Architecture

There is a pattern I keep seeing when designing Agentic AI systems. We start by asking: Which LLM should we use? Should we use LangGraph? Where can MCP fit? Should we build multiple agents? Do we need RAG? Should we add memory? Should every step be handled by an autonomous agent? These are useful questions. But they are often asked too early . The result can be an architecture that is technically impressive but operationally difficult, expensive, slow, and surprisingly hard to trust. A better approach is to reverse the order: Start with the product outcome. Define the constraints. Then design the architecture. Choose the tools last. I have found a useful way to structure those constraints around four dimensions: LCFE L — Latency C — Cost F — Failure E — Evaluation This is not a framework that says every agentic system must look the same. It is a way of forcing architectural decisions to start with the realities of the product rather than the capabilities of the technology. In this article, I’ll walk through a concrete incident-automation example and show how starting with constraints can completely change the architecture. 1. The "backwards" way of designing an agent Imagine we want to build an AI Incident Resolution Assistant for an engineering organization. The goal sounds straightforward: When a production incident is raised, the AI should investigate the incident, gather context, identify the likely cause, recommend or perform remediation, and verify the result. Now imagine the team starts with the technology. The first architecture might look like this: User / Incident | v ┌──────────────┐ │ Triage Agent │ └──────┬───────┘ | v ┌────────────────┐ │ Research Agent │ └───────┬────────┘ | ┌──────────────┼──────────────┐ v v v Logs Agent Metrics Agent Knowledge Agent | | | └──────────────┼──────────────┘ | v ┌─────────────────┐ │ Remediation │ │ Agent │ └────────┬────────┘ | v ┌─────────────────┐ │ Validation Agent│ └────────┬────────┘ | v Resolution It looks sophis

2026-08-27 原文 →
AI 资讯

From SOLID to Composition, Dependency Injection, and IoC: How Angular, Spring, and Node.js Differ

When learning Angular, Spring, and Node.js, I often came across terms like SOLID, Dependency Injection (DI), Inversion of Control (IoC), IoC Container, and Composition . At first, these concepts can feel like they are all the same thing. They are not. The key realization is: SOLID is about how we design software. Composition is about how we build larger systems from smaller pieces. Dependency Injection is a technique for providing those pieces. IoC containers automate that process. Understanding this relationship makes Angular, Spring, and Node.js architectures much easier to reason about. 1. SOLID Is a Design Principle, Not a Framework Feature SOLID is a collection of software design principles. For example, Single Responsibility Principle (SRP) says that a component should have a focused responsibility. Instead of having one class responsible for HTTP handling, database access, validation, email, and payment processing, we can separate those responsibilities: Controller ↓ Service ↓ Repository ↓ Database Each part has a focused job. Similarly, the Open/Closed Principle (OCP) encourages us to design components that can be extended without constantly modifying their existing implementation. These principles don't require Angular, Spring, or an IoC container. You can follow SOLID in plain JavaScript. 2. Composition Is the Bigger Idea Composition means: Build a larger behavior by combining smaller, focused pieces. This works in both functional and object-oriented programming. In functional programming: function A ↓ function B ↓ function C A larger function can be created by composing smaller functions. In object-oriented programming: OrderService │ ├── PaymentService └── EmailService OrderService is composed using other objects. The important relationship is often: HAS-A rather than IS-A For example: OrderService HAS-A PaymentService rather than: OrderService IS-A PaymentService This is one reason composition is often preferred over deep inheritance hierarchies. 3. Dep

2026-08-27 原文 →
AI 资讯

Understanding RCDA: A Strategic Approach to Managing Risk and Cost in Architecture

In today’s fast-paced digital world, organizations face a growing number of challenges in managing their enterprise architectures. Complex systems, rapid technological advancements, and evolving business needs make it difficult to maintain a balance between risk management and cost efficiency. This is where Risk and Cost Driven Architecture (RCDA) plays a pivotal role. What is RCDA? RCDA, or Risk Cost Domain Architecture, is a framework that helps organizations make informed architectural decisions by weighing the trade-offs between risk and cost. This approach enables architects to develop sustainable, resilient, and cost-effective solutions that align with business goals and technical requirements. By breaking down architecture into domains of risk and cost, RCDA provides a structured methodology to address uncertainties while optimizing investments. Why RCDA Matters Every architectural decision carries a degree of risk, whether it be technical, financial, or operational. These risks, if not properly managed, can lead to project delays, increased costs, and even system failures. Traditional methods of architecture design often focus on functionality and performance, leaving risk management as an afterthought. RCDA flips this approach by putting risk management and cost at the center of decision-making, ensuring that every aspect of the architecture is thoroughly evaluated from these two perspectives. RCDA is particularly beneficial in large-scale, complex systems where the stakes are high, and decisions must be made carefully. It allows architects to balance innovation with risk tolerance, ensuring that projects are not only delivered on time and within budget but are also resilient and adaptable to future needs. The Core Principles of RCDA Risk-Driven Decision Making: RCDA emphasizes identifying and assessing risks early in the architectural design process. These risks can include security vulnerabilities, performance bottlenecks, scalability issues, and more. By

2026-08-26 原文 →
AI 资讯

Loops vs Graphs: Why Agent Architecture Needs Both (and a Compiler Between Them)

The False Dichotomy The agent ecosystem is split into two camps: Camp Loops (Boris Cherny, OpenAI Agents SDK, LangGraph): > "Agents are loops. Plan → act → observe → repeat. The loop is the atomic unit." Camp Graphs (Steve Yegge, Gas Town, LangGraph DAGs, CrewAI): > "Agents are graphs. Nodes are agents/tools. Edges are handoffs. The graph is the architecture." Both are right. Both are incomplete. What Loops Get Right Loops capture temporal behavior — the iterative, self-correcting nature of agent work: - Replanning on failure (AdaPlanner, ReAct) - Budget enforcement (token caps, step limits, cost ceilings) - Verification gates (process reward models, extraction floors) - Learning loops (feedback → lessons → advisory → suppress) A loop is a control structure. It says: keep going until condition X. What Graphs Get Right Graphs capture structural composition — how capabilities connect: - Handoffs (peer-to-peer control transfer) - Parallel execution (swarms, polecats, fan-out/fan-in) - Supervision trees (Erlang/OTP-style restart strategies) - Provenance (who called whom, with what context) A graph is a dependency structure. It says: A feeds B, B feeds C, C can restart A. The Missing Layer: A Compiler Between Repos and Runtime Here's what neither camp addresses: Where do the nodes come from? Today: - You find a repo on GitHub - You hope it implements what it claims - You wire it into your graph/loop - You pray it works There's no verification layer. No SBOM. No attestation. No provenance. HURCULES: The Compiler Between Repos and Runtime HURCULES sits between the repository and the agent runtime: GitHub Repository → HURCULES → Verified Capability Package → Agent Runtime (Loop or Graph) It doesn't care if your runtime is a loop or a graph. It produces verified capabilities that work in either. What HURCULES Compiles | Input | Output | |-------------------------------|---------------------------------------------------| | Raw repo (any language) | Deterministic map (file tr

2026-08-26 原文 →
AI 资讯

Keenable: Agent-First Search API Architecture and the 100B-Page Index Trade-Off

Agents don't search like humans. They issue hundreds of queries per session, need structured extraction over snippet relevance, and care more about p95 latency than the perfect top result. Keenable built a search API around those constraints with a 100B+ page proprietary index, SQL-like query interface, and continuous benchmarking against agent-like workloads. The founders (Amazon AGI web grounding, Yandex search lead) are betting that wrapping existing search APIs won't cut it when agents become the primary consumers of web data. The architecture reveals what changes when you optimize for machine callers instead of human eyeballs. Why Agent Search Needs Different Plumbing Human search optimizes for the first three results and tolerates 500ms variance. Agent search runs in tight loops where every query blocks downstream tool calls. The contract shifts: Query volume : Agents issue 10-100x more queries per task than humans per session Latency budget : p95 matters because agents serialize tool calls; tail latency compounds across multi-step workflows Result consumption : Agents parse structured data, not blue links; relevance scoring for human click-through doesn't align with extraction success Query patterns : Agents use precise filters (date ranges, domain constraints, schema hints) that humans rarely specify Traditional search APIs built for human traffic handle agent workloads poorly. Rate limits assume sporadic queries. Pricing tiers penalize high-volume programmatic access. Relevance models optimize for engagement metrics that don't exist in agent contexts. The 100B-Page Index Decision Keenable maintains its own crawl and index instead of wrapping Google, Bing, or Brave. This is expensive but unlocks control over: Crawl strategy : Agents need fresh data on niche domains that human-centric crawlers deprioritize. A proprietary crawl can target high-churn sources (job boards, pricing pages, event listings) and re-crawl on agent-driven schedules rather than PageRank-

2026-08-26 原文 →
AI 资讯

Automatizaciones para pymes: las cinco que siempre piden, ordenadas por lo que cuesta mantenerlas

El chatbot va último: cómo ordeno las cinco automatizaciones que más me piden Tengo 16 flujos en producción para pymes y la lista de pedidos se repite casi siempre igual. Lo que no se repite es cuál conviene hacer primero. La discusión habitual las ordena por dificultad de construcción, y esa es la métrica equivocada. Construir es la parte barata: el modelo escribe la mayor parte. Lo que se paga después es el mantenimiento, y ahí el orden se da vuelta. Van las cinco, ordenadas por lo que cuesta sostenerlas, de la peor a la mejor. 5. Responder consultas frecuentes La que todos piden primero y la que más mantenimiento tiene. Parece contenida: son las mismas veinte preguntas. No lo es, porque el contexto que necesita se mueve todo el tiempo. Cambia el catálogo, cambian los precios, cambia el horario en verano. Meta cambia requisitos de la API. El modelo se actualiza y el mismo prompt deja de comportarse igual. Y sobre todo: es la única de las cinco donde el error lo ve el cliente . Un bot que inventa un precio no genera un ticket interno, genera un reclamo. Si igual va primera —y a veces va, porque es la que se ve—, presupuestala con el abono adentro desde el día uno. 4. Turnos y reservas La más engañosa de la lista. Tomar un turno es trivial; el problema es todo lo demás. Cancelaciones, reprogramaciones, dos personas pidiendo el mismo horario con cuatro segundos de diferencia, el turno que se cargó a mano en el sistema y el bot no vio. Es estado compartido con escritura concurrente , que es un problema viejo y conocido, disfrazado de chatbot. Si la agenda vive en un sistema con API decente, baja bastante. Si vive en un Google Calendar que además tocan tres personas a mano, no la subestimes. 3. Mover datos entre sistemas La que más valor devuelve y la que menos depende de vos. El trabajo real casi nunca es la transformación de los datos: es el sistema del otro lado. Y en pymes ese sistema suele ser uno de gestión local, sin API pública, sin documentación, y con un prov

2026-08-26 原文 →
AI 资讯

MVP que evolui: 7 decisões técnicas antes da primeira linha de código

Um MVP não precisa nascer preparado para milhões de usuários. Mas também não deve ser construído de uma forma que torne cada evolução futura mais cara do que a anterior. O desafio técnico de um MVP é encontrar um equilíbrio: entregar rápido o suficiente para validar hipóteses, mantendo uma base simples, observável e segura. O objetivo não é antecipar todos os cenários. É evitar decisões que bloqueiem o aprendizado. Antes da primeira linha de código, estas sete decisões reduzem boa parte do retrabalho que aparece depois do lançamento. 1. Qual hipótese o software precisa validar? “MVP” descreve uma estratégia de validação, não um tamanho de backlog. Antes de discutir framework, banco de dados ou cloud, transforme a ideia em uma hipótese testável: Acreditamos que [tipo de usuário] resolverá [problema] usando [proposta de valor]. Saberemos que isso é verdade quando [métrica observável]. Esse formato muda a conversa. Em vez de tentar reproduzir todas as funcionalidades de um produto consolidado, a equipe identifica o fluxo mínimo capaz de gerar evidência. Para um sistema de orçamento B2B, por exemplo, a hipótese inicial pode ser que compradores aceitam centralizar pedidos e fornecedores respondem dentro de determinado prazo. O MVP talvez precise de cadastro, criação de pedido, convite, resposta e comparação. Chat avançado, BI e automações podem esperar. Defina uma métrica de sucesso e uma condição de abandono. Sem isso, qualquer uso parece uma vitória e o MVP vira um projeto sem linha de chegada. 2. Onde estão os limites do domínio? A pressa costuma produzir uma base de código organizada apenas por telas ou endpoints. Funciona no começo, mas as regras de negócio rapidamente se espalham por controllers, componentes e jobs. Antes de implementar, desenhe os conceitos centrais do domínio e suas responsabilidades. Perguntas úteis: Quais entidades possuem identidade própria? Quais regras precisam ser verdadeiras em toda alteração? Que ações representam eventos de negócio? Quai

2026-08-26 原文 →
AI 资讯

I removed the LLM call and replaced it with 200 lines of template code

The feature was a letter generator. Somebody fills in a few fields and gets a finished letter of recommendation, resignation letter or notice letter, in plain text, ready to paste into an email. The obvious build is a prompt and a model call. I wrote the deterministic version instead: a pure function, about two hundred lines, no network, no key, no tokens. I want to lay out the reasoning, because "just call a model" is the default now and the default is not always right. The three reasons, in order of weight 1. The output is short and the shape is fixed. A recommendation letter is a date block, a greeting, three or four paragraphs, a sign off and a name. There is no structural variation to discover. Generation is valuable when the space of good outputs is large and you cannot enumerate it. Here the space is small enough to write down, and once you have written it down the model is doing an expensive approximation of a switch statement. 2. It is a legal-adjacent document. Not legal advice, but it goes into an employment record. A resignation letter that invents a notice period, or a reference that invents a fact about a person, is a real problem for the person who sent it. Templates cannot hallucinate. Everything specific in the output either came from a form field or is a sentence I wrote and can be held to. 3. Zero marginal cost changes what the product can be. This is the one that actually decided it. A model call costs money per use, and anything that costs money per use needs an account, a rate limit and eventually a card. A pure function costs nothing, so the tool can stay open with no signup, forever, without a business case. That is a product decision expressed as an architecture decision, and it only works if the code path is free. What the code looks like The whole engine is one exported function over one input type. export type LetterKind = ' resignation ' | ' notice ' | ' recommendation ' ; export type LetterTone = ' formal ' | ' warm ' | ' brief ' ; expo

2026-08-25 原文 →
AI 资讯

Your AI Coding Agent Doesn't Have a Junior-Developer Problem. It Has an Amnesia Problem.

How 41 codified laws, 22 specialist roles, and a file-based memory system stopped an autonomous coding agent from quietly re-breaking the same production defect every few weeks — and why I'm open-sourcing the whole thing as LEO. Ten times faster, ten times more garbage Developers reach for Cursor and Copilot to write code ten times faster, and the tools deliver on exactly that promise — which turns out to be most of the problem. Used as advanced autocomplete, an LLM doesn't produce ten times more good code. It produces legacy at ten times the usual rate. You ask for a feature; the model hands back a wall of if / else ; you ship it. Two months later the codebase reads like it was assembled by five people who never spoke to each other, the test suite is red more often than green, and the senior engineers who never touched the tool get to point at the wreckage and say, "See? AI is just a toy." They are not wrong about the wreckage. They are wrong about what caused it. The bug that wasn't a bug Directing an AI coding agent on real, paying engagements — multi-tenant SaaS platforms, one of them with background AI pipelines — surfaced the same shape of defect more than once, in different files, weeks apart. My own project's changelog ( roles/SYSTEM_UPGRADE_MANIFEST.md — every rule this system has ever added is logged there, with a reason) documents the pattern directly: a rate limiter that could be starved by its own retries because the check-and-consume wasn't atomic at the point of the call. A background worker whose heartbeat proved it was pinging, not that it was making progress — a zombie that looked alive on the dashboard. A held database transaction that outlived the request that opened it and sat there as a lock-holding corpse until something else timed out behind it. Each time, the agent's code was syntactically perfect. Each time, it passed its own tests. None of this was "the AI is bad at coding" — a frontier model in 2026 writes fine syntax all day. What the lo

2026-08-25 原文 →
AI 资讯

Rate limits are not quality gates: the guardrail stack behind an AI agent that posts publicly every day

Our AI agent posts publicly every day — social posts, replies to strangers, comments on other people's articles — with no human reviewing individual messages before they go out. That sentence should make you nervous. It makes us nervous, and we built the thing. Rate limits alone don't fix it. An agent that sends 20 polite, on-topic messages is fine; an agent that sends 20 copies of the same "Great post! 🚀" is a spammer at any rate. Volume and quality fail differently, so they need different machinery. Here is the full stack of gates ours passes before a single reply lands, and — the part that took longest to learn — which gates must be code and which can stay judgment . Layer 1: hard caps, enforced in code, not prompts Numeric limits live in one module that every posting path imports. A global daily cap across all outbound types (ours is 60) and a per-batch reply cap (20). Quote-posts have no separate quota — they simply count against the global cap like everything else, which is the point: one counter, no per-type exemptions. When the cap is hit, the send function refuses — the model doesn't get to "decide" anything, because the branch it would need isn't reachable. The design rule: a cap that lives in the prompt is a suggestion; a cap that lives in the send path is a limit. Prompts drift, sessions get compacted, instructions get summarized away. if (todayCount >= CAP) throw does not. Layer 2: sameness detectors Spam is repetition more than it is volume, so repetition is what we test for — mechanically, in the commit gate and again before send: A canned-phrase blocklist : the marketing openers everyone recognizes ("Just launched", "now available", the rocket emoji) fail the build. The list is versioned; every incident adds to it. Near-duplicate detection : 3-gram Jaccard similarity between any queued post and the last 60 days of sent history. Above 0.4, the batch is rejected. Our genuinely-different posts measure under 0.1 against each other, so the threshold has f

2026-08-25 原文 →
AI 资讯

My Validation Layer Was Correctly Deleting 16% of My Good Data

Originally published at ai.bedvibe.studio . I built a real-time tracker in Rust — about two thousand lines — that reads a live ADS-B feed, keeps a Kalman-filtered track per aircraft, and screens every pair for closest approach against separation minima. Roughly 150 aircraft, a full cycle in under a millisecond. It ran clean. Tests passed, the picture looked right, the numbers were plausible. It was refusing about one measurement in nine , and the only reason I ever found out is that the rejections went to a counter instead of a log line. The gate has a sub-second tolerance for clock error The tracker runs an innovation gate: when a position arrives, the filter predicts where the aircraft should be, and if the measurement is too far from that prediction it is rejected as physically impossible rather than believed. Once a track converges the innovation standard deviation settles around 36 m, so a five-sigma gate sits at roughly 180 m. An airliner at 250 m/s covers 180 m in 0.7 seconds . So the gate's entire tolerance for a wrong timestamp is under one second. Any pipeline that mis-times its measurements by more than that will have them rejected — correctly, and invisibly. The feed reports its own staleness. The pipeline dropped it. Every ADS-B record carries a field saying how old that position already was when the response was generated. In the original build it was parsed into the contact struct and never read again — the only other place that field appeared in the entire codebase was as 0.0 in test fixtures. Every measurement was therefore stamped with the tracker's own cycle clock, as though it had been observed at the instant it landed. This is the common case, not an exotic one. A field that is decoded and then unused looks identical to a field that is decoded and used , right up until you go looking for its second reference. Here is what that field actually contains, sampled across two consecutive polls of the live feed: reported age of position median 0.31 s p

2026-08-25 原文 →
AI 资讯

AWS AgentCore Cloud Migration: Multi-Agent Orchestration for Infrastructure-as-Code Generation

AWS Professional Services just published production data on a multi-agent system that compresses infrastructure-as-code development from weeks to minutes. The system chains four specialized agents (discovery, IaC generation, governance, operations) using Amazon Bedrock AgentCore primitives. This is not a demo. It is a deployed enterprise migration workflow with real customer proof points. The interesting part is how AWS routes tasks between agents without creating circular dependencies, and how they instrument handoffs when a single migration spans four agents with different failure modes. Architecture: Four Agents, One Workflow The system decomposes cloud migration into four agent roles: Discovery Agent : Scans existing infrastructure, builds dependency graphs, identifies migration candidates IaC Generation Agent : Converts discovered resources into Terraform or CloudFormation templates Portfolio Governance Agent : Validates generated IaC against organizational policies, cost budgets, security baselines Post-Migration Operations Agent : Monitors deployed resources, handles drift detection, executes remediation Each agent is a Bedrock Agent with tool access scoped to its domain. The discovery agent cannot deploy infrastructure. The IaC generation agent cannot read production credentials. The governance agent has read-only access to policy repositories. AgentCore orchestrates handoffs using a state machine pattern. When the discovery agent completes a scan, it writes structured output (JSON schema with resource metadata, dependencies, and migration readiness scores) to an S3 bucket. The IaC generation agent subscribes to that bucket via EventBridge and begins template generation only after the discovery agent marks the scan as complete. State Management and Handoff Primitives The key orchestration primitive is a migration manifest stored in DynamoDB. Each migration project gets a manifest with these fields: project_id : Unique identifier for the migration current_sta

2026-08-25 原文 →
AI 资讯

Building a Modular C++ Static Library: Clean Architecture, Encapsulation, and Safe Input Handling

As C++ codebases scale, housing utility routines, state management, and primary execution logic inside a single main.cpp file inevitably leads to technical debt. Code duplication increases, compilation times degrade, and testing isolated features becomes virtually impossible. Modular architecture solves this problem by enforcing a strict separation of concerns. By decoupling function declarations from their definitions and compiling utility modules into reusable static libraries, developers can achieve clean abstraction boundaries, simplify unit testing, and eliminate memory corruption vulnerabilities associated with unvalidated inputs. In this tutorial, you will learn how to build a production-grade C++ utility module from scratch, complete with boundary guards and static compilation. Prerequisites Before diving in, ensure you have: A modern C++ compiler supporting C++17 or higher (GCC, Clang, or MSVC). Basic familiarity with header files ( .h ) and translation units ( .cpp ). A Code Editor or IDE such as Visual Studio Code or Visual Studio . Project Structure To keep boundaries clean, we structure our workspace by isolating public headers from implementation units: text ModularCppLib/ ├── include/ │ ├── ArrayUtils.h │ └── ValidationUtils.h ├── src/ │ ├── ArrayUtils.cpp │ └── ValidationUtils.cpp ├── main.cpp └── README.md Phase 1: Structural Abstraction and Memory-Safe API Design Separating Interfaces from Translation Units In production C++ engineering, headers ( .h ) serve as explicit architectural contracts. They declare what operations are available without leaking how those operations are executed. All utility routines are scoped inside the explicit CoreUtils namespace to prevent global namespace pollution: namespace CoreUtils { // Contract: Accepts array pointer and length, // returns calculated mean safely double CalculateAverage ( const int * arr , std :: size_t size ); // Formats and prints array content void PrintArray ( const int * arr , std :: size_t si

2026-08-24 原文 →
AI 资讯

Your Form Is Not Portable If It Contains Callbacks

What makes a form portable? Not JSON alone. Its validation, conditions, collections and submission semantics must survive the trip too. I wrote about the architecture behind Modyra and the trade-offs involved. Your Form Is Not Portable If It Contains Callbacks Most form libraries help us manage forms inside an application. They track values, execute validators, expose errors and eventually produce a submission payload. That works well until the form needs to exist somewhere else. Perhaps its structure comes from a backend. Perhaps a visual builder generates it. Perhaps multiple applications must render it. Perhaps the server must independently validate the same conditional rules used by the browser. At that point, the form is no longer just component state. It is a contract. And most form abstractions cannot cross that boundary. The portability illusion Consider a typical conditional validator: const form = createForm ({ defaultValues : { country : ' IT ' , vatId : '' , }, validators : { onChange : ({ value }) => { if ( value . country === ' IT ' && ! value . vatId ) { return { fields : { vatId : ' VAT ID is required in Italy ' , }, }; } }, }, }); This is perfectly reasonable application code. It is also not portable. The callback cannot travel through an API as JSON. A Java service cannot execute it. A visual editor cannot reliably inspect it. Another runtime cannot reproduce its meaning without receiving executable source code. We can serialize the values around the callback, but not the behavior itself. This leads to an important distinction: A form configuration is not a portable form contract if part of its meaning still lives inside executable callbacks. The obvious shortcuts are dangerous There are several tempting ways to work around this limitation. Serialize the callback as source code { "condition" : "value.country === 'IT'" } The receiving application must now parse or execute an expression encoded as text. That creates immediate problems: the expression

2026-08-24 原文 →
AI 资讯

Building agents is increasingly becoming less about “how smart is the model?” and more about “what does the agent remember, retrieve, and use at the right moment?” This experiment explores that rabbit hole. Loved the concept deep dive.

Your Agent Doesn't Have a Reasoning Problem, It Has a Memory Problem Anannya Roy Chowdhury Anannya Roy Chowdhury Anannya Roy Chowdhury Follow Aug 24 Your Agent Doesn't Have a Reasoning Problem, It Has a Memory Problem # ai # agents # architecture # programming 11 reactions 1 comment 9 min read

2026-08-24 原文 →
AI 资讯

Nowhere to Put the Disagreement: What a Memory Store Cannot Tell Your Agent

Ask a memory system what database production uses, and it can hand back two records that flatly contradict each other, each with a confident similarity score, and nothing else. Ken Alger opened his piece on this with exactly that shape: PostgreSQL at 0.94, MongoDB at 0.91, and a migration four months ago that neither number knows anything about. He wrote it from the interface side. This is the same problem from the store side, and the uncomfortable part is that a store can hold everything it needs to see the conflict, both records and both timestamps, and still return it flattened. Disclosure up front: I work on Mnemoverse, a memory engine for AI agents, so read the parts about our own failures as the ones I am most sure of. Why does a memory store hand back a contradiction without saying so? Because the response has nowhere to put it. A memory API returns a list of items with scores. That shape can express "here are five things, sorted by how well they match." It cannot express "these two are in conflict," "this one was superseded by that one," or "this is still true but no longer governs." Those are relations between records, and a flat list has no field for a relation. So even a store that tracked the conflict perfectly will flatten it on the way out. The agent sees two ordinary hits, takes the top one, and 0.94 beating 0.91 quietly becomes conflict resolution, performed by a number that was never asked to adjudicate anything. This is not a bug in anyone's ranker. It is a type problem. Fixing it means the response carries edges, not just items, and that is a much bigger change than adding a column. What are the three operations hiding inside "update"? This decomposition is Ken's, from the conversation that produced both pieces, and it is the sharpest thing either of us wrote: Supersession : this was true, now this other thing is. The world changed. Correction : this was never true. Our record was wrong, and it was load-bearing for whatever happened while we belie

2026-08-24 原文 →