deploy
This commit is contained in:
15
README.md
Normal file
15
README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# metatest
|
||||
|
||||
Manifest-backed meta-agent composed in the dashboard.
|
||||
|
||||
Generated A2APack meta-agent project.
|
||||
|
||||
- Main skill: `pursue`
|
||||
- Planning: `llm_dag`
|
||||
- Max nodes: `8`
|
||||
- Max replans: `1`
|
||||
- Declared sub-agents:
|
||||
- `blog-openapi-agent` skills: auto, get_blog_health, list_blog_posts, create_blog_post, get_blog_post, upsert_blog_post, delete_blog_post
|
||||
- `google-trends-agent` skills: fetch, fetch_structured
|
||||
|
||||
Edit `meta_agent_manifest.json` and `a2a.yaml` together if you change the composition.
|
||||
51
a2a.yaml
Normal file
51
a2a.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
name: metatest
|
||||
version: 0.1.0
|
||||
entrypoint: agent:Metatest
|
||||
description: Manifest-backed meta-agent composed in the dashboard.
|
||||
composition:
|
||||
sub_agents:
|
||||
- name: blog-openapi-agent
|
||||
skills:
|
||||
- auto
|
||||
- get_blog_health
|
||||
- list_blog_posts
|
||||
- create_blog_post
|
||||
- get_blog_post
|
||||
- upsert_blog_post
|
||||
- delete_blog_post
|
||||
default_args: {}
|
||||
required: true
|
||||
- name: google-trends-agent
|
||||
skills:
|
||||
- fetch
|
||||
- fetch_structured
|
||||
default_args: {}
|
||||
required: true
|
||||
planning: llm_dag
|
||||
max_nodes: 8
|
||||
max_parallel: 3
|
||||
max_replans: 1
|
||||
goal:
|
||||
objective: Figure out what kind of blog content works
|
||||
success_criteria: []
|
||||
constraints: []
|
||||
memory:
|
||||
tiers:
|
||||
- files
|
||||
- kv
|
||||
- vector
|
||||
namespace: metatest
|
||||
scope: agent
|
||||
retention: durable
|
||||
runtime:
|
||||
resources:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
max_runtime_seconds: 900
|
||||
llm_provisioning: platform_or_caller_provided
|
||||
wants_cp_jwt: true
|
||||
egress:
|
||||
allow_internal_services:
|
||||
- control-plane.control-plane.svc.cluster.local
|
||||
- litellm.llm.svc.cluster.local
|
||||
deny_internet_by_default: false
|
||||
58
agent.py
Normal file
58
agent.py
Normal file
@@ -0,0 +1,58 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from a2a_pack import (
|
||||
EgressPolicy,
|
||||
LLMProvisioning,
|
||||
MetaAgent,
|
||||
MetaAgentManifest,
|
||||
NoAuth,
|
||||
Resources,
|
||||
WorkspaceAccess,
|
||||
WorkspaceMode,
|
||||
)
|
||||
|
||||
|
||||
META_AGENT_MANIFEST = MetaAgentManifest.from_mapping(
|
||||
json.loads("{\n \"composition\": {\n \"max_nodes\": 8,\n \"max_parallel\": 3,\n \"max_replans\": 1,\n \"planning\": \"llm_dag\",\n \"sub_agents\": [\n {\n \"default_args\": {},\n \"name\": \"blog-openapi-agent\",\n \"required\": true,\n \"skills\": [\n \"auto\",\n \"get_blog_health\",\n \"list_blog_posts\",\n \"create_blog_post\",\n \"get_blog_post\",\n \"upsert_blog_post\",\n \"delete_blog_post\"\n ]\n },\n {\n \"default_args\": {},\n \"name\": \"google-trends-agent\",\n \"required\": true,\n \"skills\": [\n \"fetch\",\n \"fetch_structured\"\n ]\n }\n ]\n },\n \"goal\": {\n \"constraints\": [],\n \"objective\": \"Figure out what kind of blog content works\",\n \"success_criteria\": []\n },\n \"memory\": {\n \"namespace\": \"metatest\",\n \"retention\": \"durable\",\n \"scope\": \"agent\",\n \"tiers\": [\n \"files\",\n \"kv\",\n \"vector\"\n ]\n }\n}")
|
||||
)
|
||||
|
||||
|
||||
class MetatestConfig(BaseModel):
|
||||
pass
|
||||
|
||||
|
||||
class Metatest(MetaAgent[MetatestConfig, NoAuth]):
|
||||
name = "metatest"
|
||||
description = "Manifest-backed meta-agent composed in the dashboard."
|
||||
version = "0.1.0"
|
||||
config_model = MetatestConfig
|
||||
auth_model = NoAuth
|
||||
meta_agent_manifest = META_AGENT_MANIFEST
|
||||
llm_provisioning = LLMProvisioning.PLATFORM_OR_CALLER_PROVIDED
|
||||
wants_cp_jwt = True
|
||||
resources = Resources(cpu="500m", memory="1Gi", max_runtime_seconds=900)
|
||||
egress = EgressPolicy(
|
||||
allow_internal_services=(
|
||||
"control-plane.control-plane.svc.cluster.local",
|
||||
"litellm.llm.svc.cluster.local",
|
||||
),
|
||||
deny_internet_by_default=False,
|
||||
)
|
||||
workspace_access = WorkspaceAccess.dynamic(
|
||||
max_files=100,
|
||||
allowed_modes=(
|
||||
WorkspaceMode.READ_ONLY,
|
||||
WorkspaceMode.READ_WRITE_OVERLAY,
|
||||
),
|
||||
deny_patterns=(
|
||||
"secrets/**",
|
||||
".env",
|
||||
"**/.env",
|
||||
"**/.git/**",
|
||||
),
|
||||
require_human_approval=False,
|
||||
)
|
||||
48
meta_agent_manifest.json
Normal file
48
meta_agent_manifest.json
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"composition": {
|
||||
"max_nodes": 8,
|
||||
"max_parallel": 3,
|
||||
"max_replans": 1,
|
||||
"planning": "llm_dag",
|
||||
"sub_agents": [
|
||||
{
|
||||
"default_args": {},
|
||||
"name": "blog-openapi-agent",
|
||||
"required": true,
|
||||
"skills": [
|
||||
"auto",
|
||||
"get_blog_health",
|
||||
"list_blog_posts",
|
||||
"create_blog_post",
|
||||
"get_blog_post",
|
||||
"upsert_blog_post",
|
||||
"delete_blog_post"
|
||||
]
|
||||
},
|
||||
{
|
||||
"default_args": {},
|
||||
"name": "google-trends-agent",
|
||||
"required": true,
|
||||
"skills": [
|
||||
"fetch",
|
||||
"fetch_structured"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"goal": {
|
||||
"constraints": [],
|
||||
"objective": "Figure out what kind of blog content works",
|
||||
"success_criteria": []
|
||||
},
|
||||
"memory": {
|
||||
"namespace": "metatest",
|
||||
"retention": "durable",
|
||||
"scope": "agent",
|
||||
"tiers": [
|
||||
"files",
|
||||
"kv",
|
||||
"vector"
|
||||
]
|
||||
}
|
||||
}
|
||||
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@@ -0,0 +1 @@
|
||||
# a2a-pack is installed by the platform base image.
|
||||
Reference in New Issue
Block a user