Skip to content

Conversation

tcdent
Copy link
Collaborator

@tcdent tcdent commented Dec 21, 2024

Basic working prototype using the hello_alex template.

from typing import Any
import asyncio
import agentstack
from pydantic_ai import Agent


@agentstack.agent('alex')  # agent name is optional
def alex(**kwargs) -> Agent:
    return Agent(
        **kwargs, 
        tools=[*agentstack.tools['file_read']],
    )


@agentstack.task('hello_world')  # task name is optional
async def hello_world(**kwargs) -> Any:
    return await alex().run(**kwargs)


async def run():
    response = await hello_world()
    print(response.data)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant