Skip to main content
Archived

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

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)

Table of built distributions (wheels) for flyteplugins-anthropic 2.5.8
File Interpreter ABI Platform
flyteplugins_anthropic-2.5.8-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

2.5.8 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page