Anthropic Claude plugin for flyte
Project description
Flyte Anthropic Plugin
This plugin provides integration between Flyte and Anthropic's Claude API, enabling you to use Flyte tasks as tools for Claude agents.
Installation
pip install flyteplugins-anthropic
Usage
import flyte
from flyteplugins.anthropic import function_tool, Agent, run_agent
env = flyte.TaskEnvironment(
"claude-agent",
secrets=[flyte.Secret(key="anthropic_api_key", as_env_var="ANTHROPIC_API_KEY")],
)
@env.task
async def get_weather(city: str) -> str:
"""Get the current weather for a city."""
return f"The weather in {city} is sunny, 72F"
@env.task
async def agent_task(prompt: str) -> str:
tools = [function_tool(get_weather)]
return await run_agent(
prompt=prompt,
tools=tools,
model="claude-sonnet-4-20250514",
)
if __name__ == "__main__":
flyte.init_from_config()
run = flyte.run(agent_task, prompt="What's the weather in San Francisco?")
print(run.result)
Features
- Convert Flyte tasks to Claude tool definitions automatically
- Support for both sync and async tasks
- Automatic type conversion from Python type hints to JSON schema
- Integration with Flyte's task environment for secrets and resources
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flyteplugins_anthropic-2.1.5-py3-none-any.whl.
File metadata
- Download URL: flyteplugins_anthropic-2.1.5-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81dcc56013946ad47f7b07f4d8c3921b97fcc472b7743c32b91391582b368af8
|
|
| MD5 |
5ef8d5cd2ff746b9a45f94ac15057e08
|
|
| BLAKE2b-256 |
11c4c7c7eff39eb75950b44739a80aa5c2ade6cc1bb004221e461a05446a3b3c
|