⬇ Download PDF
Setup Blueprint · Claude Managed Agents

Your First
Claude Managed Agent

A step-by-step guide to deploying your first AI agent on Anthropic's managed infrastructure — without writing a single line of server code.

7 Steps ● Medium Complexity Launched April 2026
Before you start — checklist
Anthropic API accountconsole.anthropic.com — free to sign up
API keyWith access to Claude Sonnet or Opus
A defined taskKnow exactly what you want the agent to do end-to-end
Tool listWhich APIs or services will the agent call?
30 minutesThat's all you need for a first deployment
The 7 steps
Step 01 Define Your Agent's Job

Answer these three questions before writing any code. Write them down — you'll paste them directly into the config.

Task
What does the agent do when triggered?
"When a lead submits the contact form, research their company, draft a personalised intro email, and add it to the CRM as a draft."
Tools
What APIs or services does it need?
Example: Web search, Google Sheets API, Gmail (draft only)
Guardrails
What is it NOT allowed to do?
"Never send emails directly. Never access data outside the leads spreadsheet."
Step 02 Create Your Credential Vault

Managed Agents stores your API keys in named vaults — no plaintext secrets in prompts. In the Anthropic Console, go to Managed Agents > Credential Vaults.

1. Create a new vault — name it after the project or client
   Example: "lead-research-prod"

2. Add each key your agent will use:
   GOOGLE_SHEETS_KEY: [your key]
   GMAIL_API_KEY:     [your key]
   CRM_WEBHOOK_URL:   [your URL]

3. Save and copy the vault_id — needed in Step 3.

Recommended pattern: one vault per client, or one per environment (staging vs production).

Step 03 Create the Agent via API

POST to the Managed Agents API with the beta header. The API returns an agent_id — save this, it's how you trigger runs.

POST https://api.anthropic.com/v1/managed-agents

Headers:
  anthropic-version: 2024-01-01
  anthropic-beta:    managed-agents-2026-04-01
  x-api-key:         YOUR_API_KEY
  Content-Type:      application/json

Body:
{
  "name":          "lead-research-agent",
  "model":         "claude-sonnet-4-5",
  "system_prompt": "[Paste your system prompt — see Step 4]",
  "tools":         ["web_search", "google_sheets", "gmail"],
  "vault_id":      "YOUR_VAULT_ID",
  "guardrails": {
    "max_runtime_minutes": 10,
    "require_human_review": true,
    "allowed_domains": ["google.com", "linkedin.com"]
  }
}
Step 04 Write Your System Prompt

This is the most important step. Your system prompt defines the agent's workflow, tools and constraints. Copy this template and fill in the blanks.

You are a [role] for [Company Name].

YOUR JOB:
When triggered, you will:
  1. [First task — e.g. search for the lead's company online]
  2. [Second task — e.g. find context about their size/industry]
  3. [Third task — e.g. draft a short, personalised intro email]
  4. [Final task — e.g. log everything to the CRM sheet]

TOOLS YOU CAN USE:
  - web_search:    research companies and contacts
  - google_sheets: read lead data, update CRM rows
  - gmail:         draft emails ONLY — never send directly

RULES:
  - Never send emails. Set status "DRAFT_READY" when done.
  - Never access data outside the leads spreadsheet.
  - If you cannot verify a detail, flag: status "NEEDS_REVIEW"
  - Complete the full workflow before responding.

OUTPUT FORMAT (always return this JSON):
{
  "lead_name":        "",
  "company":          "",
  "research_summary": "",
  "email_draft":      "",
  "status":           "DRAFT_READY | NEEDS_REVIEW | ERROR",
  "notes":            ""
}
Step 05 Trigger a Run

POST to the runs endpoint with your input. The agent wakes up, works through the system prompt step by step, and returns the JSON output. Cost: $0.08/hour of runtime — most tasks finish in 2–4 minutes.

POST https://api.anthropic.com/v1/managed-agents/{agent_id}/runs

Body:
{
  "input": {
    "lead_name": "Sarah Chen",
    "company":   "Acme Corp",
    "email":     "sarah@acme.com",
    "message":   "Interested in CRM automation for our 200-person team"
  }
}
Step 06 Connect a Trigger

Managed Agents doesn't have native webhooks in the current beta. Pick one of these to fire the agent automatically.

Zapier / MakeEasiest
Create an HTTP POST action that fires when a form is submitted or a spreadsheet row is added. No code required.
ReplitLightweight
Host a tiny Express.js server on Replit that listens for webhooks and calls the Managed Agents API. Free tier handles light traffic comfortably.
n8nMost flexible
Use the HTTP Request node to trigger agents from any workflow. Best for complex multi-step automations.
Step 07 Monitor and Iterate

In the Anthropic Console under Managed Agents > Runs, every execution is logged with timestamps, inputs, outputs and a full step-by-step trace. Filter by: COMPLETED | FAILED | RUNNING.

Agent times outReduce scope or raise max_runtime_minutes in guardrails
Tool call failsCheck credential vault — keys may have expired
Wrong output formatTighten the OUTPUT FORMAT section of your system prompt
Hallucinated dataAdd "if unsure, return NEEDS_REVIEW" to your rules
Starter agent ideas
Simple
🔍
Lead EnrichmentName + email in, company research summary out. 1-2 tools. Great first build.
📄
Invoice ClassifierReads incoming PDF invoices, tags them by category in a spreadsheet.
Medium
📬
Support TriageReads inbound emails, categorises, drafts replies, flags urgent for human review.
📊
Weekly ReportPulls CRM data, summarises pipeline, formats a Slack message for Monday morning.
Advanced
🛠
Full Outreach PipelineFinds prospects, researches them, drafts personalised emails, logs everything to the CRM.
🌐
Competitor MonitorScans competitor sites weekly, summarises changes, updates a tracker sheet.

Rather have us build this for you?

This is exactly what OrcaScale does for SMEs — delivered in 3–7 days, before you pay a penny.