curl -X POST https://api.case.dev/agent/v1/agents \ -H "Authorization: Bearer $CASEDEV_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Discovery Analyst", "instructions": "You are a legal discovery analyst. When given a vault ID and topic:\n1. Search the vault for relevant documents\n2. Analyze key passages\n3. Compile a summary memo with citations\nUse the casedev CLI for all vault and search operations." }'
Object-level scoping (objectIds) is set per-run, not per-agent. This allows the same agent to
work with different document sets on each execution. See Execute Runs → Object ID scoping.
The instructions field is the agent’s system prompt. It defines personality, capabilities, and constraints. Tips:
Be specific about tools. Tell the agent to use casedev CLI for vault operations, legal search, etc.
Define the output format. “Write a markdown report” or “Return a JSON summary.”
Set boundaries. “Only search the assigned vault” or “Do not modify existing documents.”
Include workflow steps. Numbered steps help the agent stay on track for complex tasks.
curl -X POST https://api.case.dev/agent/v1/agents \ -H "Authorization: Bearer $CASEDEV_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Deposition Summarizer", "instructions": "You summarize depositions. For each deposition:\n1. Use casedev vault search to find the document\n2. Read the full transcript\n3. Identify key admissions, contradictions, and timeline facts\n4. Write a 1-page summary in markdown\n5. Upload the summary to the same vault using casedev vault upload\n6. Return the vault object ID and a presigned download URL\n\nAlways cite page numbers. Use formal legal writing style." }'