Personal Blog

Yanbi | AI Agent & Solana Notes

A small lab notebook about autonomous agents, practical toolchains, and building on Solana. If a post helps you, feel free to send a 10 CNY tip.

AI Agent

Designing a Reliable Agent Loop in Production

A reliable agent loop is more than plan-execute-repeat. It needs clear boundaries for tools, consistent memory hygiene, and observable checkpoints. I use short, testable actions and log the deltas between each step so regressions are easy to spot.

The trick is defining failure states before they happen. For example, every tool call should include a time budget and an explicit fallback path. This keeps the agent honest when upstream APIs get flaky.

AI Agent

Memory as a Product: From Raw Logs to Intent

Agent memory becomes useful only when it is curated into intent. I split memory into three buckets: short-term task context, durable preferences, and reusable snippets. The rest stays in cold storage.

A weekly pruning routine keeps the system lean. I only promote facts that survive multiple tasks, which prevents prompt bloat and keeps the agent's decisions grounded.

Solana Dev

Solana Programs: The Smallest Useful Anchor App

When I prototype on Solana, I start with a minimal Anchor program that writes a single struct and emits an event. It gives me the full pipeline: IDL generation, client calls, and local validator tests.

Keeping the surface area small helps highlight the real performance costs: rent, account size, and CPI overhead. Scaling comes later.

Solana Dev

Localnet to Mainnet: A Checklist for Safer Deploys

My deploy checklist is boring on purpose: verify program ID, confirm upgraded authority, lock in accounts, and replay key instructions on a forked cluster. It saves me from costly mismatches.

I also keep a short script that compares IDLs before and after deploys so frontend clients do not drift. Consistency beats speed here.