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

# close • AI Agent SDK

> close: Finalize the upload and return the resulting :class:`AttachmentRef`.

# close

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**AttachmentStoreProtocol**](../classes/AttachmentStoreProtocol) class in the [**protocols**](../modules/protocols) module.

Finalize the upload and return the resulting :class:`AttachmentRef`.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def close(ref_id: str) -> AttachmentRef
```

## Parameters

<ParamField query="ref_id" type="str" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="AttachmentRef">
  The result of the operation.
</ResponseField>

## Used By

* [`Agent.close`](../functions/Agent-close)
* [`Agent.close`](../functions/Agent-close)
* [`Agent.aclose`](../functions/Agent-aclose)
* [`Agent.aclose`](../functions/Agent-aclose)
* [`Agent.aclose`](../functions/Agent-aclose)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L685">
  `praisonaiagents/gateway/protocols.py` at line 685
</Card>
