a tool to help your Letta AI agents navigate bluesky
Letta Agent Tools#
This directory contains Python tools for the Letta agent to interact with Bluesky.
Directory Structure#
tools/
├── bluesky/ # Bluesky-specific tools
│ ├── *.py # Your tool files go here
│ └── example_tool.py # Sample showing expected format
└── README.md # This file
Adding Your Existing Tools#
- Copy your Python tool files into the
tools/bluesky/directory - Ensure each file contains ONE tool function as the main export
- Tool naming convention: The filename should match the function name
- Example:
create_bluesky_post.pycontainsdef create_bluesky_post(...)
- Example:
Required Tools for Bluesky#
Based on your operational guide, these tools are referenced:
create_bluesky_post- Creates posts or replies on Blueskylike_bluesky_post- Likes a specific postrepost_bluesky_post- Reposts content to followersquote_bluesky_post- Quotes a post with commentaryupdate_bluesky_connection- Follow/unfollow/block/mute operationsfetch_bluesky_posts- Retrieves posts from feedsget_bluesky_user_info- Gets user profile informationupdate_bluesky_profile- Updates the agent's profileignore_notification- (May be handled by Letta core, not custom)
Tool Format Requirements#
Each Python tool file must:
-
Use Google-style docstrings with:
- Brief description
Args:section documenting all parametersReturns:section describing the return value- Optional
Example:section
-
Include type annotations for all parameters and return values
-
Access environment variables for credentials:
import os username = os.getenv("BSKY_USERNAME") password = os.getenv("BSKY_APP_PASSWORD") service_url = os.getenv("BSKY_SERVICE_URL") -
Return meaningful results (strings, JSON, or structured data)
See tools/bluesky/example_tool.py for a complete example.
How It Works#
When you run deno task prep-agent, the script will:
- Check which tools are already attached to your agent
- Search for tools in Letta's global tool registry
- For missing tools, read the
.pyfile fromtools/bluesky/ - Create the tool in Letta
- Attach the tool to your agent
After Adding Tools#
Once you've copied your tool files into tools/bluesky/:
deno task prep-agent
This will automatically create and attach all tools to your agent.
Updating Tools#
If you modify a tool:
- Update the
.pyfile intools/bluesky/ - Delete the old tool from Letta (via UI or API)
- Run
deno task prep-agentto recreate it
Alternatively, use Letta's client.tools.modify() API to update existing tools.