Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions content/guides/box-ai/ai-tutorials/extract-metadata-structured.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,20 +177,23 @@ The response lists the fields included in the metadata template and their values

### Enhanced Extract Agent

To start using the agent, you need:
To use the Enhanced Extract Agent, specify the `ai_agent` object as follows:

- A Box Platform App with enabled `Manage AI` scope.
- The app installed and enabled in your Box instance.
- A file to test with.

Calling an Enhanced Extract Agent works like calling the AI API - set the `type` to `AI Agent ID`, then string to the Enhanced Extract AI agent.
```bash
{
"ai_agent": {
"type": "ai_agent_id",
"id": "enhanced_extract_agent"
}
}
```

To extract data using the Enhanced Extract Agent you need:
To extract data using the Enhanced Extract Agent you need one of the following:

- Inline field definitions created with `agentCreateAiExtractStructuredMetadataTemplate` if your fields change frequently,
- or a metadata template that contains the data about the fields you wish to extract, if your extracted fields stay the same.
- [Inline field definitions][inline-field] (best when fields change frequently)
- [Metadata template][metadata-template] (best when fields stay consistent)

See the full sample Python script that demonstrates how to call the Enhanced Extract Agent on a file using the Box AI SDK:
See the sample code snippet using Box Python SDK:

```Python
from box_sdk_gen import (
Expand Down Expand Up @@ -246,4 +249,6 @@ print(f"box_ai_response: {box_ai_response.answer}")
[templates-api]: g://metadata/templates/create
[overrides]: g://box-ai/ai-agents/ai-agent-overrides
[changelog]: page://changelog
[blog]: https://medium.com/box-developer-blog
[blog]: https://medium.com/box-developer-blog
[inline-field]: #use-fields-parameter
[metadata-template]: #use-metadata-template
Loading