Stores

A public repository of tools for LLM agents
import os
import anthropic
import stores

# Load tools
index = stores.Index(["silanthro/hackernews"])

client = anthropic.Anthropic()

response = client.messages.create(
    model="claude-3-5-sonnet-20241022",
    messages=[
        {
            "role": "user",
            "content": "Find the latest posts on HackerNews",
        }
    ],
    # Pass tools
    tools=index.format_tools("anthropic"),
)

tool_call = response.content[-1]
# Execute tools
result = index.execute(tool_call.name, tool_call.input)