building-agents

Design and implement tool-using Python agents for LLM-driven reasoning.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/oornnery/skills --skill building-agents-oornnery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: building-agents
Source: https://github.com/oornnery/skills/tree/main/skills/building-agents
Command: npx skills add https://github.com/oornnery/skills --skill building-agents-oornnery

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

This guide provides a comprehensive blueprint for designing and implementing Python-based, tool-using LLM agents. It covers runtime context construction, stable prompt shaping, a closed set of tools, rigorous validation, safe parsing, context management, memory, and bounded delegation to subagents.

Core Features & Use Cases

  • Runtime context that captures repo state, environment, and available tools to ground model reasoning.
  • Stable prompt prefix + per-turn dynamic memory to maximize cache hits and minimize token usage.
  • A structured Tool model with typed inputs, risk flags, and a simple registry to keep capabilities explicit and safe.
  • Parsing and validation primitives that guarantee tool calls are well-formed and safe, with a retry path for handling flaky models.
  • Bounded delegation to subagents for parallel work while preserving isolation and safety.

Quick Start

Build a minimal Python agent that collects context, builds a stable prompt, and calls a tool.

Frequently Asked Questions about building-agents

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Python agent that uses LLM tools for reasoning?

Build a Python tool-using agent by constructing a runtime context, shaping stable prompts, defining a structured tool registry, and implementing parse_response logic for safe LLM-driven reasoning. This provides a runnable agent loop with bounded subagent delegation.

What is bounded delegation in LLM agent design?

Bounded delegation is a technique for assigning parallel work to subagents while preserving isolation and safety. It allows a Python agent to distribute reasoning tasks without compromising the stability of the main runtime harness.

How do I manage context and memory for Python LLM agents?

Manage context and memory for Python LLM agents by capturing repo state and environment in a RuntimeContext, using stable prompt prefixes, and maintaining per-turn dynamic memory sessions to maximize cache hits and minimize token usage.

How do I safely parse and validate tool calls from LLM responses?

Safely parse and validate tool calls from LLM responses by applying parsing and validation primitives that guarantee tool inputs are well-formed and safe, using a retry path to handle flaky models and ensure stable execution.

What's the best way to structure tools for an LLM agent in Python?

The best way to structure tools for an LLM agent in Python is using a structured Tool model with typed inputs, risk flags, and a simple registry. This keeps agent capabilities explicit, closed, and safe during runtime execution.

Do I need external libraries to implement an LLM agent loop?

No external libraries are required to implement an LLM agent loop. The design relies on native Python primitives for context collection, prompt shaping, result parsing, and bounded subagent delegation without additional dependencies.