-
Notifications
You must be signed in to change notification settings - Fork 0
Environment variable A2A_AGENT_APPS not passed through during APKG build/deployment #2
Description
Background
PAF Core Agent (paf-core-agent) implements AI-native routing using LangGraph to intelligently route user queries to specialized A2A worker agents. The routing system requires knowledge of available agents, which can be provided through two mechanisms:
- Static Configuration File:
agents_config.jsonin the project root - Environment Variable:
A2A_AGENT_APPScontaining JSON array of agent configurations
The agent's agent.yaml manifest references this environment variable:
environment:
A2A_AGENT_APPS: "${A2A_AGENT_APPS}"Problem
When deploying PAF Core Agent to the Pixell Agent Runtime (PAR), neither configuration mechanism is available in the deployed agent:
- ❌
agents_config.jsonis not included in the APKG (agent.yaml lacksinclude_filessection) - ❌
A2A_AGENT_APPSenvironment variable is not set in the deployed agent
Evidence
Investigation of deployed agent on EC2 instance i-09dcb7f387166efd0 (us-east-2):
Agent Details:
- Agent App ID:
ed8784f3-b602-481c-8701-3b6406c8fd98 - Version: 1.0.8
- Agent Path:
/home/agent_8c82966883524dad_5pwbelmv/.pixell/venvs/ed8784f3-b602-481c-8701-3b6406c8fd98_*/
File System Check:
find /home/agent_8c82966883524dad_5pwbelmv -name "agents_config.json" 2>/dev/null
# Result: (empty) - File not found anywhereEnvironment Variable Check:
cat /proc/$(pgrep -f "ed8784f3-b602-481c-8701-3b6406c8fd98")/environ | tr '\0' '\n' | grep A2A
# Result: A2A_PORT_RANGE=50052-50071
# Missing: A2A_AGENT_APPSImpact
Current Behavior:
When a user sends a query like "find me 10 subreddits related to ai" that should route to the Vivid Commenter agent (4906eeb7-9959-414e-84c6-f2445822ebe4):
- LangGraph Understand Node ✅ extracts user intent correctly
- LangGraph Routing Node ✅ calls
load_agents()to get available agents load_agents()checks both sources:agents_config.json→ ❌ File not foundA2A_AGENT_APPSenv var → ❌ Not set- Returns:
[](empty list)
- LLM receives: "Available agents: (none)"
- LLM routing decision:
"core"(no agents to route to) - Result: PAF Core handles the query directly instead of routing to specialized agent
Expected Behavior:
The LLM should receive Vivid Commenter agent metadata and intelligently decide to route Reddit-related queries to that specialized agent.
Root Cause Analysis
The agent.yaml manifest correctly declares the environment variable dependency:
environment:
A2A_AGENT_APPS: "${A2A_AGENT_APPS}"However, the pixell-kit APKG build process appears to:
- Not pass environment variables from the build environment into the deployed agent's runtime environment
- Not support an
include_filesdirective inagent.yamlto package static configuration files
Why this is happening:
- The build process likely only reads
agent.yamlforentrypoint,runtime,dependencies, etc. - Environment variables in
agent.yamlmay be treated as documentation rather than as variables to inject - No mechanism exists to copy additional files (like
agents_config.json) into the APKG
Proposed Solutions
Option 1: Support include_files in agent.yaml (Recommended)
Allow agents to package static configuration files:
include_files:
- "agents_config.json"
- "config/**/*.json"Pros:
- Version-controlled configuration
- No external dependencies
- Works in all environments
- Explicit about what's included
Cons:
- Requires pixell-kit changes
- Increases APKG size (minimal for JSON configs)
Option 2: Pass environment variables through to deployed agents
When building/deploying an APKG, read environment variables from:
- Build environment (e.g., GitHub Actions secrets)
- PAR deployment configuration
- .env file in agent directory
And inject them into the agent's runtime environment.
Pros:
- Flexible configuration per deployment
- Supports secrets management
- Standard practice in container deployments
Cons:
- Requires secure secret handling
- More complex deployment process
Option 3: Both (Recommended for Flexibility)
Support both static files and environment variable injection, allowing agents to choose the appropriate mechanism based on their needs.
Affected Components
- pixell-kit build process - APKG assembly and packaging
- PAR deployment - Agent runtime environment setup
- Agent manifest schema -
agent.yamlspecification
Environment Variable Details
Variable Name (exact): A2A_AGENT_APPS
Expected Format:
[
{
"agent_app_id": "4906eeb7-9959-414e-84c6-f2445822ebe4",
"name": "Vivid Commenter",
"endpoint": "https://par.pixell.global/agents/4906eeb7-9959-414e-84c6-f2445822ebe4",
"protocol": "grpc",
"description": "AI-powered Reddit commenter...",
"capabilities": ["Find subreddits...", "..."],
"example_queries": ["find subreddits about AI", "..."]
}
]Referenced in: paf-core-agent/agent.yaml line 37
Related Issues
This issue blocks the AI-native routing feature in PAF Core Agent, making it impossible to leverage specialized worker agents in production deployments.
Request
Please investigate the pixell-kit build process and implement one or both of the proposed solutions to enable:
- Packaging of static configuration files via
include_filesdirective - Environment variable injection from build/deployment environment into agent runtime
This will unblock advanced agent orchestration features and multi-agent coordination capabilities in the Pixell ecosystem.