> For the complete documentation index, see [llms.txt](https://docs.karini.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.karini.ai/skills-library/skill-execution-in-deepagent-and-agent.md).

# Skill execution in Deepagent and Agent

#### Execution of skills in Deep Agent Prompt

Skills are **loaded and executed on demand** instead of running continuously in the background. This keeps the agent’s workflow efficient and controlled.

1. **Skill instructions are loaded when required.**\
   The agent reads the relevant `SKILL.md` file only when a particular skill is needed for the task.
2. **Skills run inside the sandbox.**\
   The required operations are performed in a controlled sandbox environment where files and tasks can be safely processed.
3. **The agent waits for the result.**\
   After executing a skill, the agent waits for the output and uses the result before moving to the next step.
4. **Skills are not background tasks.**\
   Skills do not continue running independently. They are executed as part of the active workflow and complete before the agent proceeds.

Overall, skills work as **on-demand capabilities** that are loaded, executed, and completed only when necessary.

The following points describe the skill inheritance behavior for Sub Agents.

* **Sub Agents automatically inherit all skills configured on their parent Deep Agent**, ensuring that parent-level capabilities are consistently available to each Sub Agent.
* Skills configured directly on a Sub Agent are additive, meaning the effective skill set is the union of the parent Deep Agent’s skills and the Sub Agent’s own skills.

#### Execution of skills in Agent Prompt

Agent prompts are designed for **simple, single-step, and stateless execution**. Skills provide the instructions the agent should follow, but skills themselves cannot execute code. If the skill includes executable logic, the Agent node must have a **Code Interpreter** configured.

* **Code Interpreter is required** for Python code, shell commands, automation scripts, data processing, computations, or any other executable logic.
* **Without Code Interpreter**, the agent can only read, interpret, and explain the code or instructions defined in the skill.
* **With Code Interpreter**, the agent can execute the required code, process the output, and return the computed result.
* Skills are loaded **per request**, with no retained skill context across requests.
* Agent execution is **single-turn and stateless**, unless conversation context is explicitly provided at the recipe level.
* This setup is best suited for **quick lookup, simple transformations, calculations, and straightforward skill-based tasks**.
