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

# Endpoints

> Offer one piece of an agent's work to other agents, your apps and AI assistants, with the inputs you choose, and see every call.

An endpoint is what an agent offers: a named way in to one piece of its work, with inputs. It runs one of the agent's workflows, gives one of its coworkers a task, or starts a conversation from one of its channels. Other agents in your workspace call it, and so can your own apps (through the [API](https://docs.cogniagent.ai/api/endpoints.md)) and AI assistants (through MCP).

Inside an agent, items use each other freely. Between agents, an endpoint is the agreed way in. The people who may change the agent decide what is offered, which inputs a caller gives, who it runs as and who may call it, and they see every call in its log.

```mermaid theme={null}
flowchart LR
    subgraph Sales["Agent: Sales"]
      W["Lead intake workflow"]
    end
    subgraph Billing["Agent: Billing"]
      E(["Endpoint: Send quote"]) --> Q["Quotes workflow"]
    end
    W -->|"Call an agent"| E
    App["Your app"] -->|API| E
    AI["AI assistant"] -->|MCP| E
```

## What an endpoint runs

| It runs | What a caller gives | What a caller gets back |
| - | - | - |
| A **workflow**, at one of its entries | The entry's inputs | The run's result, or word that it is still running |
| A **coworker**, with instructions you write | The values the instructions ask for | A session with that coworker, then its final answer |
| A **channel that starts conversations** | Who to talk to, and the values the channel asks at start | The conversation it started, or a website chat link |

## External access

An agent's endpoints are listed in its **Settings → External access**. Where people talk to the agent is the section above it, [Channels](https://docs.cogniagent.ai/features/ways-in.md).

The page reads top to bottom: the list, then **Apps and AI assistants**, then **Calls without an offer**.

**The list.** Each endpoint is one row, whoever may call it. The row shows its name, then what it does (or what runs, like "Coworker: Ana" or "Workflow: Lead intake"), a chip for each kind of caller (**Agents**, **API**, **MCP**), its calls in the last 7 days and an on/off switch. Hover a chip for who it means. Click a row to open its drawer.

**Apps and AI assistants** ("How your apps and AI assistants reach what it offers.") is one block, shown when it has something to show:

