initial a2a-pack

This commit is contained in:
robert
2026-05-08 21:59:51 -03:00
commit b6f6cd1643
29 changed files with 3218 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
"""{{ name }} agent."""
from __future__ import annotations
from pydantic import BaseModel
from a2a_pack import A2AAgent, NoAuth, RunContext, skill
class {{ class_name }}Config(BaseModel):
pass
class {{ class_name }}(A2AAgent[{{ class_name }}Config, NoAuth]):
name = "{{ name }}"
description = "{{ description }}"
version = "0.1.0"
config_model = {{ class_name }}Config
auth_model = NoAuth
@skill(description="Say hello")
async def hello(self, ctx: RunContext[NoAuth], who: str = "world") -> str:
await ctx.emit_progress(f"greeting {who}")
return f"hello {who}"