This project has been archived by its maintainers, and is no longer receiving any updates.
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
Metadata
Release files for flyteplugins-anthropic 2.5.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flyteplugins_anthropic-2.5.8-py3-none-any.whl | Python 3 | none | any | Details for flyteplugins_anthropic-2.5.8-py3-none-any.whl |
Release files / flyteplugins_anthropic-2.5.8-py3-none-any.whl
| Download URL | flyteplugins_anthropic-2.5.8-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b488f0ef5344cf1982232209c8537ed51cf193f4adc6cd09a595af1b00940a19
|
|
BLAKE2b-256 checksum How to use checksums |
2f70e9b8b55021eaba048f3bf6b205c121dd481244144184eaa8194b4fe59fe7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.14
|
Security for flyteplugins-anthropic 2.5.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.