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
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ LITELLM_API_KEY=
# SGP Configuration (optional - for tracing)
# SGP_API_KEY=
# SGP_ACCOUNT_ID=
# SGP_CLIENT_BASE_URL=
1 change: 1 addition & 0 deletions src/agentex/lib/cli/templates/default/.env.example.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ LITELLM_API_KEY=
# SGP Configuration (optional - for tracing)
# SGP_API_KEY=
# SGP_ACCOUNT_ID=
# SGP_CLIENT_BASE_URL=
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ LITELLM_API_KEY=
# SGP Configuration (optional - for tracing)
# SGP_API_KEY=
# SGP_ACCOUNT_ID=
# SGP_CLIENT_BASE_URL=
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ LITELLM_API_KEY=
# SGP Configuration (optional - for tracing)
# SGP_API_KEY=
# SGP_ACCOUNT_ID=
# SGP_CLIENT_BASE_URL=
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ from agentex.types.task_message_update import TaskMessageUpdate, StreamTaskMessa
from agentex.types.task_message_content import TaskMessageContent
from agentex.types.text_content import TextContent
from agentex.lib.utils.logging import make_logger
from agents import Agent, Runner, RunConfig, function_tool
from agents import Agent, Runner, RunConfig, function_tool, set_tracing_disabled

# Disable the openai-agents SDK's native tracer so it doesn't ship traces to
# api.openai.com using OPENAI_API_KEY (which may be a LiteLLM proxy key).
# SGP tracing below still runs via the Agentex tracing manager.
set_tracing_disabled(True)


logger = make_logger(__name__)
Expand All @@ -25,12 +30,14 @@ if _litellm_key:

SGP_API_KEY = os.environ.get("SGP_API_KEY", "")
SGP_ACCOUNT_ID = os.environ.get("SGP_ACCOUNT_ID", "")
SGP_CLIENT_BASE_URL = os.environ.get("SGP_CLIENT_BASE_URL", "")

if SGP_API_KEY and SGP_ACCOUNT_ID:
add_tracing_processor_config(
SGPTracingProcessorConfig(
sgp_api_key=SGP_API_KEY,
sgp_account_id=SGP_ACCOUNT_ID,
sgp_base_url=SGP_CLIENT_BASE_URL,
)
)

Expand Down
1 change: 1 addition & 0 deletions src/agentex/lib/cli/templates/sync/.env.example.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ LITELLM_API_KEY=
# SGP Configuration (optional - for tracing)
# SGP_API_KEY=
# SGP_ACCOUNT_ID=
# SGP_CLIENT_BASE_URL=
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ LITELLM_API_KEY=
# SGP Configuration (optional - for tracing)
# SGP_API_KEY=
# SGP_ACCOUNT_ID=
# SGP_CLIENT_BASE_URL=
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ from agentex.lib.core.temporal.types.workflow import SignalName
from agentex.lib.utils.logging import make_logger
from agentex.types.text_content import TextContent
from agentex.lib.environment_variables import EnvironmentVariables
from agents import Agent, Runner
from agents import Agent, Runner, set_tracing_disabled

# Disable the openai-agents SDK's native tracer so it doesn't ship traces to
# api.openai.com using OPENAI_API_KEY (which may be a LiteLLM proxy key).
# SGP tracing below still runs via the Agentex tracing manager.
set_tracing_disabled(True)

from agentex.lib.core.temporal.plugins.openai_agents.hooks.hooks import TemporalStreamingHooks
from pydantic import BaseModel
from typing import List, Dict, Any
Expand Down Expand Up @@ -39,6 +45,7 @@ add_tracing_processor_config(
SGPTracingProcessorConfig(
sgp_api_key=os.environ.get("SGP_API_KEY", ""),
sgp_account_id=os.environ.get("SGP_ACCOUNT_ID", ""),
sgp_base_url=os.environ.get("SGP_CLIENT_BASE_URL", ""),
)
)

Expand Down
1 change: 1 addition & 0 deletions src/agentex/lib/cli/templates/temporal/.env.example.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ LITELLM_API_KEY=
# SGP Configuration (optional - for tracing)
# SGP_API_KEY=
# SGP_ACCOUNT_ID=
# SGP_CLIENT_BASE_URL=
Loading