⚠️ Experimental — Lists all StackGen AI agents in the organization. When provider workspace_id is set, the list is scoped to that workspace.
# When to use: Inventory agents in the org (names, models, integrations) for
# reporting or to discover which agents already exist before creating new ones.
data "sg_agents" "all" {}
output "agent_names" {
value = [for a in data.sg_agents.all.agents : a.name]
}
agents (Attributes List) List of registered agents. (see below for nested schema)agentsRead-Only:
auto_approve_tools (Attributes List) Rules for tools that bypass HITL approval. (see below for nested schema)auto_deny_tools (Set of String) Tool names that are always denied.contact_id (String) Identity for escalations.description (String) Human-readable description of the agent.environment (String) Deployment environment.id (String) Server-assigned identifier.integrations (Set of String) Names of guild-level integrations.is_router (Boolean) True when the agent is a logical MAB router for variants.model_names (Set of String) Names of registered models.name (String) Agent name.parent_agent_id (String) Parent logical agent UUID when this agent is a variant.persona (String) System prompt / persona.remote_runners (Set of String) Remote runner names or IDs attached to this agent.semantic_router_policy_id (String) OPA policy ID for semantic routing.skills (Set of String) Skill locations for dynamic tools.status (String) Agent lifecycle status.tags (Set of String) Labels.tools (Set of String) Tool names this agent can invoke.agents.auto_approve_toolsRequired:
tool (String) Tool name (exact, case-insensitive) or prefix wildcard ending in * (e.g. stackgen-mcp_*).Optional:
when_args_contain (String) JSON object that call arguments must contain (subset match). Omit or use {} for any arguments. Use jsonencode() in HCL for nested keys.