# Dca

> Skill: Dynamic Agent Composition (DAC)

- Skill: `duclm1x1/dca` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add duclm1x1/dca`
- Raw SKILL.md: https://api.skillmd.com/api/skills/duclm1x1/dca/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: duclm1x1 (https://skillmd.com/u/duclm1x1)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/duclm1x1/dca

---

# Skill: Dynamic Agent Composition (DAC)

**Version:** 1.0
**Author:** Manus AI

---

## 1. Description

This skill implements **Dynamic Agent Composition (DAC)**, a sophisticated method for assembling an optimal team of specialist AI agents for any given task. Instead of relying on a fixed, monolithic team, DAC analyzes the specific requirements of a project and dynamically selects the best agents from a pool of available experts. Each agent has a profile advertising its unique capabilities (e.g., 'react-development', 'database-schema-design', 'api-security').

This skill is a direct implementation of the fourth of the 10 breakthrough LLM innovations.

### Key Features:

- **Capability-Based Selection:** Composes teams based on the specific skills needed for a task, not on pre-defined roles.
- **Optimal Team Assembly:** Uses an efficient algorithm to select the smallest possible team that covers all required capabilities.
- **Extensible Agent Pool:** Allows new agents with new capabilities to be registered at any time, making the system highly adaptable.
- **Resource-Efficient:** Ensures that only the necessary agents are activated for a task, optimizing computational resource usage.

## 2. How to Use

### 2.1. Installation

This skill is a self-contained Python module. To use it, import the `AgentComposer` and `AgentProfile` classes.

```python
from skills.dac.src.dac_engine import AgentComposer, AgentProfile
```

### 2.2. Defining and Registering Agents

First, define the profiles for your available specialist agents. Then, register them with the `AgentComposer`.

```python
# 1. Instantiate the composer
dac = AgentComposer()

# 2. Define agent profiles
frontend_agent = AgentProfile(
    agent_id="frontend-dev-01",
    name="React Specialist",
    description="Expert in React and modern frontend frameworks.",
    capabilities={"react", "typescript", "css-in-js"}
)

backend_agent = AgentProfile(
    agent_id="backend-dev-01",
    name="Node.js Specialist",
    description="Expert in building scalable Node.js APIs.",
    capabilities={"nodejs", "express", "api-design"}
)

# 3. Register agents
dac.register_agent(frontend_agent)
dac.register_agent(backend_agent)
```

### 2.3. Composing a Team

Define the set of capabilities required for your project. The `compose_team` method will then select the best agents for the job.

```python
project_requirements = {"react", "api-design", "typescript"}

composed_team = dac.compose_team(project_requirements)

print(f"Composed a team of {len(composed_team)} agents:")
for agent in composed_team:
    print(f"- {agent.name} (covers: {agent.capabilities})")
```

### 2.4. Verifying Capability Coverage

After composing a team, you can check if any required capabilities were not covered by the available agents.

```python
uncovered = dac.get_uncovered_capabilities(project_requirements, composed_team)

if uncovered:
    print(f"\nWarning: The following capabilities could not be covered: {uncovered}")
else:
    print("\nSuccess: All required capabilities are covered by the team.")
```

## 3. Development Roadmap

DAC is key to making AI development teams flexible and efficient. Future development will focus on adding more intelligence to the composition process.

- **v1.1: Capability Weighting:**
    - **Goal:** Allow requirements to specify not just the need for a capability, but also the desired level of expertise (e.g., `react:expert`). The composer will then prioritize agents with a matching skill level.
    - **Timeline:** 2 weeks

- **v1.2: Cost-Based Composition:**
    - **Goal:** Assign a computational "cost" to each agent. The composer will then be able to assemble a team that not only covers the required capabilities but also does so within a specified budget.
    - **Timeline:** 4 weeks

- **v1.3: Dynamic Re-composition:**
    - **Goal:** Enable the system to re-compose the team mid-task if new requirements are discovered. For example, if a project suddenly requires a database, the composer can add a database specialist to the active team.
    - **Timeline:** 5 weeks

- **v2.0: Predictive Composition:**
    - **Goal:** Integrate with the **Predictive Task Decomposition (PTD)** skill. The composer will analyze the task graph from PTD to predict which capabilities will be needed in the future and pre-emptively assemble the right team.
    - **Timeline:** 8 weeks

