SShortSingh.
Back to feed

Open-Source AST Tool Blocks Dangerous Agent Commands in Under 40 Microseconds

0
·2 views

Developers frustrated with cloud-based safety guardrails for local AI agents have released an open-source Python library called btp-guard, available on PyPI. The tool uses an in-process Abstract Syntax Tree (AST) evaluator to inspect Python, SQL, and Bash code blocks directly in memory before execution, eliminating the need for remote moderation APIs. Unlike cloud-based solutions such as AWS Bedrock or OpenAI Moderation, which add 1,500–2,500 milliseconds of latency per call, btp-guard intercepts dangerous commands in under 40 microseconds with no OS system calls. The library is designed to block high-risk operations including catastrophic filesystem deletions, database purge commands, Python sandbox escapes, and credential exfiltration attempts. It targets developers running local large language models through tools like Ollama, vLLM, or LM Studio who require both speed and air-gapped privacy guarantees.

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 ·

Modern .NET JSON Handling: Replace Manual Serialization with HttpClient Extensions

Since .NET 5, the System.Net.Http.Json namespace provides built-in extension methods that eliminate the need for manual JSON serialization in HttpClient calls. Methods like PostAsJsonAsync, GetFromJsonAsync, and PutAsJsonAsync reduce multi-step serialization code to single-line operations. Developers targeting .NET Standard 2.0 or .NET Core 3.1 can access the same functionality by adding the System.Net.Http.Json NuGet package. Custom serialization behavior can be configured by passing a JsonSerializerOptions instance to any of these methods. For performance-critical or Native AOT scenarios, source-generator-based serialization contexts offer roughly two to three times faster processing than reflection-based approaches.

0
ProgrammingDEV Community ·

Developer Builds MERN Stack Anime Platform, Seeks Community Feedback

A developer named Ayush Gawali has built a full-stack anime website using the MERN stack, comprising MongoDB, Express.js, React.js, and Node.js. The platform is designed to help anime fans search for and discover information about anime through a clean, user-friendly interface. Gawali has shared the project live online and is actively seeking feedback from the developer community, particularly on UI/UX and overall usability. The developer is especially looking for input from those experienced in React, Node.js, and full-stack development. Future plans include adding new features, improving the interface, and optimizing the site's overall performance.

0
ProgrammingDEV Community ·

Multi-Agent AI Systems Cut Costs by Replacing Context Passing with Shared Memory

A software team building a six-agent financial advisory AI identified token accumulation as a core inefficiency, where each agent in a chain inherited the full output of all previous agents, inflating prompt sizes and costs. To address this, they replaced direct context passing with a shared memory layer, allowing each agent to retrieve only the specific slice of information it needs within a defined token budget. The architecture uses three persistent memory tiers: an episodic log of raw session events, a semantic store of distilled cross-session facts, and a third tier for broader persistent context. This 'pass by reference' approach keeps token consumption structurally bounded regardless of chain length or number of user sessions. The team frames this as part of a broader discipline they call 'TokenOps,' focused on designing AI systems with predictable, capped token costs rather than retrofitting compression after the fact.

0
ProgrammingDEV Community ·

Enterprise Code Refactoring Platforms in 2026: Who Does What and Where They Fall Short

A new category of enterprise platforms has emerged to handle large-scale code refactoring across hundreds of repositories, going well beyond what standard IDE tools can manage. These platforms divide broadly into three jobs: deciding what to refactor, executing mechanical changes at scale, and handling deeper structural transformations. Tools like OpenRewrite and Moderne focus on precise, type-aware JVM refactoring across entire repository fleets, while Sourcegraph takes a search-and-patch approach suited to polyglot environments. CodeScene helps teams prioritize by identifying high-churn hotspots, whereas platforms like Morph target architectural restructuring with behavioral verification. Analysts warn that the most common failure mode is deploying a tool built for one of these jobs to handle another.