explaingit

mingyue3677/agent-tool-drawers

Analysis updated 2026-05-18

21Audience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

An architecture pattern that groups an AI agent's tools into drawers and shows the model only the small subset it likely needs each turn.

Mindmap

mindmap
  root((Tool Drawers))
    What it does
      Groups tools into drawers
      Opens only needed drawers
      Reduces model context
    Tech stack
      TypeScript
      Local gateway
    Routing
      Force rules by keyword
      Optional LLM router
      Structured JSON output
    Use cases
      Companion agents
      Voice assistants
      MCP servers
    Audience
      Agent developers
      MCP server builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Reduce how many tool schemas an AI model sees each conversation turn by grouping them into drawers.

USE CASE 2

Use keyword based force rules to instantly route low latency or high risk requests to the right tools.

USE CASE 3

Add an optional LLM router to pick relevant drawers when keyword rules do not match.

USE CASE 4

Separate safe read only tools from risky destructive tools that need confirmation.

What is it built with?

TypeScript

How does it compare?

mingyue3677/agent-tool-drawers0whitedev/detranspiler0xluk3/zk-resources
Stars212121
LanguagePython
Setup difficultymoderatehardeasy
Complexity3/54/51/5
Audiencedeveloperdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

It is a pattern with example code, not a drop-in library, so you adapt the source to your own agent.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice, under the MIT license.

In plain English

Agent Tool Drawers is a lightweight architecture pattern for AI agents that use many tools. Instead of showing an AI model every single tool it could possibly call in every conversation turn, this project groups related tools into drawers, and only opens the drawers that are likely needed for the current message. The README describes it as an early public release: a clean architecture and example code, not a finished product with private prompts, production tools, or user data included. The problem it addresses shows up once an agent project grows past a handful of tools. Feeding the model every tool schema on every turn makes the context heavier, makes the model more likely to pick the wrong tool among similar options, and mixes risky tools like sending messages or deleting data in with safe ones like searching for information, with no clear boundary between them. Different entry points, such as a web chat, a voice assistant, or a scheduled background job, may also need different sets of tools available. The system works in stages. First, deterministic force rules use keyword patterns to instantly open certain drawers, useful for low latency situations like voice commands or high risk actions. Second, an optional lightweight language model router looks at the message's meaning and picks a small number of additional drawers when the keyword rules do not cover it, always returning structured output rather than free text. The selected drawers determine which tool schemas actually get shown to the main model. A separate gateway layer registers all tools, lists them by drawer, and executes tool calls by name, keeping execution logs free of private data. The author is explicit that this only solves one problem: keeping the tool list an agent sees each turn small and relevant. It does not include a memory database design, prompt management, permission system, user authentication, or a task queue. It suits companion agents, roleplay bots, desktop assistants, MCP servers, and other agents with many tools spread across several entry points. It also recommends treating destructive or external actions as a separate risk category requiring confirmation. The project is released under the MIT license.

Copy-paste prompts

Prompt 1
Show me how to define a set of tool drawers for my agent using this architecture.
Prompt 2
Write force rules that route voice commands to the right drawer using keyword patterns.
Prompt 3
Explain how the optional LLM router picks drawers when force rules don't match a message.
Prompt 4
How should I mark a tool like send_message as requiring confirmation in this gateway pattern?

Frequently asked questions

What is agent-tool-drawers?

An architecture pattern that groups an AI agent's tools into drawers and shows the model only the small subset it likely needs each turn.

What license does agent-tool-drawers use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice, under the MIT license.

How hard is agent-tool-drawers to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is agent-tool-drawers for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.