Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/agentex/lib/cli/commands/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -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?",
Expand All @@ -196,6 +206,7 @@ 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,
Expand Down
3 changes: 3 additions & 0 deletions src/agentex/lib/cli/handlers/run_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions src/agentex/lib/cli/templates/default/manifest.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions src/agentex/lib/cli/templates/sync/manifest.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions src/agentex/lib/cli/templates/temporal/manifest.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions src/agentex/lib/environment_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/agentex/lib/sdk/config/agent_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions src/agentex/lib/utils/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down