Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
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
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