> ## Documentation Index
> Fetch the complete documentation index at: https://enterprise-docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate Your Agents with Dify Apps

> Call your Dify apps from any coding agent through difyctl, with no API to integrate or SDK to install

Your agent can call your Dify apps as tools. It runs `difyctl` as an ordinary subprocess and reads the JSON it prints back. `difyctl` describes itself, so the agent discovers your apps, runs them, and reads the results on its own.

## What the Agent Does on Its Own

The agent drives a four-step loop, with no glue code from you:

1. **Discover** the Dify apps available to you.
2. **Inspect** one to learn the inputs it expects.
3. **Run** it with those inputs.
4. **Parse** the JSON result.

The agent doesn't work from a hard-coded command list. `difyctl` describes itself through [`difyctl help -o json`](/en/3.11.x/develop/cli/reference/help#machine-readable-help), and the agent reads that at runtime, so it always tracks the current CLI.

## Before You Start: Sign In Where the Agent Runs

The agent doesn't log in. It runs `difyctl` and reuses whatever session exists on the machine where it runs, so get a session onto that machine first.

The agent acts as whoever signed in, whether an account user or an external SSO user, so sign in with the identity it should use:

* **On your own machine**: a one-time browser sign-in.
* **On a server or in a container**: sign in on the machine, or copy a session onto it.

See [Authenticate Where Your Agent Runs](/en/3.11.x/develop/cli/integrate-agents/auth-for-agent-deployments) for details.

## Onboard Your Agent

The agent learns `difyctl` from `difyctl help -o json`. Pointing it there is the only setup, and how depends on the agent:

* **Reads skills** (Claude Code, Codex, and similar): [install the `difyctl` skill](/en/3.11.x/develop/cli/integrate-agents/install-the-difyctl-skill). One command writes a small file that points the agent at `difyctl help -o json`, and it onboards itself from there. No integration code.
* **Doesn't read skills**: point it there yourself. Add a line to the agent's system prompt or instructions, such as "to work with Dify, run `difyctl help -o json` and use the commands it lists." That's the hand-off the skill otherwise does for you.
