# Agents That Write Their Own Tools at Runtime — Sandhya Subramani, AWS

## Executive summary

This talk introduces meta-tooling, a capability where AI agents can write, load, and use their own tools and even create sub-agents at runtime, without needing to be explicitly programmed for every function. Using the open-source Strands Agents SDK, the speaker demonstrates how an agent can dynamically create tools (like a math calculator or character counter) and handle complex tasks, such as planning a multi-stage itinerary. For production use, the talk emphasizes the necessity of robust guardrails, including sandboxed execution, constrained permissions, and comprehensive evaluation (evals) to ensure reliability and prevent undue damage.

## Key takeaways

- Meta-Tooling Core Components: Implementing meta-tooling requires three core tools: `editor`, `shell`, and `load_tool`, guided by a system prompt that defines what constitutes a 'good tool.'
- Self-Modifying Agents: Agents can write tools and even create sub-agents (e.g., a travel planner creating 'flight agent,' 'activities agent,' and 'itinerary agent') to solve complex problems.
- Agentic Patterns: Advanced multi-agent systems can utilize patterns like Swarm (parallel sub-agents), Graph, Handoff, and Workflow to coordinate tasks.
- Production Guardrails: To trust self-modifying agents, implement guardrails including sandboxed execution, constrained permissions, and thorough evaluation (evals) across goal success, tool choice, and inter-agent flow.

## Technical details

- Meta-Tooling Implementation: The Strands Agents SDK enables meta-tooling using a system prompt and three foundational tools: `editor`, `shell`, and `load_tool`. This allows the agent to dynamically generate and utilize custom tools at runtime.
- Agentic Patterns: Three primary patterns for multi-agent systems are Swarm (parallel task execution), Graph (sequential dependency), and Handoff/Workflow (combinations of the above).
- Agent Evaluation (Evals): Reliability requires evaluating: 1) End goal achievement (Did it book the flight?), 2) Trace level (Was the answer helpful/correct?), 3) Tool access (Was the right tool/parameter used?), and 4) Inter-agent dependency (Was the correct sequence followed?).
- Security and Guardrails: Essential guardrails include sandboxing the code execution environment, constraining permissions, and maintaining observability to prevent the agent from causing undue damage.

## Practical implications

- Allows for the creation of self-healing code and systems that can fix bugs or adapt to novel inputs (e.g., booking flights from unexpected locations) without explicit reprogramming.
- Reduces the engineering turnaround time for handling edge cases by enabling agents to autonomously write and deploy necessary tools.
- Provides a framework for building highly complex, adaptive systems that can evolve their own capabilities (self-improving agents).

## Topics

AI Agents, Meta-Tooling, Generative AI, Software Engineering, Self-Healing Systems, Agentic Workflow, Strands Agents, Strands Agents (GitHub), Strands Agents tools

Source: https://www.youtube.com/watch?v=33Oct2hqGnk