* **Connect an AI assistant**, while one of the agent's endpoints is listed at the agent's own MCP address. See [AI assistants over MCP](https://docs.cogniagent.ai/api/endpoints.md#ai-assistants-over-mcp).
* **Endpoint keys**, for people who may change the agent, once an endpoint is open to apps or AI assistants. It counts the keys that call this agent's endpoints, and **Manage keys** opens **MCP & API tokens**. See [Endpoint keys](https://docs.cogniagent.ai/api/endpoints.md#endpoint-keys).
* **Webhooks**: one line, "Apps can also call its workflows’ webhooks, listed in Triggers." Its link opens the agent's [Triggers](https://docs.cogniagent.ai/features/agents.md#triggers).

Webhooks are not endpoints: each is a trigger of its workflow, made in its [Webhook](https://docs.cogniagent.ai/nodes/triggers/webhook.md) step and listed in the agent's Triggers.

**Calls without an offer** comes last, when there are any. See [Calls without an offer](#calls-without-an-offer).

**Unsorted** has no External access: every agent can already use what is in Unsorted.

People who may change the agent see **Offer something** and the switches. Everyone else who can open the agent sees the rows, each marked **On** or **Off**. An endpoint's call log shows its inputs and results only to people who may change the agent.

## Make an endpoint

### In External access

**1. Open the builder**

Open the agent's **Settings → External access** and click **Offer something**. The builder opens in a drawer at the side of the page, the same drawer you edit an endpoint in.

**2. What runs**

Pick a workflow entry ("Runs this workflow"), a coworker ("Starts a session with it"), or a channel that starts conversations. Only items in this agent are listed.

**3. What a caller gives**

Each input is **Caller gives** or **Fixed**. For a coworker, write its **Instructions for each session**: "Each `{{name}}` is something the caller gives." The names are coloured as you type, and typing `{{` offers the ones you already used.

**4. Its name, and who may call it**

The **Name** and **What it does** are suggested from what runs. Other AIs read **What it does** to decide when to use it, so say plainly what it does. Then choose who may call it, any mix of:

* **Other agents**: "Called from their steps, anywhere in this workspace."
* **Apps (API)**: "Called from your servers, with an endpoint key."
* **AI assistants (MCP)**: "Claude, Cursor and others list it as a tool."

**5. Test it**

Leave **Switch it on now** on, or switch it on later. Click **Add**. The drawer then shows the new endpoint, with **Test**.

To make or change an endpoint, you need to be able to change both the agent and what it runs.

Opening **Apps (API)** or **AI assistants (MCP)** also asks which [endpoint keys](https://docs.cogniagent.ai/api/endpoints.md#endpoint-keys) may call it: pick some of your keys, or **Create a key**. A new key is shown once, after **Add**, with the endpoint's address and a sample call when it is open to apps. Click **Done** once you have copied it, and the drawer shows the new endpoint. You can also add the endpoint to a key later, from its drawer. For **AI assistants (MCP)**, choose where it is **Listed at**: **This agent's address**, **The workspace's address**, or **Both**.

Unsorted offers nothing: every agent can already use what is in it. Move an item into an agent to offer it.

### The short way

Each workflow entry, coworker and starting channel has a switch that offers it to every agent in the workspace in one click:

| Item | Where | The switch |
| - | - | - |
| A workflow entry | The workflow's **Start** step | **Allow other agents to call this entry** |
| A coworker | Its overview | **Allow other agents to give *name* work** |
| A conversation flow's starting channel | The channel list in the flow editor | **Allow other agents to start conversations here** |

It makes an endpoint named after the item, with the item's inputs and nothing fixed. A coworker's endpoint takes one input, `task`. Once on, the item shows **Offered as *name***, linked to the endpoint's drawer. Switching it off turns the endpoint off; switching it on again turns the same endpoint back on.

The short way opens the endpoint to other agents only. To open it to apps or AI assistants too, change **Who may call it** in its drawer.

### Before it switches on

Steps of other agents that already call the item directly go through the endpoint once it is on, with its fixed values and the person it runs as. The builder, the switch and the drawer say so first, for example: "2 existing steps call this item. They will get these fixed values and run as you."

## Inputs

* **Given by the caller, or fixed.** Each input is **Caller gives** or **Fixed**. A fixed value is not filled in from variables, and the box says so: "Sent exactly as typed." A short value takes one line; longer text, such as a message, has room for several lines and opens full screen. A fixed value always wins over what a caller sends. A required input with a fixed value is never asked of callers.
* **A starting channel** takes who to talk to (`recipient`) plus the channel's values asked at start. Values fixed on the channel win over both. A channel that writes as a person, such as Slack as a person or Outlook, needs the recipient fixed.
* **A coworker** gets each value in its instructions, marked as the caller's words, so it treats them as a request rather than as your instructions. Values its instructions don't use are added below them.
* **What is refused:** an input the endpoint doesn't take, a missing required input, a value of the wrong type, and inputs over 64 KB in total. The refusal names the input, never its value.

## Who it runs as

* **A workflow's** run belongs to no one, as when another workflow runs it.
* **A coworker or a starting channel** runs as a person: its sessions and conversations are theirs, and so are their approvals. That is whoever last saved the endpoint. Saving changes, or **Run as me** in the drawer, makes it run as you.

If the person it runs as leaves the workspace, the endpoint stops taking calls, and its row says "Ran as *name*, switched off". Run it as you to switch it on again. A channel that writes as a person, such as Slack as a person or Outlook, starts conversations only while it runs as the owner of that connection.

## The drawer

Click an endpoint's row to open its drawer:

* **What runs**, with **Open it**. For a workflow or a coworker, it says that changes to it reach callers at once. A conversation flow runs its published version.
* **Name**, **What it does**, the coworker's **Instructions for each session** and the **Inputs**.
* **Calls a minute, at most**: 60 unless you set another number, from 1 to 600.
* **Who may call it**, and for apps and AI assistants its address, its MCP addresses, the keys that may call it and a sample request. See [Endpoint API](https://docs.cogniagent.ai/api/endpoints.md).
* **Runs as**, for a coworker or a starting channel.
* **Test**, **Calls**, and **Turn off** or **Delete**.

One **Save** at the bottom keeps every change in the drawer at once. It is live only once something changed. For a coworker or a starting channel, it says beside it: "Saving makes it run as you." Leaving the drawer with changes you haven't saved asks first: **Discard unsaved changes?**, with **Discard** or **Keep editing**.

A row warns when something is wrong: "Its workflow is in the trash", "Its entry is gone", "Its coworker is switched off", "Runs as nobody", "Waits for the agent to start". A stopped agent's endpoints refuse every call until it [starts](https://docs.cogniagent.ai/features/agents.md#start-and-stop): callers get "This endpoint's agent is stopped."

### Test it

**Test** makes a real call, as you, and works while the endpoint is off too.

* **A workflow** runs for real, and Test waits up to 50 seconds for its result.
* **A coworker** gets a real session: "Starts a real session with the coworker; follow it in the calls below."
* **A starting channel** asks first, naming the recipient, then starts a real conversation.

A successful test's result is kept as the endpoint's sample.

### Calls

The call log lists every call, newest first, 20 a page, with **All** or **Errors**. Each call shows when it came, who called, its status, how long it took, and why it was refused if it was.

* **Who called**: for example "Workflow Lead intake, step Book", "Coworker *name*", "Test by you", "App · key *name*" or "AI assistant". An item you cannot open shows as "An item you cannot open".
* **Status**: **Done**, **Running**, **Failed**, **Refused** or **Timed out**.
* **Inputs and result** open below a call for people who may change the agent. **Open run**, **Open session** or **Open conversation** opens what it started, if you may open it.

Calls are kept for 30 days.

### Turn it off or delete it

* **Turn off**: nobody can call it. Its settings, keys and calls stay.
* **Delete**: callers can no longer call it, and keys that list it stop calling it. The dialog says how many steps call it: they fail with "endpoint not found".

## In each environment

When the agent has more than one [environment](https://docs.cogniagent.ai/features/environments.md), such as Production and Demo, each environment has its own endpoints. An endpoint belongs to one environment, with its own settings, inputs, person it runs as, rate and call log. Only the endpoints of the environment the agent runs in take calls.

* **External access shows one environment at a time.** Pick it under **Environment**: the one the agent runs in comes first, marked "(running now)". When it shows another one, a note says: "Demo's endpoints. Callers reach them while the agent runs in Demo. It runs in Production now." You can change them there too.
* **Offer something** makes the endpoint in the environment shown: "It is made in Demo: callers reach it while the agent runs in Demo. Copy it to another environment from its menu."
* **The drawer names its environment**, such as "Demo's endpoint. Callers reach it while the agent runs in Demo, and it is off now: the agent runs in Production."
* **An endpoint of another environment is off.** Its row says **Off in Demo** beside its name while the agent runs in Demo, and its switch stays on. A problem it has still shows, named with its environment, so you can fix it before you switch.
* **The MCP address** lists the endpoints of the environment the agent runs in.

### Copy it to another environment

[Adding an environment](https://docs.cogniagent.ai/features/environments.md#add-an-environment) can copy another environment's endpoints, or start with none. To copy one endpoint later, open its row's menu and click **Copy to Demo**. It is offered for each environment that has no copy of it yet. The message says what it did: "The copy answers callers at the same address while the agent runs in Demo. Change it there without changing this one."

A copy is a separate endpoint: changing it never changes the original.

* **A copy keeps its address and its MCP tool name.** An app or an AI assistant calls the same address in every environment, and reaches the copy where the agent runs. The address is the one setting copies share: "Its copies share its address: changing it changes theirs too."
* **Keys reach every copy of an endpoint they list.** A key's list names the endpoint once, with the environments of its copies, such as "Book a visit (in Production, Demo)".
* **A copy is made as you.** A coworker or starting-channel endpoint runs as you in its copy. When you can't run it, the copy keeps its person and is made switched off: "It runs as someone you cannot run it as, so the copy keeps them. Someone who can may switch it on in Demo." When you may not open it to apps or AI assistants, the copy is open to other agents only.
* **A copy starts with no calls.** Its call log and its calls a minute are its own.
* **Test** runs the copy you opened, and only while the agent runs in its environment. Otherwise it is refused: "This endpoint belongs to Demo; the agent is running in Production."
* **Delete** deletes that copy only, with its call log. Steps that named it use a copy that remains.

### When there is no copy where the agent runs

Other agents' workflows, actors and coworkers that call an endpoint use its copy in the environment the endpoint's agent runs in, whichever copy the step was saved with. An app or an AI assistant reaches it the same way, by its address.

If that environment has no copy, every call is refused with 409 `endpoint_not_in_environment`: "Lead intake has no copy in Demo. Copy it to Demo on the Endpoints tab." Copy the endpoint to Demo, or switch the agent back.

## Calling other agents

### From a workflow

Open the step picker with **Add step**. The **Call an agent** section lists what other agents offer this workflow's agent, grouped by agent. Pick one, and the step of its kind is added already calling it:

| It offers | The step added | How the step waits |
| - | - | - |
| A workflow | **Execute Workflow** | Up to 120 seconds for the run |
| A coworker | **Execute Coworker** | As always: its Completed or Failed branch, up to 120 minutes by default |
| A starting channel | **Conversation flow** | Not at all: it returns the conversation |

Under **What it gives**, set each input to a value or an `{{expression}}`. Inputs the other agent fixed show locked, "Fixed by *agent*". The step's output also carries the call's id.

The pickers of the Execute Workflow, Execute Coworker and Conversation flow steps, and an actor's workflow tool, show other agents' items too:

* "*name* · Not offered" can't be picked.
* "*name* · offered as *endpoint*" puts the step in endpoint mode, as above.
* Below the list, "2 items in other agents are not offered to this agent" opens them. **Offer it to this agent** makes the short-way endpoint, if you may change that agent. **Ask the owner** tells someone who may.

### From a coworker

A coworker calls what other agents offer its agent with its `call_agent_endpoint` tool. It doesn't ask you first; a [permission rule](https://docs.cogniagent.ai/cowork/control/permission-rules.md) that denies it still wins.

* It calls workflow and coworker endpoints. It never starts conversations through an endpoint: a coworker starting a conversation always asks a person first.
* It never calls its own agent's endpoints. Inside its agent, it runs the workflows directly, asking first until you choose **Always allow**.
* A workflow answers within 120 seconds, or the coworker hears that the run goes on in the other agent.
* A coworker endpoint starts a session on the other side. The calling coworker's session wakes up when the answer comes back, with its text and the names of any files. The files themselves stay with the coworker that made them.

### From a conversation flow

Every actor in a flow can run its own agent's workflows that declare inputs, with one tool. Turn it on or off in the flow editor under **Agent settings → Capabilities**: "Runs *agent*'s workflows". It is on by default for flows inside an agent, and off for flows in Unsorted. A live flow takes a change at its next deploy.

To call another agent's workflow, give the actor an [Execute Workflow](https://docs.cogniagent.ai/conversation-flows/build/capabilities.md#execute-workflow) custom tool and pick the workflow marked "offered as". Actors call workflow endpoints only.

## The agent boundary

Items inside an agent use each other freely. They reach another agent's items only through the endpoints that agent offers. Unsorted is open to every agent. Knowledge bases, connections and files are shared by all agents, and what a person may see or change does not depend on agents.

Calls through endpoints nest 3 deep at most, and a call that would come back to an endpoint already in the chain is refused as a loop.

### Calls without an offer

Calls wired across agents before endpoints keep working. Each item that steps in other agents already called was given an endpoint for those calls, tagged **Kept for existing calls**: "Made so that steps of other agents that already called it keep working. Switch it off to stop them."

A call with no offer is reported for now and will soon be refused. You see it in three places:

* **External access → Calls without an offer** lists the calls into this agent's items and the calls its items make into others, with how often they ran this week. **Offer it** offers what is called to every agent; **Ask the owner** tells someone who may.
* Whoever made each side gets an in-app notification, at most once a week for each call, never by email.
* The step that makes the call says "Not offered: it runs for now; offer it or ask the owner."

### Move items between agents

* **Endpoints move with their items** unless you choose **Stay behind, switched off** in the Move dialog. An endpoint keeps its API address and its keys. AI assistants connected to the old agent's MCP address lose it, and it joins the new agent's. Only its Production copy moves, into the new agent's Production. Its copies in other environments are deleted, and the Move dialog names them first. Undo does not bring them back.
* **A move that would split a caller from what it calls asks first.** The Move dialog lists the **Calls this move would split**, such as "Booking flow calls Send quote, which stays in Front desk." Choose **Move them together** (the other side moves too) or **Offer what is called** (every agent in this workspace can call it). If you can't offer it, **Ask its owner**. **Move** stays off until you choose, and there is no "move anyway". Moving into Unsorted never splits a call.
* **Moving to another project** switches the moved items' endpoints off.

### Copies

When you [share an agent](https://docs.cogniagent.ai/features/sharing-agents.md), its endpoints travel switched off, without keys, calls or callers. Only the copies of the environment you [share from](https://docs.cogniagent.ai/features/sharing-agents.md#share-from-an-environment) travel, and they become the copy's Production endpoints. In the copy they run as the person who installed it. A step that called another agent through an endpoint no longer stops you sharing: when someone installs the copy, finishing setup asks them to pick an endpoint for it, or skip it.

## Limits

* **Calls a minute**: 60 per endpoint unless you set another number, from 1 to 600. Calls over it are refused, "Too many calls this minute."
* **Nesting**: 3 calls deep, and no loops.
* **Inputs**: 30 at most, 64 KB in total.
* **Apps and AI assistants**: more limits apply, and calls need a paid plan. See [Limits](https://docs.cogniagent.ai/api/endpoints.md#limits).

## Common questions

> [accordion] Can a workflow in one agent run a workflow in another?
>
> Yes, when the other agent offers it. Add the step from **Call an agent**, or pick the workflow marked "offered as" in the Execute Workflow step. If it isn't offered, **Offer it to this agent** or **Ask the owner**.

> [accordion] Do my changes to a workflow reach callers?
>
> Yes, at once. An endpoint calls the workflow or coworker as it is now. A conversation flow runs its published version.

> [accordion] Who pays for a call?
>
> The workspace, as for any run, session or conversation. Nothing extra is charged for the call itself.

> [accordion] What happens to my existing cross-agent steps?
>
> They keep working. A call with no offer is reported for now and will soon be refused. Check **Calls without an offer** in External access, and offer what is called, or move caller and target into one agent.

## Next steps

> [card] [Endpoint API](https://docs.cogniagent.ai/api/endpoints.md)
>
> Call endpoints from your apps, and connect AI assistants over MCP.

> [card] [Channels](https://docs.cogniagent.ai/features/ways-in.md)
>
> Where people talk to an agent.

> [card] [Agents](https://docs.cogniagent.ai/features/agents.md)
>
> What an agent holds, and moving items between agents.

> [card] [Execute Workflow](https://docs.cogniagent.ai/nodes/actions/execute-workflow.md)
>
> The step that runs a workflow, here or in another agent.

> [card] [Agent data API](https://docs.cogniagent.ai/api/stores.md)
>
> Let your app or an AI assistant read or change an agent's settings and database.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.