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

# Custom Agent

> Direct control over LLM selection, prompting, and output configuration for advanced AI tasks.

The Custom Agent gives you direct access to frontier Large Language Models (LLMs) like GPT-5.2, Claude Opus 4.5, Gemini 3, and Deepseek V3. Pick your model, write your prompts, and get a single text response—perfect for simple, one-shot AI tasks.

## Key Capabilities

<CardGroup cols={2}>
  <Card title="Choose Your Model" icon="microchip">
    Pick from GPT-5.2, Claude Opus 4.5, Gemini 3, Deepseek V3, and other frontier LLMs.
  </Card>

  <Card title="Fine-Grained Control" icon="terminal">
    Use a **System Prompt** for context and role, plus a **Prompt** for your specific instruction.
  </Card>

  <Card title="Temperature Control" icon="temperature-half">
    Lower temperature for consistent, focused outputs. Higher for more creative responses.
  </Card>

  <Card title="Simple Output" icon="message">
    Returns a single **Agent Response** field with the model's text output.
  </Card>
</CardGroup>

## Configuration

### Central Panel Options

| Setting           | Description                                                                  |
| ----------------- | ---------------------------------------------------------------------------- |
| **Model**         | Choose your LLM (GPT-5.2, Claude Opus 4.5, Gemini 3, Deepseek V3, etc.)      |
| **Prompt**        | Your main instruction—what you want the AI to do                             |
| **System Prompt** | Context and role for the model (e.g., "You are a data extraction assistant") |
| **Temperature**   | Controls randomness: 0 = focused and consistent, 1 = creative and varied     |

### Input Variables

Custom Agent accepts all typed variables:

| Type            | Best Practice                                  |
| --------------- | ---------------------------------------------- |
| **Text**        | Primary input type; most reliable              |
| **Number**      | Convert to string in prompt if needed          |
| **Object/List** | Serialize as JSON string for reliable handling |

<Info>
  For file inputs, use a Text Extraction task first to convert the file to text before passing to Custom Agent.
</Info>

### Output Variables

Custom Agent returns a single output called **Agent Response**, which contains the text generated by the LLM.

<Note>
  Unlike Opus Agent, Custom Agent always returns one text output. If you need multiple structured outputs:

  * use Opus Agent, or
  * parse the Custom Agent's response in a downstream Opus Agent.
</Note>

## Using Custom Agent

<Steps>
  <Step title="Add the task">
    Drag a Custom Agent task into the Builder.
  </Step>

  <Step title="Select a model">
    Choose your preferred LLM from the Model dropdown based on your requirements (capability, cost, latency).
  </Step>

  <Step title="Write the system prompt">
    Define the agent's persona and behavior. Include explicit format instructions for structured outputs.

    ```
    You are a data extraction assistant. Always return valid JSON
    matching the provided schema. Do not include prose or explanations
    outside the JSON structure.
    ```
  </Step>

  <Step title="Configure the user prompt">
    Write the task-specific instructions. Reference input variables using the templating syntax.
  </Step>

  <Step title="Set temperature">
    Use lower temperature (0) for consistent, deterministic outputs. Use higher temperature (closer to 1) for creative tasks.
  </Step>

  <Step title="Set output type and validate">
    Configure the output variable type. Preview with representative data to verify the output format.
  </Step>
</Steps>

## Prompt Engineering For Reliability

The power of Custom Agent comes from precise prompt design. Follow these patterns for consistent results:

### Enforce Structured Output

```
System Prompt:
You are a structured data extractor. Your responses must be valid JSON
matching this exact schema:
{
  "field1": "string",
  "field2": number,
  "field3": ["array", "of", "strings"]
}

Do not include any text outside the JSON. Do not include markdown code fences.
Return only the raw JSON object.
```

### Maintain Consistency

```
System Prompt:
Always format dates as YYYY-MM-DD.
Always format currency as numbers without symbols (e.g., 1000.50).
Always use lowercase for category names.
```

## Best Practices

<AccordionGroup>
  <Accordion title="Constrain inputs to Text">
    Use Opus Text Extraction to extract text from files before passing to Custom Agent.
  </Accordion>

  <Accordion title="Inject explicit format instructions">
    Include schema definitions directly in prompts:

    * "Return only valid JSON matching this schema: `{...}`"
    * "Do not include prose or markdown"
    * "Use null for missing fields, not empty strings"
  </Accordion>

  <Accordion title="Use lower temperature for consistency">
    For structured extraction and deterministic tasks:

    * Set temperature to 0 or near-0
    * Higher temperatures introduce variation
    * Reserve higher temperatures for creative tasks only
  </Accordion>
</AccordionGroup>

## Related Resources

<CardGroup cols={2}>
  <Card title="Opus Agent" icon="robot" href="/tasks/agent/opus-agent">
    Simplified AI tasks with auto-generated blueprints.
  </Card>

  <Card title="Agentic Review" icon="magnifying-glass" href="/tasks/review/agentic-review">
    AI-powered validation and repair for outputs.
  </Card>

  <Card title="Opus Code" icon="code" href="/tasks/agent/opus-code">
    Deterministic Python logic for type validation.
  </Card>

  <Card title="Builder Guide" icon="hammer" href="/guides/builder">
    Learn workflow design fundamentals.
  </Card>
</CardGroup>
