{"id":14358,"date":"2026-06-15T14:28:56","date_gmt":"2026-06-15T13:28:56","guid":{"rendered":"https:\/\/www.blopig.com\/blog\/?p=14358"},"modified":"2026-06-15T14:29:00","modified_gmt":"2026-06-15T13:29:00","slug":"building-an-agent-practical-notes-for-beginners","status":"publish","type":"post","link":"https:\/\/www.blopig.com\/blog\/2026\/06\/building-an-agent-practical-notes-for-beginners\/","title":{"rendered":"Building an Agent &#8211; Practical Notes for Beginners"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">For the last few months, I&#8217;ve been building an agent around OPIG&#8217;s antibody analysis and design tools, and I thought I&#8217;d share some practical notes from the process.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An agent is a language model that doesn&#8217;t just answer questions but can also decide what to do, call tools, and follow workflows. I&#8217;m using Claude in these notes, but most of the ideas apply equally well to other agent frameworks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Rather than building an agent from scratch, we&#8217;re starting with one that already comes with useful capabilities out of the box. For example, Claude Code can search files, edit code, execute commands, and run scripts. Everything below is really about adapting that behaviour to a specific domain and workflow.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to start?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Start with the `CLAUDE.md` file. It&#8217;s a special file Claude reads at the start of every conversation, and it&#8217;s where you define the behaviour of the agent (other agents have their own equivalent \u2014 for example `AGENTS.md`). In this file, include things like bash commands, code style preferences, and workflow rules. This gives Claude a persistent context that it can&#8217;t infer from the codebase alone. Since it&#8217;s loaded every session, it sets the baseline for how the agent behaves.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Start simple &#8211; especially if it&#8217;s your first time. Define clear tools, write lightweight instructions in the markdown (md) file, and create realistic evaluations before adding complexity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then run a loop where the agent gathers context, takes actions, and verifies the outputs. Think about how you&#8217;ll verify them first: if you can&#8217;t tell whether a run was good, you can&#8217;t tell whether your changes helped.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In research, you don&#8217;t always know how a project will evolve, so you&#8217;ll often end up making many changes along the way. But for projects that are relatively well-defined, I&#8217;ve found it&#8217;s worth spending some time upfront with pen and paper, specifying what you want the agent to do before writing it all out.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From there, most development becomes an iterative process of improving the md files and adjusting tools when needed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What is a tool?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A tool gives the agent a capability. It executes an action and returns a result \u2014 calling an API, running code, querying a database, and so on.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The key idea is that tools are deterministic: given the same input, they produce the same output. So if I ask, &#8220;Can you check whether this is an antibody?&#8221;, the agent will always reach for the same tool \u2014 `execute_run_anarci()` \u2014 and get the same result.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A tool can be an MCP server or simply a Python function; what matters is that it gives the agent a reliable way to perform a specific action. Both work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, I implemented execute_anarci_number() as a Python function \u2014 a thin wrapper around ANARCI \u2014 and it returns a structured JSON output with the results and the execution status. All the tools follow the same general structure, which makes them easier for the agent to use consistently.<br><br> The signature and docstring are really all the agent needs to decide when to reach for it:<br><br> <code>def execute_anarci_number(sequence: str, chain_name: str = \"Chain\") -&gt; dict:<br> \"\"\"Identify and number an antibody\/TCR sequence using ANARCI.<br><br> Returns chain type, species, numbering, and whether it's a valid antibody.<br> Chain types: H=Heavy, K=Kappa light, L=Lambda light, A=TCR-alpha, B=TCR-beta<br> \"\"\"<\/code><br><br>The function itself is simple: it runs ANARCI, parses the numbering, extracts the CDRs, and checks whether the input looks like a real, complete variable domain. Instead of returning a bare error when numbering fails, the tool returns a structured verdict the agent can reason about:<br><br> <code># numbering failed \u2192 the sequence just isn't an antibody (not a tool error)<\/code><br><code> return {<br> \"success\": True,<br> \"chain_name\": chain_name,<br> \"is_antibody\": False,<br> \"is_tcr\": False,<br> \"chain_type\": None,<br> \"species\": None,<br> \"message\": \"ANARCI could not number this sequence. \"<br>                    \"It is likely not an antibody or TCR variable domain.\",<br> \"sequence_length\": len(sequence),<br> }<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One thing I found useful is having tools return an explicit verdict, not just output, so the agent knows whether it received an answer, encountered an error, or was given an invalid input.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A few things that helped:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"\">Use the agent itself to help write the tools. It&#8217;s good at it, especially if you give Claude documentation for any software libraries, APIs, or SDKs you&#8217;re wrapping.<\/li>\n\n\n\n<li class=\"\">Don&#8217;t forget to document the tool in the markdown workflow file so the agent knows it exists and when to use it.<\/li>\n\n\n\n<li class=\"\">Open a fresh session and check the agent can actually call the tools correctly before building on top of them. <\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What is a skill?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Skills extend Claude with procedural knowledge. They teach the agent how to perform a task, not just what tools are available.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I think of tools as capabilities and skills as workflows. Tools let the agent do something; skills tell it how to approach a task. A tool might tell Claude how to number an antibody sequence. A skill tells it how to carry out an antibody analysis workflow: which tools to use, in what order, what outputs to expect, and how to interpret the results.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Without skills, the model has to rediscover that workflow from scratch each time. Skills package it once and make it reusable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A skill is just a folder containing a <code>SKILL.md<\/code> file (instructions plus metadata) and optional scripts or reference material. One nice advantage is portability: because a skill is just a folder of markdown and scripts, you can write it once and reuse it across different projects, environments, and even different agent frameworks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To make it concrete, here&#8217;s one of mine: ab-diversity-select. After an optimization run, I&#8217;m left with dozens of candidate antibodies and need to select a small, maximally diverse subset where the retained mutations remain structurally safe. Rather than re-explaining that workflow every time, I captured it as a skill:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>ab-diversity-select\/<br>\u251c\u2500\u2500 SKILL.md # when to use it + the procedure<br>\u251c\u2500\u2500 structural_pipeline.py<br>\u251c\u2500\u2500 pipeline.py<br>\u2514\u2500\u2500 config_template.py<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The SKILL.md header tells Claude when the skill is relevant:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p class=\"wp-block-paragraph\"><code>name: ab-diversity-select<br>description: &gt;-<br>Select a structurally-validated, maximally-diverse subset of antibody candidates from a results CSV\u2026<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The rest of the file describes the procedure, while the accompanying scripts do the heavy lifting. When Claude encounters a task like &#8220;pick 20 diverse antibody candidates,&#8221; it can automatically apply my workflow instead of inventing a new selection strategy from scratch.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Practices that worked for me<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There&#8217;s already a lot of useful information out there, for example:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.anthropic.com\/engineering\" data-type=\"link\" data-id=\"https:\/\/www.anthropic.com\/engineering\">anthropic.com\/engineering<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/code.claude.com\/docs\/en\/best-practices\">Claude Code best practices<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A few things I\u2019d highlight:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Keep the markdown files organized.<\/strong> `CLAUDE.md` is loaded every session, so only put things in it that apply broadly. For domain-specific knowledge or workflows that are only relevant sometimes, use skills instead. There&#8217;s no required format for `CLAUDE.md`; just keep it short and human-readable. Mine roughly covers: setup &amp; environment, architecture &amp; code map, and failure handling.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Use subagents to protect the context.<\/strong> Once the basic agent is working, most improvements come from managing context effectively. Subagents run in their own context with their own set of allowed tools. They&#8217;re useful for subtasks that require a lot of context. For example, summarizing a paper. In practice, though, I mostly used them for tools that generate large outputs, where it becomes difficult for a single agent to process everything cleanly within one context window.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I defined small operator agents that return only compact summaries. The main agent stays focused on planning and interpretation, large tool outputs stay outside its context, and cheaper, faster models handle parsing and batch work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Prompts matter \u2014 a lot.<\/strong> Performance changes significantly depending on the prompt. From my experience, when building longer workflows, improving the prompt often helps more than editing the markdown files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, explicitly defining the expected output format and level of detail can reduce lazy behaviour and make the agent more consistent across runs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One approach I like is building a skill that interviews the user up front about the information you care about using the built-in `AskUserQuestion` tool, and then generates the prompt from the user&#8217;s answers in a structured way.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Use the agent to explain its own failures.<\/strong> The agent is actually pretty good at explaining where it failed and why. Use it to help debug and improve itself. Ask it what went wrong, have it suggest edits to the markdown files, or ask what it learned during the session. Some of my best improvements came from just asking the agent why a run failed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>A few bio-specific lessons<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First, watch the jargon and define your terms. \u201cDiverse\u201d might mean sequence distance, V-gene spread, or structural diversity. Say exactly what you mean, or define it explicitly in your workflow files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Second, the agent will always give you an answer, so make sure it is grounded in tools rather than invented. A language model can easily produce a confident, plausible-looking sequence or numbering out of thin air. If you do not explicitly tell the agent to use the available tools, it may continue without them, even when they exist.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, keep a human in the loop. Read the logs yourself, understand what happened, and do not trust a clean-looking summary on its own. Ask the agent to explain each step and justify its decisions \u2014 that is often the fastest way to catch a wrong assumption before it ends up in your results.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Agents are surprisingly capable, but I still found it challenging to get them to reliably execute long workflows without intervention. In practice, I had the most success when treating the agent as a collaborator rather than a fully autonomous system, giving it clear tools, workflows, and checkpoints along the way.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Building agents is still a fast-moving area, and there are many ways to approach it. It can feel confusing at first, but once you start experimenting and building real projects, things become much clearer. My advice would be to start simple, build something useful, and learn by doing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">References:<br>1. <a href=\"https:\/\/code.claude.com\/\">https:\/\/code.claude.com\/<\/a><br>2. <a href=\"https:\/\/code.claude.com\/docs\/en\/agent-sdk\/modifying-system-prompts\">https:\/\/code.claude.com\/docs\/en\/agent-sdk\/modifying-system-prompts<\/a><br>3. <a href=\"https:\/\/youtu.be\/TqC1qOfiVcQ?si=K24t3oxuHgYWs375\">https:\/\/youtu.be\/TqC1qOfiVcQ?si=K24t3oxuHgYWs375<\/a><br>4. <a href=\"https:\/\/www.aiwithamitay.com\/p\/skills\">https:\/\/www.aiwithamitay.com\/p\/skills<\/a><br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the last few months, I&#8217;ve been building an agent around OPIG&#8217;s antibody analysis and design tools, and I thought I&#8217;d share some practical notes from the process. An agent is a language model that doesn&#8217;t just answer questions but can also decide what to do, call tools, and follow workflows. I&#8217;m using Claude in [&hellip;]<\/p>\n","protected":false},"author":110,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","wikipediapreview_detectlinks":true,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"ngg_post_thumbnail":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[914,466,915],"tags":[],"ppma_author":[750],"class_list":["post-14358","post","type-post","status-publish","format-standard","hentry","category-agents","category-antibodies","category-llms"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"authors":[{"term_id":750,"user_id":110,"is_guest":0,"slug":"yael","display_name":"Yael Ziv","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/3c9bc72679de72f6dcf8e4c545102ef6e0cf449a772414f2a7958c9c1971b740?s=96&d=mm&r=g","author_category":"","user_url":"","last_name":"Ziv","first_name":"Yael","job_title":"","description":""}],"_links":{"self":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts\/14358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/users\/110"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/comments?post=14358"}],"version-history":[{"count":5,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts\/14358\/revisions"}],"predecessor-version":[{"id":14386,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts\/14358\/revisions\/14386"}],"wp:attachment":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/media?parent=14358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/categories?post=14358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/tags?post=14358"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=14358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}