diff --git a/content/guides/box-ai/ai-tutorials/extract-metadata-structured.md b/content/guides/box-ai/ai-tutorials/extract-metadata-structured.md index c84f6f93d..2413308a6 100644 --- a/content/guides/box-ai/ai-tutorials/extract-metadata-structured.md +++ b/content/guides/box-ai/ai-tutorials/extract-metadata-structured.md @@ -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 ( @@ -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 \ No newline at end of file +[blog]: https://medium.com/box-developer-blog +[inline-field]: #use-fields-parameter +[metadata-template]: #use-metadata-template \ No newline at end of file