From 8ef0f94ab7db75cc3658fd9e7f20e5e7c31e2f85 Mon Sep 17 00:00:00 2001 From: Stas Moreinis Date: Tue, 28 Oct 2025 14:16:09 -0700 Subject: [PATCH 1/3] init --- src/agentex/lib/cli/handlers/run_handlers.py | 3 +++ src/agentex/lib/environment_variables.py | 2 ++ src/agentex/lib/sdk/config/agent_config.py | 4 ++++ src/agentex/lib/utils/registration.py | 2 ++ 4 files changed, 11 insertions(+) diff --git a/src/agentex/lib/cli/handlers/run_handlers.py b/src/agentex/lib/cli/handlers/run_handlers.py index 8c59a72a..adf44a19 100644 --- a/src/agentex/lib/cli/handlers/run_handlers.py +++ b/src/agentex/lib/cli/handlers/run_handlers.py @@ -372,6 +372,9 @@ def create_agent_environment(manifest: AgentManifest) -> dict[str, str]: "ACP_PORT": str(manifest.local_development.agent.port), # type: ignore[union-attr] } + if manifest.agent.agent_input_type: + env_vars["AGENT_INPUT_TYPE"] = manifest.agent.agent_input_type + # Add authorization principal if set - for local development, auth is optional from agentex.lib.cli.utils.auth_utils import _encode_principal_context encoded_principal = _encode_principal_context(manifest) diff --git a/src/agentex/lib/environment_variables.py b/src/agentex/lib/environment_variables.py index d7b7e5db..81b21845 100644 --- a/src/agentex/lib/environment_variables.py +++ b/src/agentex/lib/environment_variables.py @@ -38,6 +38,7 @@ class EnvVarKeys(str, Enum): AUTH_PRINCIPAL_B64 = "AUTH_PRINCIPAL_B64" # Build Information BUILD_INFO_PATH = "BUILD_INFO_PATH" + AGENT_INPUT_TYPE = "AGENT_INPUT_TYPE" class Environment(str, Enum): @@ -61,6 +62,7 @@ class EnvironmentVariables(BaseModel): AGENT_ID: str | None = None AGENT_API_KEY: str | None = None ACP_TYPE: str | None = "agentic" + AGENT_INPUT_TYPE: str | None = None # ACP Configuration ACP_URL: str ACP_PORT: int = 8000 diff --git a/src/agentex/lib/sdk/config/agent_config.py b/src/agentex/lib/sdk/config/agent_config.py index 7651cb75..d40d8a93 100644 --- a/src/agentex/lib/sdk/config/agent_config.py +++ b/src/agentex/lib/sdk/config/agent_config.py @@ -19,6 +19,10 @@ class AgentConfig(BaseModel): pattern=r"^[a-z0-9-]+$", ) acp_type: Literal["sync", "agentic"] = Field(..., description="The type of agent.") + agent_input_type: Literal["text", "json"] | None = Field( + default=None, + description="The type of input the agent accepts." + ) description: str = Field(..., description="The description of the agent.") env: dict[str, str] | None = Field( default=None, description="Environment variables to set directly in the agent deployment" diff --git a/src/agentex/lib/utils/registration.py b/src/agentex/lib/utils/registration.py index 9cde2d16..30dd836f 100644 --- a/src/agentex/lib/utils/registration.py +++ b/src/agentex/lib/utils/registration.py @@ -56,6 +56,8 @@ async def register_agent(env_vars: EnvironmentVariables): if env_vars.AGENT_ID: registration_data["agent_id"] = env_vars.AGENT_ID + if env_vars.AGENT_INPUT_TYPE: + registration_data["agent_input_type"] = env_vars.AGENT_INPUT_TYPE # Make the registration request registration_url = f"{env_vars.AGENTEX_BASE_URL.rstrip('/')}/agents/register" From 3b7e1210f113553aee3dccab62d0d0cf4e52c42b Mon Sep 17 00:00:00 2001 From: Stas Moreinis Date: Mon, 3 Nov 2025 15:46:51 -0800 Subject: [PATCH 2/3] add CLI support --- src/agentex/lib/cli/commands/init.py | 12 ++++++++++++ .../lib/cli/templates/default/manifest.yaml.j2 | 3 +++ src/agentex/lib/cli/templates/sync/manifest.yaml.j2 | 3 +++ .../lib/cli/templates/temporal/manifest.yaml.j2 | 3 +++ 4 files changed, 21 insertions(+) diff --git a/src/agentex/lib/cli/commands/init.py b/src/agentex/lib/cli/commands/init.py index 27402406..8c74db7c 100644 --- a/src/agentex/lib/cli/commands/init.py +++ b/src/agentex/lib/cli/commands/init.py @@ -184,6 +184,16 @@ def validate_agent_name(text: str) -> bool | str: ).ask() if not description: return + + agent_input_type = questionary.select( + "What type of input will your agent handle?", + choices=[ + {"name": "Text Input", "value": "text"}, + {"name": "Structured Input", "value": "json"}, + ], + ).ask() + if not agent_input_type: + return use_uv = questionary.select( "Would you like to use uv for package management?", @@ -196,10 +206,12 @@ def validate_agent_name(text: str) -> bool | str: answers = { "template_type": template_type, "project_path": project_path, + "agent_input_type": agent_input_type, "agent_name": agent_name, "agent_directory_name": agent_directory_name, "description": description, "use_uv": use_uv, + } # Derive all names from agent_directory_name and path diff --git a/src/agentex/lib/cli/templates/default/manifest.yaml.j2 b/src/agentex/lib/cli/templates/default/manifest.yaml.j2 index 8ab39b61..e9d2b48b 100644 --- a/src/agentex/lib/cli/templates/default/manifest.yaml.j2 +++ b/src/agentex/lib/cli/templates/default/manifest.yaml.j2 @@ -67,6 +67,9 @@ agent: # Helps with documentation and discovery description: {{ description }} + # Type of input the agent will handle: text or json + agent_input_type: {{ agent_input_type }} + # Temporal workflow configuration # Set enabled: true to use Temporal workflows for long-running tasks temporal: diff --git a/src/agentex/lib/cli/templates/sync/manifest.yaml.j2 b/src/agentex/lib/cli/templates/sync/manifest.yaml.j2 index 213849ab..a37da9c0 100644 --- a/src/agentex/lib/cli/templates/sync/manifest.yaml.j2 +++ b/src/agentex/lib/cli/templates/sync/manifest.yaml.j2 @@ -66,6 +66,9 @@ agent: # Helps with documentation and discovery description: {{ description }} + # Type of input the agent will handle: text or json + agent_input_type: {{ agent_input_type }} + # Temporal workflow configuration # Set enabled: true to use Temporal workflows for long-running tasks temporal: diff --git a/src/agentex/lib/cli/templates/temporal/manifest.yaml.j2 b/src/agentex/lib/cli/templates/temporal/manifest.yaml.j2 index e5592aba..00359914 100644 --- a/src/agentex/lib/cli/templates/temporal/manifest.yaml.j2 +++ b/src/agentex/lib/cli/templates/temporal/manifest.yaml.j2 @@ -75,6 +75,9 @@ agent: # Helps with documentation and discovery description: {{ description }} + # Type of input the agent will handle: text or json + agent_input_type: {{ agent_input_type }} + # Temporal workflow configuration # This enables your agent to run as a Temporal workflow for long-running tasks temporal: From 899429291fe3194b3e5e18f1705b44285078f45a Mon Sep 17 00:00:00 2001 From: Stas Moreinis Date: Mon, 3 Nov 2025 15:48:01 -0800 Subject: [PATCH 3/3] Update init.py --- src/agentex/lib/cli/commands/init.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/agentex/lib/cli/commands/init.py b/src/agentex/lib/cli/commands/init.py index 8c74db7c..3c172742 100644 --- a/src/agentex/lib/cli/commands/init.py +++ b/src/agentex/lib/cli/commands/init.py @@ -211,7 +211,6 @@ def validate_agent_name(text: str) -> bool | str: "agent_directory_name": agent_directory_name, "description": description, "use_uv": use_uv, - } # Derive all names from agent_directory_name and path