golang

Building AI Agents with Ollama and Tool Calling in Go

Building AI Agents with Ollama and Tool Calling in Go

Bogdan Ungureanu

The landscape of AI development is undergoing a fundamental shift. What once required expensive API calls to cloud-based LLM providers can now run entirely on your local machine using Ollama. But raw language models alone aren’t enough to build truly useful AI systems—they need the ability to take actions through tool calling, also known as function calling.

Building AI agents that can autonomously read files, execute commands, search codebases, and modify systems opens up unprecedented possibilities for automation. Imagine an AI assistant that can analyze your Go codebase, understand architectural patterns, and suggest improvements by actually examining the code. Or a development agent that can automatically fix linting errors, generate boilerplate, or execute builds based on natural language instructions.

This comprehensive guide teaches you how to build production-ready AI agents in Go using Ollama for local LLM inference and a robust tool registry system inspired by the Model Context Protocol (MCP). You’ll create a system where AI models can intelligently decide which tools to use, when to use them, and how to combine tool results to solve complex problems.

Chaos Engineering for Cloud-Native Observability: Proactively Breaking Systems to Fix Gaps

Chaos Engineering for Cloud-Native Observability: Proactively Breaking Systems to Fix Gaps

Bogdan Ungureanu
Here is an uncomfortable truth about observability: you only find out your dashboards are wrong, your alerts are silent, and your traces are broken during an incident. The one moment you most need visibility is the moment you discover you never had it. Chaos engineering flips that script. Instead of waiting for production to break and hoping your telemetry holds up, you deliberately inject controlled failures and verify that your metrics, logs, and traces actually captured what happened.
Platform Engineering with Go: Building a Self-Service Internal Developer Platform CLI

Platform Engineering with Go: Building a Self-Service Internal Developer Platform CLI

Bogdan Ungureanu

Platform engineering has emerged as the natural evolution of DevOps, addressing a critical problem that plagues growing engineering organizations: cognitive overload. As infrastructure complexity explodes—Kubernetes, Terraform, CI/CD pipelines, observability stacks, secrets management—developers increasingly spend time fighting tooling instead of shipping features.

The solution is an Internal Developer Platform (IDP): a curated, self-service layer that abstracts away infrastructure complexity and provides developers with “golden paths” to production. At the heart of many successful IDPs sits a command-line interface (CLI) that developers use daily to scaffold services, provision resources, and deploy applications.

In this guide, you’ll build a production-grade IDP CLI in Go using the Cobra framework. Go is the de facto language for platform tooling—it powers Kubernetes, Docker, Terraform, and countless cloud-native tools—thanks to its single-binary distribution, excellent concurrency, and robust standard library.

Building a High-Performance Lock-Free Circuit Breaker in Go

Building a High-Performance Lock-Free Circuit Breaker in Go

Bogdan Ungureanu
Introduction In distributed systems, cascading failures are one of the most devastating failure modes. When a downstream service becomes slow or unresponsive, upstream services can exhaust their resources waiting for responses, causing a domino effect that brings down entire systems. The 2017 AWS S3 outage, which cascaded across multiple services and lasted nearly four hours, demonstrated how a single service failure can ripple through interconnected systems. Circuit breakers act as automatic safety switches that prevent cascading failures by detecting when a service is unhealthy and temporarily blocking requests to it.
API Security in Go: Rate Limiting, JWT Authentication, and RBAC

API Security in Go: Rate Limiting, JWT Authentication, and RBAC

Bogdan Ungureanu
Introduction API security isn’t optional—it’s fundamental. According to the 2023 State of API Security Report, 94% of organizations experienced API security incidents, with exposed APIs becoming the primary attack vector for data breaches. As APIs power everything from mobile apps to microservices architectures, a single vulnerability can cascade into system-wide failures, data leaks, or complete service disruption. Go’s combination of simplicity, performance, and robust concurrency makes it ideal for building secure APIs.
Implementing Circuit Breaker Pattern in Go for Fault Tolerance

Implementing Circuit Breaker Pattern in Go for Fault Tolerance

Bogdan Ungureanu
In today’s distributed systems landscape, services are interconnected through complex networks of API calls, database queries, and external service dependencies. When one service experiences issues, it can create a cascading failure that brings down entire systems. This is where the Circuit Breaker pattern becomes invaluable—acting as a protective mechanism that prevents failing services from overwhelming the entire system. The Circuit Breaker pattern, inspired by electrical circuit breakers, monitors service calls and “trips” when failures exceed a certain threshold, temporarily blocking requests to give the failing service time to recover.

Compliance Automation: SOC2 and HIPAA for Go Applications

Bogdan Ungureanu
In today’s regulatory landscape, compliance isn’t just a checkbox—it’s a critical business requirement that can make or break your organization. Whether you’re handling sensitive customer data or protected health information, meeting standards like SOC2 and HIPAA is essential for maintaining trust and avoiding costly penalties. For Go applications, implementing compliance automation can streamline audits, reduce human error, and ensure continuous adherence to regulatory requirements. This comprehensive guide will walk you through building robust compliance automation systems in Go, covering everything from audit logging to automated policy enforcement.

Hassle-Free Prometheus on Bare Metal

Bogdan Ungureanu
Hassle-Free Prometheus on Bare Metal Monitoring bare metal infrastructure with Prometheus is notoriously challenging. Unlike cloud environments with built-in service discovery, bare metal deployments require manual configuration of scrape targets. Every time you add a server, you must update Prometheus configs, manage TLS certificates, and ensure exporters are accessible. This manual process is error-prone, time-consuming, and doesn’t scale. In this guide, we’ll build a production-ready service discovery system specifically designed for bare metal Prometheus deployments.

Container Security Scanning and Hardening for Go Applications

Bogdan Ungureanu
Container security has become a critical concern as organizations increasingly adopt containerized applications. With the rise of microservices and cloud-native architectures, Go applications running in containers face numerous security challenges, from vulnerable base images to misconfigurations that can expose sensitive data or provide attack vectors. This comprehensive guide explores how to implement robust security scanning, vulnerability management, and hardening strategies specifically tailored for Go applications. We’ll cover everything from choosing secure base images to implementing runtime security monitoring, ensuring your containerized Go applications maintain the highest security standards throughout their lifecycle.
Building Production-Ready HTTP Logging Middleware for Go's Mux Router

Building Production-Ready HTTP Logging Middleware for Go's Mux Router

Bogdan Ungureanu
Observability is the cornerstone of modern web applications. When your API starts experiencing issues at 3 AM, comprehensive logging can mean the difference between a quick fix and hours of frustrated debugging. In this guide, we’ll build a production-grade HTTP logging middleware for Gorilla Mux that goes beyond simple request logging to provide actionable insights into your application’s behavior. Why HTTP Logging Middleware Matters Every HTTP request tells a story. It carries information about who’s accessing your system, what they’re requesting, how long it takes, and whether it succeeds or fails.