SShortSingh.
Back to feed

Developer proposes limiting AI agents to JSON output while local tools handle execution

0
·1 views

A software developer has outlined a pipeline design where an AI language model is restricted to a single task: filling a predefined JSON contract, while all file edits, tests, and commands are handled by conventional local tools. The approach aims to prevent common agent failures such as invented file paths and unauthorised actions by rejecting any model output that does not match a strict JSON Schema. A path allowlist and command enumeration further limit what the agent can touch or execute, ensuring the system fails closed rather than proceeding on bad output. The tutorial walks through setting up a git worktree for isolation, defining the schema contract, and running pytest only after the proposed test command clears an allowlist. The author presents this as a reproducible, deliberately minimal recipe rather than a production benchmark, encouraging readers to copy and intentionally break the setup.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer Details How He Built a Custom Bootloader Taking an OS from BIOS to 64-bit Mode

A developer building a hobby operating system called Nyvela has documented the process of writing a custom bootloader from scratch using legacy BIOS firmware. The bootloader is divided into two stages: Stage 1 handles disk loading, memory mapping, and A20 gate enabling before transitioning the CPU from 16-bit Real Mode to 32-bit Protected Mode. Stage 2 then configures paging, sets up descriptor tables, and enables Long Mode, allowing the system to run a 64-bit kernel. The developer chose legacy BIOS over the more modern UEFI standard because it is the boot path Nyvela currently supports. The project offers a detailed look at low-level x86 architecture concepts such as memory protection, privilege levels, and the step-by-step CPU mode transitions required before an operating system kernel can execute.

0
ProgrammingDEV Community ·

Developer Proposes Two-Layer Architecture to Limit AI Agent API Risks

A developer experimenting with agent safety has identified a risky pattern in modern AI agent setups, where language models are handed API tokens and can directly execute backend calls without independent oversight. The researcher proposes separating reasoning and execution into two distinct layers: a probabilistic 'Semantic Plane' where AI models interpret intent but hold no credentials, and a deterministic 'Control Plane' built in Rust that validates proposed actions against hard policies before granting execution rights. The Control Plane issues short-lived, single-use cryptographic grants, ensuring no action reaches a backend service without passing structured checks. The approach aims to prevent issues such as prompt injection, hallucination-driven misfires, and runaway recursive calls between collaborating agents. The author stresses this remains an early-stage personal exploration and has not been formally audited or proposed as an industry standard.

0
ProgrammingDEV Community ·

MyZubster Metaverse Upgrades Realtime Infrastructure With Observability and Durability

The MyZubster Metaverse platform has merged a significant update to its realtime infrastructure, introducing a dedicated observability layer for its Socket.IO gateway that tracks connection metrics, message delivery, latency, and service-level objectives. The system is designed to be privacy-safe, using hashed references instead of raw user identifiers in logs and metrics. A bounded operation queue has been added to manage traffic bursts, returning retryable responses to clients when the system is under load rather than allowing unbounded memory accumulation. Message and notification persistence has been improved so that a failed socket delivery no longer discards data that was already successfully stored. The update also includes Redis failure handling with a local fallback, an authenticated admin metrics endpoint, and a test suite covering load bursts, durability, and authorization scenarios.

0
ProgrammingDEV Community ·

GEO and AEO Audits Now Essential as AI Crawlers Operate Beyond Google Search Console

Websites that appear fully healthy in traditional SEO reporting may still be inaccessible or unreadable to AI-powered search systems, creating a blind spot for publishers. Google Search Console remains a valuable tool for understanding how Google indexes pages, but it does not reveal whether AI crawlers can access a site or interpret its content. Industry reporting, including guidance from Search Engine Land, highlights that hosting configurations and crawler-specific rules can silently block AI crawlers even when conventional indexing looks clean. An emerging five-layer GEO measurement framework calls for audits that go beyond standard dashboards to check AI-crawler access, entity clarity, and citation signals in AI-generated answers. Experts now consider Generative Engine Optimization and Answer Engine Optimization core components of modern search visibility strategy rather than optional add-ons.