Resource Manager
Resource Manager is an aiXplain-managed utility tool that saves files and text into your workspace storage and returns a hosted download URL and resource ID for each item. Use it to persist an agent's outputs — generated documents, reports, datasets — so they can be downloaded or reused later, instead of returning raw content inline.
View the asset on the aiXplain Marketplace.
Setup
from aixplain import Aixplain
aix = Aixplain(api_key="<AIXPLAIN_API_KEY>")
Get the tool
Resource Manager is a built-in utility, so you fetch it by ID rather than connecting it. There is no OAuth step and no config payload.
RESOURCE_MANAGER_ID = "6a0216cffb2a801f1c41e32e"
resource_manager = aix.Tool.get(RESOURCE_MANAGER_ID)
print("Name:", resource_manager.name)
print("Description:", resource_manager.description)
You can also discover it with aix.Tool.search("resource manager").
Available Actions
| Action | Description |
|---|---|
save_content | Save one or more pieces of text as files |
save_files | Save one or more existing files into storage by URL |
Each action takes a data payload. The inputs per action:
| Action | Input | Required | Notes |
|---|---|---|---|
save_content | contents | Yes | List of strings — one file is created per string |
save_content | names | Yes | List of file names, one per content item |
save_content | tags | No | Optional list of tags to attach to the resources |
save_files | urls | Yes | List of source file URLs to ingest |
save_files | names | No | List of file names, one per URL |
save_files | tags | No | Optional list of tags to attach to the resources |
Every successful call returns a list with one entry per item, each containing the resource id, the name, and a signedUrl (a time-limited download link).
Save text content
Write one or more strings to storage and get back a hosted link for each.
result = resource_manager.run(
action="save_content",
data={
"contents": ["Q3 revenue summary: total $1.2M, up 14% QoQ."],
"names": ["q3_summary.txt"],
},
)
print(result.data)
Save files by URL
Ingest existing files by URL into your workspace storage.
result = resource_manager.run(
action="save_files",
data={
"urls": ["https://your-source.example.com/report.pdf"],
"names": ["report.pdf"],
},
)
print(result.data)
On failure, the item is returned with an error field instead of an id/signedUrl:
[{'url': 'https://...', 'name': 'report.pdf', 'error': 'Failed to create file resource'}]
save_files ingests URLs that aiXplain can reach. Source URLs that are not reachable from the platform return Failed to create file resource. For content you generate at runtime, use save_content instead of writing the content to an external URL first.
Use with an Agent
Attach Resource Manager to an agent so it can persist its own outputs and hand back a download link.
resource_manager = aix.Tool.get("6a0216cffb2a801f1c41e32e")
resource_manager.allowed_actions = ["save_content"]
agent = aix.Agent(
name="Report Saver",
description="Writes a short report and saves it as a downloadable file",
instructions=(
"Write the requested report, then save it with the Resource Manager "
"save_content action and return the download link to the user."
),
tools=[resource_manager],
)
agent.save()
response = agent.run(
query="Write a 3-sentence status update for the BrewBox launch and save it as a file."
)
print(response.data.output)
Set allowed_actions to just the action the agent needs (for example ["save_content"]) so the agent is not over-privileged with both actions.
Example Use Cases
- Deliverable hand-off — an agent that generates a deck, PDF, or spreadsheet saves the file and returns a clickable download link instead of inline content
- Report archiving — persist each run's report with tags so it can be retrieved or referenced later
- File ingestion — pull an existing file by URL into your workspace so other agents and workflows can reuse it
Notes
signedUrlvalues are time-limited presigned links. Re-save or re-fetch the resource if the link has expired.save_contentrequires bothcontentsandnames, and the two lists must be the same length.- Resource Manager is a built-in utility — there is no connect/OAuth step and no asset to delete; fetch it with
aix.Tool.get(...)whenever you need it.