> For the complete documentation index, see [llms.txt](https://docs.concurrence.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.concurrence.com/agent/direct-programs.md).

# Direct Programs

A direct program runs an agent version on one authored set of instructions and the tools it grants, with no Context Graph: what it is, where it runs, and its limits.

An agent version carries a **program**: what a service runs when it selects that version. A program is one of two kinds.

* A **graph workflow** runs the [Context Graph](https://docs.concurrence.com/agent/context-graphs.md) that the service binds. States, exits, and state-bound tools shape the conversation. An agent version that names no program is a graph workflow.
* A **direct program** runs one authored set of instructions and the tools those instructions are granted. It has no Context Graph, so it has no states to navigate.

This page explains what a direct program is, what the platform still enforces around it, and where it runs. See [Direct Programs](https://docs.concurrence.com/developer-guide/platform-api/workspaces/direct-programs) in the Developer Guide for the API fields, examples, and refusals.

## What a Direct Program Contains

A direct program is part of an immutable [agent version](https://docs.concurrence.com/agent/agents.md). It has two parts:

* **Instructions** - the authored guidance, stored as written and given to the model as written.
* **Tool grants** - one tool specification for each tool the program may call, in the same form a Context Graph state uses to bind a tool. A tool the program does not grant does not run.

The version still has an identity. Its background, behavioral guidance, and communication patterns are not added to a direct program's instructions, so the instructions carry the agent's role, scope, and boundaries.

Instructions steer a model. They are not authorization, and they do not make model output deterministic. Server-side authorization, tool validation, and approval policy decide which operations can run.

## How It Differs From a Graph Workflow

| Aspect                         | Graph workflow                                                           | Direct program                                                            |
| ------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------- |
| Where the workflow is authored | Context Graph states, objectives, and exits                              | One set of instructions on the agent version                              |
| Tool exposure                  | Workflow tools are bound to states                                       | One grant for the whole conversation                                      |
| Service binding                | The service binds a Context Graph, and a version set can pin its version | The service needs no Context Graph, and its sessions load none            |
| What a version set selects     | An agent version and a Context Graph version                             | An agent version, which holds the whole program                           |
| Evidence of the path taken     | States visited and exits taken                                           | No states. The run records that the program is direct and a digest of it. |

A service that binds no Context Graph runs direct programs only. Saving is checked in both directions: a service with no Context Graph is refused unless each of its version sets runs a direct program, and a new graph workflow version is refused while such a service follows the agent's latest version.

## What the Platform Still Enforces

The instructions replace the Context Graph, not the platform's controls. On a text conversation:

* The platform's medical-emergency and crisis handling reads each user message before the model does, as it does on a Context Graph conversation.
* The model receives the region's crisis guidance and, when tools are granted, the rule that tool results are untrusted content. This guidance is composed after the authored instructions and does not edit them.
* [Dynamic behaviors](https://docs.concurrence.com/agent/context-graphs/dynamic-behaviors.md) that the service pins can apply on the user turns where they fit.
* Each tool call is held to the same server-side checks as a tool bound in a Context Graph state, such as caller verification before a patient-record read.
* A reply check that the service turns on reads each reply before it is delivered.

On a Grok Voice call, the platform still plays the AI and recording notice, runs the emergency scripts and the service's reply checks, and provides the call controls. See [Runtime Safety](https://docs.concurrence.com/operations-and-safety/runtime-safety.md) for what each control covers. These controls cover narrow cases and do not replace testing of the authored instructions.

## Where It Runs

| Surface                                                         | Direct program                                  |
| --------------------------------------------------------------- | ----------------------------------------------- |
| Text conversations                                              | Runs on every text channel                      |
| Grok Voice app voice sessions, Playground calls, and test calls | Runs                                            |
| Grok Voice phone calls                                          | Not set up. The caller gets the safe exit.      |
| Every other voice family                                        | Not set up. These families run a Context Graph. |

On Grok Voice, a call is also refused when its voice harness is a registered release and not the built-in harness. See [Voice Families as Swappable Runtimes](https://docs.concurrence.com/design/voice-families.md) for how the families differ.

## Choosing Between Them

A direct program fits a task that one set of instructions can describe, with one tool grant for the whole conversation, on a text channel or a Grok Voice app session.

Use a graph workflow when the work needs any of these:

* State-specific objectives, tool exposure, or exits that reviewers inspect and simulations cover.
* Phone calls, or a voice family other than Grok Voice.
* A tool call that waits for a reviewer's approval in a text conversation.
* Data-collection states, wait conditions, or typed guardrails.

## Limits

* A direct program is authored through the Platform API or the TypeScript SDK. The Developer Console shows an agent version's program, with its instructions and tool count, and shows and configures a service that binds no Context Graph. It has no form that creates a direct program.
* The instructions and the tool grant are bounded in size, and a tool specification that asks for state navigation is refused at save.
* A text conversation on a direct program refuses a grant that names an approval-gated tool.
* A simulation runs a conversation as text and opens no voice session, so it is not evidence about a Grok Voice call. See [Voice Simulation](https://docs.concurrence.com/testing/testing/voice-simulation.md).

{% hint style="success" %}
**For developers:** See [Direct Programs](https://docs.concurrence.com/developer-guide/platform-api/workspaces/direct-programs) for the request fields, TypeScript and curl examples, and the refusal codes.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.concurrence.com/agent/direct-programs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
