✕ Clear all filters
510 articles
▶ Videos →

📰 Dev.to · Gabriel Anhaia

510 articles · Updated every 3 hours · View all reads

All Articles 119,133Blog Posts 126,404Tech Tutorials 30,514Research Papers 23,724News 17,328 ⚡ AI Lessons
Meta's Agents Rule of Two: A Practical Defense Against Prompt Injection
Dev.to · Gabriel Anhaia 1w ago
Meta's Agents Rule of Two: A Practical Defense Against Prompt Injection
Prompt injection is unsolved. Meta's Rule of Two says pick at most two of three risk legs per agent session. Here is how to enforce it.
Picking an Agent Framework in 2026: An Honest Verdict on Six of Them
Dev.to · Gabriel Anhaia 1w ago
Picking an Agent Framework in 2026: An Honest Verdict on Six of Them
LangGraph, OpenAI Agents SDK, Claude Agent SDK, Microsoft agent-framework, CrewAI, Pydantic AI: a pick-by-need guide for 2026.
Pydantic AI: Typed, Testable Agents for Engineers Who Like Guarantees
Dev.to · Gabriel Anhaia 1w ago
Pydantic AI: Typed, Testable Agents for Engineers Who Like Guarantees
Typed dependencies, validated outputs, and tests that never touch the network. How Pydantic AI puts static types around a stochastic model.
CrewAI vs AutoGen vs the Rest: The 2026 Multi-Agent Framework Landscape
Dev.to · Gabriel Anhaia 1w ago
CrewAI vs AutoGen vs the Rest: The 2026 Multi-Agent Framework Landscape
Roles, conversations, or graphs. A field guide to the 2026 multi-agent frameworks, honest verdicts, and when one agent beats a crew.
The OpenAI Agents SDK in Production: What It Gives You and What It Hides
Dev.to · Gabriel Anhaia 1w ago
The OpenAI Agents SDK in Production: What It Gives You and What It Hides
Agents, handoffs, guardrails, sessions. The abstractions that help you ship, and the ones that hide behavior you need to see.
Three Kinds of Agent Systems: Workflow, Autonomous, and the Middle
Dev.to · Gabriel Anhaia 1w ago
Three Kinds of Agent Systems: Workflow, Autonomous, and the Middle
Fixed workflows, fully autonomous loops, and constrained autonomy. How to pick the least-powerful design that still solves the task.
Planning and Decomposition for Agents: Structured Output Over Free-Form Reasoning
Dev.to · Gabriel Anhaia 1w ago
Planning and Decomposition for Agents: Structured Output Over Free-Form Reasoning
Turn a goal into a plan of typed steps, learn why structured plans beat prose, and re-plan cleanly when a step fails.
Designing Agent Tools: Schemas and Descriptions That Prevent Misfires
Dev.to · Gabriel Anhaia 1w ago
Designing Agent Tools: Schemas and Descriptions That Prevent Misfires
Vague tool schemas make agents call the wrong function. Here is how descriptions, strict validation, and tool_choice fix misfires.
Your First Tool-Calling Agent With No Framework, Just the Bare SDK
Dev.to · Gabriel Anhaia 1w ago
Your First Tool-Calling Agent With No Framework, Just the Bare SDK
Build a real tool-calling agent from scratch: define tools, run the loop, feed results back, and stop cleanly. No framework.
Graceful Degradation in Go: Fallback When a Downstream Adapter Fails
Dev.to · Gabriel Anhaia ⚡ AI Lesson 1w ago
Graceful Degradation in Go: Fallback When a Downstream Adapter Fails
Wrap a Go adapter with a fallback that serves stale cache when the downstream dies, and decide degrade-vs-fail per use case.
Mapping Go Domain Errors to HTTP Status Codes at the Boundary
Dev.to · Gabriel Anhaia 🔧 Backend Engineering ⚡ AI Lesson 1w ago
Mapping Go Domain Errors to HTTP Status Codes at the Boundary
Keep HTTP status codes out of your Go domain. Typed sentinel errors, errors.As, and one translation function at the handler edge.
Retries and Backoff in Go: Where They Belong in a Hexagonal Service
Dev.to · Gabriel Anhaia 1w ago
Retries and Backoff in Go: Where They Belong in a Hexagonal Service
Exponential backoff with jitter in Go belongs at the adapter, not the domain. Respect context deadlines, retry the right errors, keep the port clean.
A Circuit Breaker at the Go Adapter: Fail Fast, Leave the Domain Alone
Dev.to · Gabriel Anhaia 1w ago
A Circuit Breaker at the Go Adapter: Fail Fast, Leave the Domain Alone
Wrap an outbound Go adapter with a circuit breaker. Closed, open, half-open states, and a use case that never learns the breaker exists.
Idempotency Keys in Go HTTP Handlers: Stop Double-Processing Requests
Dev.to · Gabriel Anhaia 1w ago
Idempotency Keys in Go HTTP Handlers: Stop Double-Processing Requests
Build an idempotency-key store in Go with first-write-wins and response replay, and put the check at the right layer of your handler.
The Transactional Outbox in Go: Reliable Events Without a Message Broker
Dev.to · Gabriel Anhaia 1w ago
The Transactional Outbox in Go: Reliable Events Without a Message Broker
Emit events in the same transaction as your state, then relay them with a Go poller. At-least-once delivery, no Kafka, no dual-write bug.
A Logging Port in Go: Keeping slog at the Edge of Your Hexagon
Dev.to · Gabriel Anhaia 1w ago
A Logging Port in Go: Keeping slog at the Edge of Your Hexagon
Import slog in your Go domain and you weld a logging library to your business rules. A narrow port keeps it at the edge, where it belongs.
Injecting a Clock in Go: Testable Time in Your Hexagonal Domain
Dev.to · Gabriel Anhaia 1w ago
Injecting a Clock in Go: Testable Time in Your Hexagonal Domain
Kill time.Now() calls buried in Go business logic. A Clock port, a real adapter, a fake, and tests that stop flaking on midnight.
google/wire in Go: Compile-Time DI for Hexagonal Services
Dev.to · Gabriel Anhaia 1w ago
google/wire in Go: Compile-Time DI for Hexagonal Services
google/wire builds your Go dependency graph at compile time. Provider sets, generated injectors, and ports wired to adapters with no reflection.
testcontainers-go: Real Integration Tests for Go Without Mocks
Dev.to · Gabriel Anhaia 1w ago
testcontainers-go: Real Integration Tests for Go Without Mocks
Spin up a real Postgres in your Go tests with testcontainers-go, get the lifecycle and readiness right, and keep the suite fast on every push.
Injecting Version Info at Build Time in Go With -ldflags
Dev.to · Gabriel Anhaia 1w ago
Injecting Version Info at Build Time in Go With -ldflags
Stamp version, commit, and build time into a Go binary with -ldflags -X, and read the git revision back from runtime/debug BuildInfo.