This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: a2apack-agent-authoring
|
||||
description: Author production a2a-pack agents with clear public @skill schemas, runtime declarations, platform LLM grants, optional caller-provided LLMs, workspace grants, pricing, resources, and secure platform capabilities. Use when writing or reviewing agent.py for an A2A agent.
|
||||
description: Author production a2a-pack agents with clear public @skill schemas, runtime declarations, caller-funded LLM credentials, optional agent BYOK, workspace grants, pricing, resources, and secure platform capabilities. Use when writing or reviewing agent.py for an A2A agent.
|
||||
---
|
||||
# A2A Pack Agent Authoring
|
||||
|
||||
@@ -22,12 +22,11 @@ Use `A2AAgent` class attributes for runtime and marketplace behavior:
|
||||
caller's control-plane token.
|
||||
|
||||
For hosted generated/user-owned agents that call an LLM, default to
|
||||
`LLMProvisioning.PLATFORM` with `Pricing(..., caller_pays_llm=False, ...)` so
|
||||
main-agent handoffs mint a scoped A2A LiteLLM grant for the callee. Use
|
||||
`LLMProvisioning.CALLER_PROVIDED` only when the user explicitly wants BYOK or
|
||||
caller-paid inference. Reserve `LLMProvisioning.PLATFORM_OR_CALLER_PROVIDED`
|
||||
for trusted platform/meta agents that must work with either the caller's
|
||||
selected creds or a platform fallback grant. In every mode, read `ctx.llm`;
|
||||
`LLMProvisioning.PLATFORM` with `Pricing(..., caller_pays_llm=True, ...)` so
|
||||
main-agent handoffs forward the caller's saved LLM credential for the callee.
|
||||
`LLMProvisioning.CALLER_PROVIDED` is still acceptable for explicit BYOK wording.
|
||||
Reserve `LLMProvisioning.PLATFORM_OR_CALLER_PROVIDED` for legacy compatibility.
|
||||
In every mode, read `ctx.llm`;
|
||||
never read `A2A_LITELLM_KEY`, `OPENAI_API_KEY`, provider keys, or platform
|
||||
secrets directly. If `ctx.llm.api_key` is empty, return a clear setup/config
|
||||
result before constructing `ChatOpenAI`.
|
||||
@@ -79,8 +78,8 @@ class ResearchAgent(A2AAgent[ResearchConfig, NoAuth]):
|
||||
llm_provisioning = LLMProvisioning.PLATFORM
|
||||
pricing = Pricing(
|
||||
price_per_call_usd=0.05,
|
||||
caller_pays_llm=False,
|
||||
notes="Uses a scoped platform LLM grant through ctx.llm.",
|
||||
caller_pays_llm=True,
|
||||
notes="Uses the caller's saved LLM credential through ctx.llm.",
|
||||
)
|
||||
resources = Resources(cpu="1", memory="1Gi", max_runtime_seconds=900)
|
||||
egress = EgressPolicy(allow_hosts=("api.openai.com",))
|
||||
|
||||
Reference in New Issue
Block a user