File Processing Guide
Attach Files to an Agent Run
from glaip_sdk import Agent
agent = Agent(name="analysis-agent", instruction="You analyze documents.")
response = agent.run(
"Summarise the document and extract key metrics",
files=["./reports/q1.pdf", "./reports/q2.pdf"],
)
print(response)aip agents run analysis-agent \
--input "Summarise these reports" \
--file reports/q1.pdf \
--file reports/q2.pdf \
--view json > summary.jsoncurl -X POST "$AIP_API_URL/agents/$AGENT_ID/run" \
-H "X-API-Key: $AIP_API_KEY" \
-F "input=Summarise these reports" \
-F "files=@reports/q1.pdf" \
-F "files=@reports/q2.pdf"Common attachment errors
Symptom
Likely cause
Fix
Reuse Chunk IDs from Prior Attachments
Retrieve Artifacts and Output
Best Practices
Related Documentation
Last updated