# Give an OpenAI Agents SDK agent document tools: parse and extract

> Install openai-agents and reductoai, then wrap client.parse.run and client.extract.run in @function_tool functions. The agent passes a local path or a public URL; local files are uploaded first with client.upload.

Canonical: https://reducto.ai/tools/reducto-tool-openai-agents-sdk  
Last updated: 2026-11-15  
For: Python developers, Teams building agents on the OpenAI Agents SDK

## How to do it

1. pip install openai-agents reductoai.
2. Set REDUCTO_API_KEY.
3. Copy reducto_tools.py into your project.
4. Pass the tools to your Agent and run it.

## Limits and pricing

- Uses your Reducto API key and its limits.
- No-key fallbacks: 5 pages per document, per-IP rate limit.
- Pricing is per page; see the pricing page.
- Pricing: https://reducto.ai/pricing

## When to use what

- **This tool definition**: when your own agent code decides when to read a document.
- **The hosted MCP server**: when the agent runs in an MCP client (Claude, Cursor, Codex, VS Code).
- **/read or /api/tools**: for one short document without a key.

## FAQ

### Is there an official Reducto package for the Agents SDK?

No: these are plain function tools on the official Reducto Python SDK (pip install reductoai). You can also connect the hosted MCP server instead.

### Why is the schema a string?

Function tools use strict JSON schemas, which do not allow a free-form object argument. Passing JSON Schema as a string keeps the tool strict.

### Where does the API key come from?

Create one at studio.reducto.ai (15,000 free credits), or let the agent sign up over HTTP by following reducto.ai/auth.md. The SDKs read REDUCTO_API_KEY from the environment.

### Can the agent try it without an API key?

Yes, for short documents: GET https://reducto.ai/read/<public URL> returns Markdown, and POST https://reducto.ai/api/tools/<tool> takes a file. Both are free up to 5 pages with a per-IP limit.

### How is it billed?

In credits per page. See the pricing page and the credit usage docs for current rates.

Sample document (synthetic): https://reducto.ai/tools/samples/harborline-bank-statement.pdf

## Related

- [Python SDK docs](https://docs.reducto.ai/sdk/python/overview)
- [OpenAI Agents SDK tools](https://openai.github.io/openai-agents-python/tools/)
- [All agent recipes](https://reducto.ai/tools/agents)
