Handle deterministic agents without LLM creds
All checks were successful
build / build (push) Successful in 11s
All checks were successful
build / build (push) Successful in 11s
This commit is contained in:
@@ -49,20 +49,28 @@ Given a user description, you write a complete agent project under the
|
||||
user's workspace at ``agents/<name>/`` and then deploy it through the
|
||||
control plane.
|
||||
|
||||
The default starter is the current a2a-pack DeepAgents scaffold. It declares
|
||||
``LLMProvisioning.PLATFORM``, reads the caller's saved LLM credential from
|
||||
``ctx.llm``, resolves the model through ``create_a2a_deep_agent``, and wires a small
|
||||
tool-calling DeepAgent with the A2A DeepAgents model middleware
|
||||
middleware. Do not recreate this from memory: call ``init_agent_template`` first
|
||||
The default starter is the current a2a-pack DeepAgents scaffold. For agents
|
||||
that call an LLM, it declares ``LLMProvisioning.PLATFORM``, reads the caller's
|
||||
saved LLM credential from ``ctx.llm``, resolves the model through
|
||||
``create_a2a_deep_agent``, and wires a small tool-calling DeepAgent with the
|
||||
A2A DeepAgents model middleware. Do not recreate this from memory: call
|
||||
``init_agent_template`` first
|
||||
and modify the generated files.
|
||||
|
||||
Default hosted generated/user agents to ``LLMProvisioning.PLATFORM`` and
|
||||
``caller_pays_llm=True`` so main-agent handoffs forward the caller's saved LLM
|
||||
credential for the callee. The generated agent must still read ``ctx.llm`` and must never
|
||||
read ``A2A_LITELLM_KEY``, ``OPENAI_API_KEY``, LiteLLM master keys, or provider
|
||||
keys directly. ``LLMProvisioning.CALLER_PROVIDED`` is still acceptable for
|
||||
explicit BYOK wording. Always make missing ``ctx.llm.api_key`` a clear setup/config result before constructing
|
||||
a DeepAgents model.
|
||||
For hosted generated/user agents that call an LLM, default to
|
||||
``LLMProvisioning.PLATFORM`` and ``caller_pays_llm=True`` so main-agent
|
||||
handoffs forward the caller's saved LLM credential for the callee. The
|
||||
generated agent must still read ``ctx.llm`` and must never read
|
||||
``A2A_LITELLM_KEY``, ``OPENAI_API_KEY``, LiteLLM master keys, or provider keys
|
||||
directly. ``LLMProvisioning.CALLER_PROVIDED`` is still acceptable for explicit
|
||||
BYOK wording. Always make missing ``ctx.llm.api_key`` a clear setup/config
|
||||
result before constructing a DeepAgents model.
|
||||
|
||||
For explicitly deterministic/local-logic agents that do not call an LLM, remove
|
||||
the starter's ``LLMProvisioning`` import and class ``llm_provisioning``
|
||||
declaration, do not read ``ctx.llm``, and set
|
||||
``Pricing(..., caller_pays_llm=False, ...)``. A no-LLM agent must be callable
|
||||
without requiring the user's LLM credential.
|
||||
``Pricing`` accepts only ``price_per_call_usd``, ``caller_pays_llm``, and
|
||||
``notes``. Never set ``runtime.pricing.compute`` or
|
||||
``runtime.pricing.total_usd`` in generated source; those are derived later by
|
||||
|
||||
Reference in New Issue
Block a user