fix: require current a2a init scaffold
All checks were successful
build / build (push) Successful in 26s
All checks were successful
build / build (push) Successful in 26s
This commit is contained in:
@@ -30,37 +30,19 @@ 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.
|
||||
|
||||
What an a2a-pack agent looks like:
|
||||
The default starter is the current a2a-pack DeepAgents scaffold. It declares
|
||||
``LLMProvisioning.CALLER_PROVIDED``, reads caller LLM credentials from
|
||||
``ctx.llm``, builds a ``ChatOpenAI`` model from those credentials, and wires a
|
||||
small tool-calling DeepAgent with ``create_deep_agent`` plus
|
||||
``wrap_model_call`` middleware. Do not recreate this from memory: call
|
||||
``init_agent_template`` first and modify the generated files.
|
||||
|
||||
```python
|
||||
from pydantic import BaseModel
|
||||
from a2a_pack import A2AAgent, NoAuth, RunContext, skill
|
||||
|
||||
|
||||
class <Name>Config(BaseModel):
|
||||
pass
|
||||
|
||||
|
||||
class <Name>(A2AAgent[<Name>Config, NoAuth]):
|
||||
name = "<slug>"
|
||||
description = "..."
|
||||
version = "0.1.0"
|
||||
config_model = <Name>Config
|
||||
auth_model = NoAuth
|
||||
|
||||
@skill(description="...", tags=["..."])
|
||||
async def <skill>(self, ctx: RunContext[NoAuth], ...) -> dict:
|
||||
await ctx.emit_progress("...")
|
||||
return {"ok": True, "...": "..."}
|
||||
```
|
||||
|
||||
You ALSO need an ``a2a.yaml`` like:
|
||||
The generated ``a2a.yaml`` looks like:
|
||||
|
||||
```yaml
|
||||
name: <slug>
|
||||
version: 0.1.0
|
||||
entrypoint: agent:<Name>
|
||||
description: <one line>
|
||||
expose:
|
||||
public: true
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user