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

# Using Platform Resources

> Access storage, model providers, and execution context from plugins

Noxus provides a set of core resources that plugins can consume to interact with the platform and external services.

## Resource Categories

### 1. Storage & Artifacts

Plugins can interact with the platform's **Liquid Data** storage tiers.

```python theme={null}
# Accessing files from the context
async def execute(self, inputs, context):
    # Read a file from object storage
    file_content = await context.files.read(inputs['file_id'])
    
    # Save a new artifact
    await context.artifacts.save(
        name="processed_data.csv",
        content=my_csv_string,
        content_type="text/csv"
    )
```

### 2. Model Providers

Access the unified AI model interface directly from your plugin nodes.

```python theme={null}
# Calling an LLM through the platform
response = await context.models.chat(
    provider="openai",
    model="gpt-4o",
    messages=[{"role": "user", "content": "Analyze this data"}]
)
```

### 3. Execution Context

Every plugin execution receives a rich `RemoteExecutionContext` object. This object provides access to the current execution state, configuration, and credentials.

#### Context Schema

The `context` object (of type `RemoteExecutionContext`) contains the following key attributes and methods:

| Attribute / Method                  | Type              | Description                                                                          |
| :---------------------------------- | :---------------- | :----------------------------------------------------------------------------------- |
| `plugin_config`                     | `dict`            | The effective configuration for the plugin, including admin and workspace overrides. |
| `integration_credentials`           | `dict[str, dict]` | A dictionary of credentials for the integrations required by the node.               |
| `get_integration_credentials(name)` | `method`          | Helper method to safely retrieve credentials for a specific integration by its name. |

```python theme={null}
# Using context metadata and credentials
async def execute(self, inputs, context: RemoteExecutionContext):
    # Access plugin-level configuration
    timeout = context.plugin_config.get("api_timeout", 30)
    
    # Retrieve credentials for a specific integration
    creds = context.get_integration_credentials("my-external-service")
    api_key = creds.get("api_key")
    
    # Use credentials in your logic
    async with httpx.AsyncClient() as client:
        response = await client.get(f"{self.config.url}", headers={"X-API-Key": api_key})
```

***

## Best Practices

<AccordionGroup>
  <Accordion title="Storage usage" icon="hard-drive">
    Treat storage as external I/O. Use deterministic paths and explicit retention behavior. Always use the platform's file handling utilities to ensure compatibility across different storage backends.
  </Accordion>

  <Accordion title="Model usage" icon="brain">
    Prefer provider-agnostic contracts. Keep provider-specific assumptions behind plugin adapters to allow users to switch models easily.
  </Accordion>

  <Accordion title="Context usage" icon="circle-info">
    Pass only required context to reduce coupling and accidental data exposure. Use the context object to ensure your plugin respects workspace-level boundaries.
  </Accordion>

  <Accordion title="Failure handling" icon="triangle-exclamation">
    Use retries with backoff for transient external failures and return actionable errors. The platform's execution engine will handle retries based on your node's configuration.
  </Accordion>
</AccordionGroup>

<Card title="Creating Integrations" icon="plug" href="/developers/plugins/creating-integrations">
  Build robust connectors to external systems using platform resources.
</Card>
