> ## 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.

# Opus Agent

> The default AI workhorse for LLM-based reasoning, extraction, and generation with typed inputs and outputs.

The Opus Agent is your go-to tool for AI-powered automation. Describe what you want in plain English, and it generates a step-by-step blueprint to accomplish the task. You can refine the blueprint, adjust the steps, or convert it to code for full control.

## Key Capabilities

<CardGroup cols={2}>
  <Card title="Natural Language to Blueprint" icon="wand-magic-sparkles">
    Describe what you want to do, and Opus generates a step-by-step blueprint with the inputs and outputs it needs.
  </Card>

  <Card title="Iterative Refinement" icon="arrows-rotate">
    Edit the generated steps, add new ones, remove what you don't need, or regenerate with updated instructions.
  </Card>

  <Card title="Auto-Linked Variables" icon="link">
    The Builder automatically connects outputs from previous tasks to inputs by matching names and types.
  </Card>

  <Card title="Switch to Code" icon="code">
    Convert any blueprint to Python code for full control while keeping the same inputs and outputs.
  </Card>
</CardGroup>

## How The Blueprint Works

When you describe your task in the central description field, Opus Agent generates a blueprint—a series of **Required Steps** that break down your request into smaller actions.

Each step has:

* **Objective**: What the step aims to accomplish
* **Description**: How the step will be carried out

After generation, you can:

* **Edit steps** manually to fine-tune the logic
* **Add new steps** if something is missing
* **Delete steps** you don't need
* **Regenerate** by adding more instructions and clicking Generate again

<Tip>
  The blueprint also auto-generates the Input and Output variables based on what your task needs. You can always adjust these manually.
</Tip>

## Operating Modes

Opus Agent offers two modes:

<Tabs>
  <Tab title="Lite">
    The fastest way to get started with AI tasks.

    **How it works:**

    1. Describe your goal in natural language
    2. The system generates a multi-step blueprint
    3. Input and output variables are auto-inferred
    4. Tweak the blueprint as many times as you need—your inputs and outputs stay intact based on your described task

    **Best for:**

    * Content generation
    * Data extraction
    * Summarization and classification
    * Reliable processing that behaves as expected, even at enterprise scale
  </Tab>

  <Tab title="Advanced">
    Accomplish the blueprint's tasks by writing and running code.

    **How it works:**

    1. Start with a blueprint (same as Lite mode)
    2. Switch to Advanced mode
    3. Click <Icon icon="hammer" /> **Build** to generate the code from your blueprint
    4. Run the task using the built code

    **Best for:**

    * Custom logic not expressible in blueprints
    * Fine-grained control over execution
    * Deterministic post-processing
    * Advanced users who want full flexibility
  </Tab>
</Tabs>

## Using Opus Agent

<Steps>
  <Step title="Add the task">
    Click the **+** button or drag an Opus Agent task into the Builder.
  </Step>

  <Step title="Describe what you want">
    In the central description field, write what you want the task to do. For example: *"Extract the customer name, invoice date, and total amount from the document."*
  </Step>

  <Step title="Generate the blueprint">
    Click **Generate**. Opus creates a blueprint with Required Steps, each having an Objective and Description. It also auto-generates the Input and Output variables.
  </Step>

  <Step title="Refine if needed">
    Review the steps. Edit, add, or delete them as needed. You can also add more instructions and click **Generate** again to update the blueprint.
  </Step>

  <Step title="Link variables">
    Use **Auto Link** to automatically connect inputs to matching outputs from previous tasks. You can also link them manually.
  </Step>

  <Step title="Preview and test">
    Run a preview with sample data to make sure outputs look right before activating the workflow.
  </Step>
</Steps>

## Best Practices

<AccordionGroup>
  <Accordion title="Stabilize IO types early">
    Define your input and output variable types at the start of your design.

    * Finalize output structures before building downstream logic
    * Regenerate the blueprint if IO changes materially
    * Test with representative data in preview mode
  </Accordion>

  <Accordion title="Prefer structured outputs">
    When downstream logic will branch or serialize data, use JSON mapped to Object variables:

    * Explicit schemas reduce parsing errors
    * Structured outputs are easier to validate
    * Type discipline improves workflow reliability
  </Accordion>

  <Accordion title="Validate in preview">
    Always preview tasks with representative data before activation:

    * Check that output types render as expected
    * Verify variable mappings are correct
    * Test edge cases (empty inputs, long content)
  </Accordion>

  <Accordion title="Use code conversion strategically">
    The **Switch to Advanced** button converts your blueprint into an Advanced Task:

    1. Click **Switch to Advanced**
    2. Click **Build** to generate the full code from your blueprint
    3. Run the task using the built code

    This gives you full control while preserving your inputs and outputs.
  </Accordion>
</AccordionGroup>

## Common Use Cases

### Document Summarization

Extract key points from lengthy documents:

```
Input: document_text (Text)
Output: summary (Text), key_points (List)

Prompt: "Summarize the following document, extracting the
main thesis and up to 5 key points. Return as structured JSON."
```

### Data Extraction

Pull structured fields from unstructured text:

```
Input: raw_text (Text)
Output: extracted_data (Object)

Prompt: "Extract the following fields from the text:
name, date, amount, category. Return as JSON matching
the output schema exactly."
```

### Classification

Categorize content into predefined buckets:

```
Input: content (Text), categories (List)
Output: classification (Text), confidence (Number)

Prompt: "Classify the content into one of the provided
categories. Return the category name and a confidence
score between 0 and 1."
```

## Related Resources

<CardGroup cols={2}>
  <Card title="Custom Agent" icon="sliders" href="/tasks/agent/custom-agent">
    Direct control over LLM selection and prompting.
  </Card>

  <Card title="Agentic Review" icon="robot" href="/tasks/review/agentic-review">
    AI-powered review to validate and repair outputs.
  </Card>

  <Card title="Opus Code" icon="code" href="/tasks/agent/opus-code">
    Custom Python logic for deterministic transformations.
  </Card>

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