Skip to content

Conversation

wli51
Copy link
Collaborator

@wli51 wli51 commented Oct 9, 2025

Motivation

If agent experiment 1 queried the chembl API of drugs A, B, C. It is highly likely that over repeated experiments subsequent agents will also query the same information of the same drugs.
Having these decorators that will automatically cache (persistently) these tool call - return will speed up future agent runs and to some extent alleviate the rate limiting problem.

Introduces:

  1. tools/tool_cache/cache_config.py: allows programmatic setting of cache location on disk, capacity etc.
  2. tools/tool_cache/cache_manager.py: simple module that wraps the python diskcache to access cache and info
  3. tools/tool_cache/cache_decorator.py: module containing the actual decorator for caching, the cache hit/miss logic are here
  4. tests for the above modules

Updates

  1. ROADMAP.md: reflect the addition of functionality

Once this PR and #6 gets merged a PR implementing the chembl tool will follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant