Sub Agents Configuration

Overview

A Digital Employee can be composed of a coordinator agent plus one or more sub-agents. Sub-agents are attached as nested agents on the underlying glaip_sdk.Agentarrow-up-right instance.

In this repository, see examples/configuration_propagation_example.pyarrow-up-right for a working example (including config propagation).

Key Concepts

What is a "sub-agent"?

A sub-agent is a glaip_sdk.Agentarrow-up-right instance attached under the coordinator agent. When building a Digital Employee, sub-agents are passed to the coordinator agent via the agents=[...] field.

How sub-agents are attached

You attach sub-agents using the builder pattern:

  • DigitalEmployeeAgentBuilder().add_sub_agents([...])

Configuration propagation (tools + MCPs)

When the Digital Employee is built, it will process sub_agents and automatically propagate tool/MCP configs from the parent to sub-agents when:

  • The sub-agent uses a tool/MCP.

  • The sub-agent does not already define a config for that tool/MCP.

Notes:

  • Existing sub-agent configs take precedence over propagated configs.

  • Propagation is recursive: nested sub-agents (sub-agents of sub-agents) are processed as well.

  • Currently only glaip_sdk.Agent is supported as a sub-agent type; unsupported types are skipped with a warning.

Minimal Example

1) Define one or more sub-agents

2) Attach sub-agents using the builder

Notes / Best Practices

  • Add sub-agents before calling .build(); changes after building require rebuilding the employee.

  • Prefer stable, unique Agent.name values (removal uses name matching).

  • If sub-agents use MCPs/tools that require configs, prefer putting shared configs on the parent via .add_configs() and rely on propagation; override only when a sub-agent needs different settings.

  • The DigitalEmployeeAgentBuilder.add_sub_agents() method is the recommended way to attach sub-agents, as it returns the builder for method chaining.

Last updated