{
  "markdown": "# @agentled/mcp-server\n\n> The automation engine built for AI agents. Intelligent AI workflow orchestration with long-term memory, 100+ integrations, and unified credits.\n\n[![npm version](https://img.shields.io/npm/v/@agentled/mcp-server.svg)](https://www.npmjs.com/package/@agentled/mcp-server)\n[![license](https://img.shields.io/npm/l/@agentled/mcp-server.svg)](https://github.com/Agentled/mcp-server/blob/main/LICENSE)\n\n[![Agentled Server MCP server](https://glama.ai/mcp/servers/Agentled/mcp-server/badges/card.svg)](https://glama.ai/mcp/servers/Agentled/mcp-server)\n\n## What is Agentled?\n\n[Agentled](https://www.agentled.app) is the automation engine built for AI agents.\nIt gives Claude, Codex, Cursor, Windsurf, and any MCP-compatible client direct access\nto intelligent workflow orchestration, long-term memory, and 100+ integrations.\n\n**Three things make it different:**\n\n🧠 **Long-Term Memory** — A built-in Knowledge Graph stores insights across\nworkflow executions. Your agents get smarter over time — they remember past\nresearch, lead scores, content performance, and business context.\n\n⚡ **Unified Credits** — One API key, one credit system, 100+ services.\nNo need to sign up for LinkedIn, email, scraping, AI models, or video\ngeneration separately. Connect once, use everything.\n\n🎯 **Intelligent Orchestration** — AI reasons at every step. Workflows\naren't just \"if this then that\" — they understand context, make decisions,\nand adapt to results.\n\n## See it in action\n\n```\n$ agentled create \"Outbound to fintech CTOs in Europe\"\n\nLoading workspace context from Knowledge Graph...\n✦ ICP loaded  ✦ 3 prior campaigns  ✦ 847 contacts in KG\n\nCreating campaign with 3 workflows...\n\n━━ Workflow 1: Prospect Research  linkedin · hunter · clearbit\n  ✓ LinkedIn: CTO + fintech + EU → 189 profiles\n  ✓ Enriched via Hunter + Clearbit → 156 matched\n  ✓ ICP scoring → 43 high-intent leads\n\n━━ Workflow 2: Signal Detection  web-scraper · crunchbase\n  ✓ Job postings → 12 hiring devops\n  ✓ Crunchbase → 8 recently funded\n  ✓ Cross-match: hiring + funded → 5 hot leads\n\n━━ Workflow 3: Outreach  email · linkedin · kg\n  ✓ Personalized emails from context\n  ✓ LinkedIn requests with custom notes\n  ✓ 43 leads saved to Knowledge Graph\n\nCampaign saved. Scheduled: every 48h\nCredits used: 720\n→ https://www.agentled.app/your-team/fintech-cto-outbound\n```\n\nOne prompt. Three workflows. LinkedIn enrichment, email finding, AI scoring, multi-channel outreach — all orchestrated, all stored in the Knowledge Graph for the next run.\n\n## Quick Start\n\n```bash\nclaude mcp add --transport stdio --scope user agentled \\\n  -e AGENTLED_API_KEY=wsk_... \\\n  -- npx -y @agentled/mcp-server\n```\n\n`--scope user` registers the server in your user MCP config so it loads in **every** project (not only the repo where you ran the command). Use a distinct server name (e.g. `agentled_my_workspace`) if you add multiple workspaces. For team-shared config in git, use `--scope project` and `.mcp.json` instead ([Claude Code MCP scopes](https://code.claude.com/docs/en/mcp)).\n\n### Claude Code plugin (one-step install)\n\nPrefer the plugin if you want the MCP server **and** the Agentled skill installed together. In Claude Code:\n\n```\n/plugin marketplace add Agentled/mcp-server\n/plugin install agentled@agentled\n```\n\nThen set your API key in the shell Claude Code runs from:\n\n```bash\nexport AGENTLED_API_KEY=wsk_...\n```\n\nThe plugin bundles the `agentled` skill (workflow-authoring guidance, namespaced `agentled:agentled`) and auto-starts the MCP server via `npx -y @agentled/mcp-server`. The same plugin directory also carries the Codex manifest (`.codex-plugin/`) and Codex lifecycle hooks — one bundle, both hosts.\n\n### Grok Build plugin\n\nThe same portable plugin includes a Grok Build manifest at\n`plugins/agentled/.grok-plugin/plugin.json`. It starts the published local\nstdio MCP server declared in `.mcp.json`; it does not contain an AgentLed API\nkey, OAuth client secret, workspace ID, or customer data. Authenticate with\nyour own AgentLed CLI profile before installing it in Grok Build, then start\nwith read-only tool discovery. Marketplace submission material is in\n[`plugins/agentled/GROK_MARKETPLACE_SUBMISSION.md`](plugins/agentled/GROK_MARKETPLACE_SUBMISSION.md).\n\nFor Codex, the hook pack acts as in-session guidance around the CLI/MCP loop:\nsession start explains the Agentled/Codex business-loop split, prompt/tool hooks\nadd turn-level guidance when client needs, priorities, failures, or product gaps\nappear, and stop hooks nudge implementation handoffs to include readiness,\nvalidation, side effects, and next decision. Hooks do not store feedback, call\nAgentled APIs, run automations, spend credits, or perform customer/workspace\nwrites. In Codex, run `/hooks` after installing or changing the plugin so the\nlocal hook definitions are reviewed and trusted before they run.\n\nUse Codex automations for outside-workspace FDE cadence such as Outlook/client\nemail follow-up, vendor replies, repo/build checks, and weekly operator reviews.\nUse Agentled routines for Agentled workspace/runtime checks such as workflow\nhealth, routine health, execution review, workspace summaries, and managed-agent\noperations. Use `submit_feedback_to_agentled` or `agentled feedback submit` when\nthe user explicitly wants product feedback captured.\n\n> **Pick one install path, not both.** If you previously ran `claude mcp add agentled ...` or `--setup-skills`, remove those before (or instead of) installing the plugin — otherwise you get two identical MCP server processes and the skill registered twice. Cleanup: `claude mcp remove agentled` and delete `.claude/skills/agentled/` (or `~/.claude/skills/agentled/`). `--setup-skills` now detects an installed plugin and refuses to double-register unless you pass `--force`.\n\nTo develop the plugin locally:\n\n```bash\nclaude --plugin-dir ./plugins/agentled     # load from source\nclaude plugin validate ./plugins/agentled  # check manifest + structure\n```\n\n> `plugins/agentled/skills/` is a generated mirror of `skills/` (synced by `publish.sh`) — edit `skills/agentled/SKILL.md`, never the mirror.\n\n### Local development\n\nUse the local built entrypoint when you want to test unpublished changes against a\nlocal app. `npx -y @agentled/mcp-server` always uses the latest published npm package.\n\n```bash\ncd agentled-mcp-server\nnpm run build\n\nclaude mcp add --transport stdio agentled_local \\\n  --env AGENTLED_API_KEY=wsk_... \\\n  --env AGENTLED_URL=http://localhost:8080 \\\n  -- node /absolute/path/to/agentsled-front/agentled-mcp-server/dist/index.js\n```\n\n### Getting your API key\n\n1. Sign up at [agentled.app](https://www.agentled.app)\n2. Open **Workspace Settings > Developer**\n3. Generate a new API key (starts with `wsk_`)\n\n## Why Agentled MCP?\n\n### One API Key. One Credit System. 100+ Services.\n\nNo need to sign up for LinkedIn APIs, email services, web scrapers, video generators, or AI models separately. Agentled handles all integrations through a single credit system.\n\n| Capability | Credits | Without Agentled |\n|-----------|---------|-----------------|\n| LinkedIn company enrichment | 50 | LinkedIn API ($99/mo+) |\n| Email finding & verification | 5 | Hunter.io ($49/mo) |\n| AI analysis (Claude/GPT/Gemini) | 10-30 | Multiple API keys + billing |\n| Web scraping | 3-10 | Apify account ($49/mo+) |\n| Image generation | 30 | DALL-E/Midjourney subscription |\n| Video generation (8s scene) | 300 | RunwayML ($15/mo+) |\n| Text-to-speech | 60 | ElevenLabs ($22/mo+) |\n| Knowledge Graph storage | 1-2 | Custom infrastructure |\n| CRM sync (Affinity, HubSpot) | 5-10 | CRM API + middleware |\n\n### Workflows That Learn\n\nOther automation tools start from zero every run. Agentled's Knowledge Graph remembers across executions — what worked, what didn't, what humans corrected. Scoring workflows can use compact row-level `scoring_profile` summaries and bounded scoring-memory retrieval so every run compounds on the last without dumping raw history into prompts.\n\n```\nRun 1:  Investor scoring → 62% accuracy (cold start)\nRun 5:  → 78% (learning from IC feedback)\nRun 12: → 89% (compound learning from outcomes, zero manual tuning)\n```\n\n### Intelligent Orchestration\n\nUnlike trigger-action tools, Agentled workflows have AI reasoning at every step. Multi-model support (Claude, GPT-4, Gemini, Mistral, DeepSeek, Moonshot), adaptive execution, and human-in-the-loop approval gates when needed.\n\n### Agent Teams\n\nAgent Teams let you run multiple AI specialists in a single workflow step. Pick a preset and describe what you need — the team handles coordination, delegation, and synthesis.\n\n```\n\"Add an Agent Team step that researches the company and produces an investment memo\"\n```\n\nSix built-in presets cover the most common patterns:\n\n| Preset | What it does |\n|--------|-------------|\n| `research-and-summarize` | Specialists gather information, one synthesizes a summary |\n| `analyze-and-recommend` | Multiple analysts evaluate options, produce a ranked recommendation |\n| `generate-then-review` | A generator drafts content, reviewers critique and refine |\n| `compare-options` | Specialists argue for competing options, coordinator arbitrates |\n| `investigate-in-parallel` | Independent specialists explore different angles simultaneously |\n| `review-and-improve` | Reviewers find issues, an editor applies improvements |\n\nWhen creating Agent Team steps via MCP, include preset metadata so the step opens correctly in the builder:\n\n```json\n{\n  \"id\": \"analyze\",\n  \"type\": \"agentOrchestrator\",\n  \"name\": \"Agent Team\",\n  \"orchestratorConfig\": {\n    \"pattern\": \"supervisor\",\n    \"workers\": [\n      { \"id\": \"researcher\", \"name\": \"Researcher\", \"systemPrompt\": \"Research {{input.company_url}} — team, funding, market position\" },\n      { \"id\": \"analyst\", \"name\": \"Analyst\", \"systemPrompt\": \"Analyse the research. Identify risks and growth signals.\" }\n    ]\n  },\n  \"metadata\": {\n    \"agentTeamPreset\": \"research-and-summarize\",\n    \"agentTeamMode\": \"simple\",\n    \"agentTeamUxVersion\": 1\n  },\n  \"next\": { \"stepId\": \"milestone\" }\n}\n```\n\nExisting steps created with raw `orchestratorConfig` and no metadata continue to work — they open in advanced mode in the builder without errors.\n\n\n## Analytics vs ROI semantics\n\nWhen describing workflow outcomes, keep these terms separate:\n\n- `pipeline.analyticsConfig` = **business metrics** (execution outcome stats shown in Business Metrics cards/charts).\n- `pipeline.metadata.roi` = **ROI assumptions/rollups** (time saved and cost-value estimates).\n\nIf you update one without the other, name exactly what changed (e.g. \"business metrics configured\" vs \"ROI assumptions configured\").\n\n## CLI parity guard\n\nThe repository includes an automated parity guard so MCP tool additions do not silently drift from the CLI surface.\n\n- Test: `__tests__/cli/cli-mcp-parity.test.ts`\n- Docs: `docs/CLI_MCP_PARITY.md`\n\nRun it with:\n\n```bash\nyarn test:node -- cli-mcp-parity.test.ts\n```\n\n## What Can You Build?\n\n### Lead Enrichment & Sales Automation\n\n```\n\"Find fintech CTOs in Europe, enrich via LinkedIn + Hunter, score by ICP fit,\ndraft personalized outreach, save everything to the Knowledge Graph\"\n```\n\n### Content & Media Production\n\n```\n\"Scrape trending topics in our niche, generate 5 LinkedIn posts with AI,\ncreate thumbnail images, schedule publishing for the week\"\n```\n\n### Company Research & Intelligence\n\n```\n\"Research this company from its URL — team, funding, market position, competitors.\nGenerate an investment memo. Store in KG for future reference.\"\n```\n\n### VC Investor Matching (real case study)\n\n```\n\"Match this startup against our 2,000+ investor database. Score by sector focus,\nstage preference, check size, and portfolio synergy. Compare with last round's outcomes.\"\n```\n\n3,000+ profiles processed. IC-ready reports. Prediction vs outcome learning — accuracy went from 62% to 89% over 12 runs with zero manual tuning.\n\n## Built-in Skills And Integrations\n\n**Media Production:** Video generation, image generation, text-to-speech, auto-captions, media assembly\n\n**AI Intelligence:** Multi-model AI (Claude, GPT-4, Gemini, Mistral, DeepSeek, Moonshot, xAI), Knowledge Graph, feedback loops, scoring & analytics\n\n**Data & Integration:** LinkedIn (search, enrich, post), email (send, personalize), web scraping, social publishing, CRM sync, document analysis, OCR\n\n## Available Tools\n\n### Use-case operating guides\n\nWhen work starts from an existing workflow ID, call `get_workflow` first and\ninspect `useCaseContext`. Then call `get_use_case` with the returned key or\nworkflow graph ID, and read any `operatingGuides` before answering\nworkflow-specific questions, running backfills, or editing live config. Missing\nguide warnings mean the operating README is not attached yet and the context is\nincomplete.\n\nWhen work starts from a user's business goal rather than an existing workflow,\nuse [How to Build Use Cases From User Goals](../docs/HOW_TO_BUILD_USE_CASES_FROM_USER_GOALS.md).\nIt covers the external-agent lifecycle from bounded chat result to KG text/list\nstate, `WorkspaceUseCase`, workflows, approval queues, and home summary updates.\n\n### Workflows\n\n| Tool | Description |\n|------|-------------|\n| `list_workflows` | List all workflows in the workspace |\n| `get_workflow` | Get full workflow definition by ID, including `useCaseContext` when linked |\n| `get_workflow_credits` | Get ledger-derived, period-labelled workflow credit usage; opt in to cost drivers with `includeCostDrivers` |\n| `create_workflow` | Create a new workflow from pipeline JSON |\n| `update_workflow` | Update an existing workflow (top-level scalars; for context/metadata prefer `update_workflow_context`) |\n| `update_workflow_context` | Workflow-level analog of `update_step` — three explicit verbs (`updates` / `replace` / `unset`) on `context.*` and `metadata.*` paths, returns `diff` + `warnings` |\n| `add_step` | Add a step with automatic positioning and next-pointer rewiring |\n| `update_step` | Deep-merge updates into a single step by ID |\n| `remove_step` | Remove a step with automatic next-pointer rewiring |\n| `delete_workflow` | Permanently delete a workflow |\n| `validate_workflow` | Validate pipeline structure, returns errors per step |\n| `publish_workflow` | Change workflow status (draft, live, paused, archived) |\n| `export_workflow` | Export a workflow as portable JSON |\n| `import_workflow` | Import a workflow from exported JSON |\n\n### Public Form Links\n\nPublic form links are the external intake surface for workflows with\n`context.executionInputConfig` fields. Use them when people outside the\nworkspace need to submit a workflow form without signing in: inbound lead\nforms, pitch deck submissions, referral forms, support intake, assessment\nquestionnaires, or any workflow whose first step is a manual/input trigger.\n\nDo **not** use a public form link for internal child workflows. Child workflows\nshould use `context.executionInputConfig.internal: true` and be called from\nanother workflow with `agentled.call-workflow`.\n\n| Tool | Description |\n|------|-------------|\n| `list_public_form_links` | List existing public form links for a workflow |\n| `create_public_form_link` | Create and enable a public form link |\n| `update_public_form_link` | Enable/disable a link or update limits, expiry, auto-share, and thank-you copy. To revoke external access, set `enabled: false`. |\n\n> **Deletion is intentionally not exposed via the external API or MCP.** To\n> revoke a public form link, call `update_public_form_link` with\n> `enabled: false`. Permanent deletion requires an authenticated workspace\n> member acting through the UI — destructive ops on the form-link surface are\n> not granted to the public API key.\n\nTypical agent flow:\n\n```text\n1. get_workflow({ workflowId })\n2. Confirm context.executionInputConfig exists and is not internal.\n3. list_public_form_links({ workflowId })\n4. If none exists, create_public_form_link({ workflowId, enabled: true })\n5. Return the publicUrl to the user.\n```\n\nThe public URL is `/en/forms/{formLinkId}`. On submit, Agentled validates the\nform link, starts the workflow with the submitted `input`, records a\n`PublicFormSubmission`, and increments `submissionCount`. Optional settings:\n\n- `enabled`: disable without deleting the link.\n- `expiresAt`: ISO datetime expiry.\n- `submissionLimit`: maximum accepted submissions.\n- `autoShare`: when true, the public form status page can show generated\n  results after completion. Use this only when the workflow output is safe for\n  the submitter to see.\n- `shareExpiresInDays`: expiry for auto-shared result links.\n- `successMessage`: custom thank-you message after submission.\n\n### Internal-only Workflows\n\nMark a workflow as a child / sub-workflow that is only run via `agentled.call-workflow` from an orchestrator by setting `context.executionInputConfig.internal: true`. The UI then hides the Run button and replaces the manual run form with an info banner. Inputs are still validated and passed by orchestrators via `executionInputData` exactly as before — this is a UI guard, not a runtime restriction.\n\nUse it for any workflow whose goal/description starts with \"Internal sub-workflow\", that ends in a `return` step, or that you only intend to invoke from another workflow.\n\n```json\n{\n  \"context\": {\n    \"executionInputConfig\": {\n      \"title\": \"Save Sourced Candidates\",\n      \"internal\": true,\n      \"fields\": [{ \"name\": \"candidates\", \"label\": \"Candidates\", \"type\": \"text\", \"required\": true }]\n    }\n  }\n}\n```\n\nFlip the flag via `update_workflow_context` — fetch first, merge locally, replace at the parent level (the merge-order trap from `update_step` applies here too — see [`docs/MCP_STEP_EDITING.md`](../docs/MCP_STEP_EDITING.md)):\n\n```jsonc\n// 1. get_workflow → read context.executionInputConfig\n// 2. local: { ...executionInputConfig, internal: true }\n// 3.\n{\n  \"updates\": { \"context\": { \"executionInputConfig\": {...full merged value...} } },\n  \"replace\": [\"context.executionInputConfig\"]\n}\n```\n\n### Editing existing workflows: merge model\n\n`update_step` accepts three explicit operations on the same call. At least one must be non-empty.\n\n- **`updates`** — partial step patch, **deep-merged ONE LEVEL deep**. Top-level scalars are replaced; nested objects (`pipelineStepPrompt`, `stepInputData`, etc.) get their direct keys merged with the stored value's keys. Keys nested two levels deep are overwritten as a unit, not merged.\n- **`replace: string[]`** — dot-paths whose values from `updates` are assigned **wholesale**, skipping the deep-merge. Use this for **dictionary-shaped fields where keys are user data** (not config) — patching one inner key with `updates` alone silently wipes the others.\n- **`unset: string[]`** — dot-paths to delete. Each path must currently exist on the step (validated against the original).\n\n**Read before editing dictionary fields.** Before changing `stepInputData.fieldUpdates`, `pipelineStepPrompt.responseStructure`, `knowledgeSync.fieldMapping`, or any field where keys are user data: call `get_step({ workflowId, stepId })` (~1KB), modify locally, send the full new object back via `replace[]`. This avoids the \"patched one key, silently wiped the others\" trap.\n\n**Diff in the response.** Every `update_step` call returns `diff: { addedPaths, changedPaths, removedPaths }` and `warnings[]`. If the merge silently removed ≥6 fields without an explicit `unset`, a warning fires.\n\n**What to use where:**\n\n| Path / field | API | How to edit | Notes |\n|---|---|---|---|\n| `name`, `goal`, `description`, `pipelineStepPrompt.template`, `creditCost` | `update_step` | `updates` | Plain scalar; safe to send alone. |\n| `next`, `loopConfig`, `entryConditions` (full block) | `update_step` | `updates` | Direct nested config; sending the new value wholesale is fine. |\n| `tools`, `integrations` | `update_step` | `updates` | Arrays replace wholesale by design. To append, fetch with `get_step`, splice locally, send the full new array. |\n| `stepInputData.fieldUpdates` | `update_step` | `get_step` → `updates` (full dict) + `replace: [\"stepInputData.fieldUpdates\"]` | Keys are user data; default one-level merge replaces this dict and can drop sibling mappings. |\n| `pipelineStepPrompt.responseStructure` | `update_step` | `get_step` → `updates` + `replace: [\"pipelineStepPrompt.responseStructure\"]` | Output-shape dictionary; treat as user data. |\n| `knowledgeSync.fieldMapping` | `update_step` | `get_step` → `updates` + `replace: [\"knowledgeSync.fieldMapping\"]` | Source→target dict; same trap as `fieldUpdates`. |\n| `renderer.config` (when preserving sibling keys matters) | `update_step` | `updates` (full `renderer.config`) + `replace: [\"renderer.config\"]` | ⚠ `replace: [\"renderer.config.layout\"]` does NOT protect `renderer.config`'s siblings — one-level deep-merge runs first on `updates.renderer`. Replace at the parent level. |\n| `entryConditions.criteria` (when preserving the rest of `entryConditions`) | `update_step` | `updates: { entryConditions: {...full block...} }` | Send the full `entryConditions` block; one-level merge already does the right thing for direct children. |\n| Removing a step input or stale field | `update_step` | `unset: [\"stepInputData.oldKey\"]` | Cleanest way to remove. Path must exist on the original. |\n| `context.inputPages`, `context.outputPages`, `context.executionInputConfig` | `update_workflow_context` | Three explicit verbs (`updates` / `replace` / `unset`) on workflow-relative paths. Compatibility: `{ contextKey, value }` still accepted for wholesale per-key replacement. | **Workflow-level, not step-level.** `update_step` cannot reach `context.*` and vice versa. |\n| `metadata` | `update_workflow_context` | Same three verbs on `metadata.*` paths | Workflow-level. Metadata bypasses the draft snapshot — even on live workflows it writes direct to the Pipeline row, immediately. |\n\n**Executive summaries for workflow groups.** When a user asks to save a summary for a workflow, workflow group, cluster, or home card, write it to `metadata.executiveSummary` with `update_workflow_context`. Do not store it as Knowledge text unless the user explicitly asks for a reusable note. For a group, write exactly once to the owner pipeline: prefer `metadata.workflowGraph.role === \"orchestrator\"`, otherwise use the lowest `metadata.workflowGraph.order` pipeline. Keep the body to 1-2 short sentences, include concrete counts/rates and the reporting period when available, and set `author` to the active workspace agent, not the external tool/coding agent.\n\n```jsonc\n{\n  \"workflowId\": \"2e1cdd60-2fcf-441a-856f-583ae76b38a5\",\n  \"updates\": {\n    \"metadata\": {\n      \"executiveSummary\": {\n        \"body\": \"Startup Outreach sent 46 founder emails for the reporting period, with 28 opens and 9 clicks: a 60.9% open rate, 19.6% click rate, and 32.1% click-to-open rate.\",\n        \"bullets\": [\"Clicks: 6 UTM Pitch Night, 2 plain Pitch Night, 1 calendar.\"],\n        \"generatedAt\": \"2026-06-03T00:00:00.000Z\",\n        \"author\": \"AngelHive Assistant\"\n      }\n    }\n  }\n}\n```\n\n**Type changes.** `step.type` is technically mutable but stale type-specific fields (`pipelineStepPrompt`, `app`, `tools`, `orchestratorConfig`) persist unless you `unset` them. For clean conversions, prefer `remove_step` + `add_step`.\n\n**Live workflows.** Edits are routed to a draft snapshot. Response includes `editingDraft: true`. Inspect via `get_draft`, ship via `promote_draft`, throw away via `discard_draft`. For high-stakes edits, `create_snapshot` first as a manual checkpoint.\n\n**Draft staleness.** When a draft exists, every `update_step` and `get_step` response includes a `draft` summary with `exists`, `draftCreatedAt`, `liveUpdatedAt`, `stale`, `modifiedStepIds`, and `modifiedFields`. If `draft.stale === true`, the live workflow advanced after the draft was created — promoting will land the draft's older values for fields you didn't touch. `update_step` also emits a staleness warning. Recovery: `discard_draft` and re-apply.\n\n⚠ **`discard_draft` only reverts pending context (and step) changes — NOT metadata.** Metadata writes via `update_workflow_context` bypass the draft and apply immediately to the live Pipeline row. If you need a single rollback point covering metadata too, `create_snapshot` before the edit. See [`docs/MCP_STEP_EDITING.md`](../docs/MCP_STEP_EDITING.md) for the full atomicity contract.\n\n**Never** send a full `steps[]` array via `update_workflow`. Use `update_step`, `add_step`, `remove_step` instead.\n\nFor the deep reference (StepMergeError codes, dot-path validation rules, full diff semantics) see [`docs/MCP_STEP_EDITING.md`](../docs/MCP_STEP_EDITING.md).\n\n### Drafts & Snapshots\n\n| Tool | Description |\n|------|-------------|\n| `get_draft` | Get the current draft version of a workflow |\n| `promote_draft` | Promote a draft to the live version |\n| `discard_draft` | Discard the current draft |\n| `create_snapshot` | Create a manual config snapshot |\n| `delete_snapshot` | Delete a specific config snapshot |\n| `list_snapshots` | List version snapshots for a workflow |\n| `get_snapshot_content` | Read a snapshot's full config (steps, context, etc.) without restoring it |\n| `restore_snapshot` | Restore a workflow to a previous snapshot |\n\n### Executions\n\n| Tool | Description |\n|------|-------------|\n| `start_workflow` | Start a workflow execution with input. Returns `executionInputId` always and `executionId` only when the async execution row is already available. Pass `useMocks: false` to force a real (credit-consuming) run that ignores per-step mock data; defaults to honoring the workflow's configured mocks. |\n| `list_executions` | List executions for a workflow (paginated via `nextToken`), including `pipelineExecutionInputId` for matching a start result that only returned `executionInputId`. |\n| `get_execution` | Get execution details with step results. Requires the real `executionId`, not `executionInputId`; if needed, call `list_executions` and match `pipelineExecutionInputId`. |\n| `list_timelines` | List step execution records (timelines) for an execution (paginated via `nextToken`) |\n| `get_timeline` | Get a single timeline by ID with full step output |\n| `stop_execution` | Stop a running execution |\n| `retry_execution` | Retry a failed step — auto-detects the most recent failure if no timeline ID provided |\n| `rerun` | Rerun or retry any step by `timelineId` — works for failed AND succeeded steps, disambiguates loop iterations |\n\nRun deep links use `/<locale>/<workspace>/<workflowPathname>/runs?runId=<executionId>&step=<stepId>`.\nThe `step` query param is optional only for run-level handoffs. When a response\npoints to a specific approval card, output, failure, or current step, include\n`&step=<stepId>` and do not ask the human to open the step manually after a\nrun-only URL. When present, the app expands that workflow step and scrolls to\nit. `stepId` is the workflow step id, not the timeline id. Inside the app\nchat/navigation tool surface, `navigateToExecutionPage` accepts the same\n`stepId`.\n\nKnowledge row deep links use `/<locale>/<workspace>/knowledge-and-data/<listKey>?rowId=<rowId>`.\nThe app opens the Knowledge & Data list page and opens the row editor sheet for\nthat row. The backwards-compatible route\n`/<locale>/<workspace>/knowledge-and-data/<listKey>/row/<rowId>` redirects to the\ncanonical query-param URL.\n\nKnowledge text deep links use `/<locale>/<workspace>/knowledge-and-data/<key>`.\nThe backwards-compatible route\n`/<locale>/<workspace>/knowledge-and-data/text/<key>` redirects to the canonical\nitem URL.\n\n### Apps & Testing\n\n| Tool | Description |\n|------|-------------|\n| `list_apps` | List available apps and integrations |\n| `get_app_actions` | Get action schemas for an app |\n| `test_app_action` | Test an app action without creating a workflow |\n| `test_ai_action` | Test an AI prompt without creating a workflow |\n| `test_code_action` | Test JavaScript code in the same sandboxed VM as production |\n| `get_step_schema` | Get allowed PipelineStep fields grouped by category |\n\n#### AI step types: `aiAction` vs `aiActionWithTools`\n\nPick the right type — `validate_workflow` will reject the wrong one:\n\n| You need… | Use |\n|-----------|-----|\n| Reason over inputs already present in the prompt variables | `aiAction` (single LLM call, no tool loop) |\n| Live web search, workspace memory recall/write, knowledge-graph lookup | `aiActionWithTools` with the matching `builtinType` |\n| The AI to decide at runtime what inputs to pass to an app action | `aiActionWithTools` with an `appActionConfig` tool |\n\n**`aiActionWithTools` requires at least one tool** — placed under `step.tools` **or** `step.agent.tools` (both are merged at runtime). If you omit tools from both locations, `validate_workflow` returns a blocker `AI_STEP_TOOLS_REQUIRED`. If the prompt says \"search the web\" / \"recall memory\" / \"knowledge graph\" without the matching tool attached, you get a warning `AI_STEP_TOOL_PROMPT_MISMATCH`: web-search prompts need `web_search`; memory prompts need `workspace_memory`; KG lookup prompts need `kg_search` or `kg_traverse`. `fetch_website_content` fetches a known URL and `kg_write` writes KG data, so neither satisfies those lookup/search prompts.\n\nValid `builtinType` values: `web_search`, `file_search`, `code_interpreter`, `fetch_website_content`, `kg_search`, `kg_traverse`, `kg_nodes`, `kg_write`, `workspace_memory`.\n\n#### Prompt caching for repeated AI steps\n\nAgentled enables provider prompt caching where supported. Caching reuses prompt processing for an identical prefix; it does not cache or replay the AI response. To benefit in bulk workflows, especially scoring/matching loops, write prompts with the stable material first:\n\n```text\n[stable role and task]\n[stable rubric / scoring dimensions]\n[stable output JSON schema]\n[stable examples or decision rules]\n\nRuntime inputs:\n{{currentItem}}\n{{steps.previous.output}}\n{{input.field}}\n```\n\nDo not start high-volume prompts with `INPUTS`, `{{currentItem}}`, `{{steps.*}}`, `{{input.*}}`, `{{execution.id}}`, `{{now}}`, or `{{today}}`. Keep changing payloads, dates, execution IDs, and per-item records at the end so OpenAI/Anthropic can cache the shared prefix.\n\n```jsonc\n// aiActionWithTools example\n{\n  \"id\": \"research\",\n  \"type\": \"aiActionWithTools\",\n  \"name\": \"Research Company\",\n  \"tools\": [\n    { \"type\": \"builtin\", \"builtinType\": \"web_search\", \"name\": \"Web Search\" }\n  ],\n  \"pipelineStepPrompt\": {\n    \"template\": \"Search the web for the founder of {{input.company}} and return their name.\",\n    \"responseStructure\": { \"firstName\": \"string\", \"lastName\": \"string\" }\n  },\n  \"creditCost\": 10,\n  \"next\": { \"stepId\": \"find-email\" }\n}\n```\n\n### Knowledge & Data\n\n| Tool | Description |\n|------|-------------|\n| `get_workspace` | Get workspace info, company settings, active team members, pending invitations, and knowledge-list schemas |\n| `get_workspace_company_profile` | Get the editable workspace company profile and company knowledge text |\n| `update_workspace_company_profile` | Update top-level company profile fields like name, URLs, logo, industry, size, and additional information |\n| `update_workspace_executive_summary` | Write the workspace-wide executive summary on the Workspace Assistant card |\n| `list_pinned_outputs` | List output pages pinned to the workspace home/sidebar |\n| `set_output_page_pin` | Pin or unpin a workflow output page on the workspace home/sidebar |\n| `list_workspace_views` | List saved workspace view manifests and source/action guidance |\n| `create_workspace_view` | Create a saved operating-surface manifest over KG, workflows, approvals, agents, routines, actions, output pages, external APIs, or custom sources |\n| `get_workspace_view` | Get one saved workspace view by id or key |\n| `update_workspace_view` | Update a saved workspace view manifest without mutating source data or executing actions |\n| `archive_workspace_view` | Archive a workspace view without deleting linked data |\n| `list_knowledge_lists` | List knowledge lists in the workspace |\n| `get_knowledge_rows` | Get rows from a knowledge list (paginated via `nextToken`, max 200) |\n| `get_knowledge_rows_by_ids` | Fetch specific rows by ID (max 200) — use after `query_kg_edges` |\n| `get_knowledge_text` | Get text content from a knowledge entry |\n| `create_knowledge_list` | Create a new knowledge list with a typed schema (idempotent on key collision) |\n| `update_knowledge_list_schema` | Add or remove fields on an existing list schema |\n| `delete_knowledge_list` | Permanently delete a list and all its rows |\n| `upsert_knowledge_rows` | Insert or update rows in a list (max 500/call, per-row error reporting) |\n| `delete_knowledge_rows` | Delete rows by ID |\n| `upsert_knowledge_text` | Create or update a text knowledge entry |\n| `delete_knowledge_text` | Delete a text knowledge entry by key |\n| `query_kg_edges` | Query knowledge graph edges |\n| `get_scoring_history` | Get scoring history for an entity |\n\n\n### Credits and Cost Drivers\n\nCredit reporting tools are opt-in for cost-driver detail so existing balance checks stay compact.\nEvery credit total is ledger-derived and returned with a `period` object containing `label`, `display`, `start`, and `end`; always show that period label next to totals.\n\nFor a human/operator UI check, open the workspace credit usage page:\n\n```text\nhttps://www.agentled.app/en/{workspace}/account/billing/credits-usage\n```\n\nExample: `https://www.agentled.app/en/inovexus/account/billing/credits-usage`.\n\n| Tool | Description |\n|------|-------------|\n| `get_workspace_credits` | Workspace balance, usage, executions, and recent ledger rows. Optional args: `period`, `includeCostDrivers`, `includeRecentUsage`, `limit`. |\n| `get_workspace_credit_cost_drivers` | Convenience report with `includeCostDrivers=true` by default. Returns bounded top workflows, steps, models, and apps. |\n| `get_workflow_credits` | Workflow-level usage and optional cost drivers, scoped to workflows in the authenticated API key workspace. |\n\nSupported periods:\n\n- `rolling-30-days`: moving 30-day window ending at request time.\n- `rolling-7-days`: moving 7-day window ending at request time.\n- `current-month` / `month-to-date`: UTC calendar month-to-date, not the billing renewal period.\n- `previous-month`: prior UTC calendar month.\n- `all-time`: full ledger before the request time; use intentionally because it can scan more rows.\n\nExamples:\n\n```jsonc\n// Compact balance/burn-rate check\n{ \"tool\": \"get_workspace_credits\", \"arguments\": { \"period\": \"rolling-30-days\" } }\n\n// Workspace cost drivers for a calendar month-to-date window\n{ \"tool\": \"get_workspace_credit_cost_drivers\", \"arguments\": { \"period\": \"current-month\", \"limit\": 5 } }\n\n// Workflow cost drivers\n{ \"tool\": \"get_workflow_credits\", \"arguments\": { \"workflowId\": \"wf_abc123\", \"period\": \"rolling-30-days\", \"includeCostDrivers\": true } }\n```\n\nExternal API equivalents:\n\n```text\nGET /api/external/workspace/credits?period=rolling-30-days&include=costDrivers&limit=5\nGET /api/external/workflows/{workflowId}/credits?period=current-month&include=costDrivers\n```\n\nBilling-period reporting is separate from calendar-month reporting and should not be implied unless a future API adds an explicit billing-period label.\n\n### Branding (Whitelabel)\n\n| Tool | Description |\n|------|-------------|\n| `get_branding` | Get the workspace's whitelabel branding config (displayName, logo, colors, favicon, badge) |\n| `update_branding` | Update branding — set displayName, logoUrl, tagline, primaryColor, primaryColorDark, faviconUrl, hideBadge |\n\n### Agents\n\nFirst-class workspace agents with identity, instructions, tools, config files, and assigned workflows. All agents are conversational (chat-only). For scheduled/autonomous work, attach routines via `create_routine`. `SOUL.md` and `TOOLS.md` live in `configFiles`; reflection context (`JOURNAL.md`, `OBJECTIVES.md`, `PEOPLE.md`) lives as linked AgentFiles and is auto-seeded for active chat-only reflection agents. Agents decide what durable signal belongs in those files; AgentLed only provides scoped storage and scheduled Reflection. An agent created entirely via MCP renders identically to one built in the Agent Wizard.\n\n| Tool | Description |\n|------|-------------|\n| `list_agents` | List agents in the workspace (filter by status: active, paused, draft) |\n| `get_agent` | Get full agent config — instructions, files, workflows, attached routines |\n| `create_agent` | Create an agent. Accepts `agentType` presets (personal-assistant, competitive-researcher, social-media-marketer, customer-support, content-marketer, lead-qualifier, deal-sourcer, custom), `enabledApps`, `appPermissions`, `assignedWorkflowIds`, `linkedFileIds`, `configFiles` (SOUL.md/TOOLS.md), `avatar_icon_name`, `avatar_color`, `chatModel`, `activate: true` |\n| `update_agent` | Partial update — same fields as `create_agent`; `updates.slug` renames the agent email slug, moves the `AgentEntity` id to `{slug}@{workspace}`, and rebinds routines/file links/channel sessions/chat sessions where available |\n| `activate_agent` | Activate an agent (draft/paused → active). Attached routines begin running on schedule |\n| `pause_agent` | Pause an active agent. Attached routines stop until resumed |\n| `manage_agent_workflows` | Add/remove/set the workflows assigned to an agent without rewriting the full config |\n| `delete_agent` | Permanently delete an agent and all its files |\n| `chat_with_agent` | Send a message to a specific agent. Multi-turn via `session_id` |\n\nSlug convention: `slug` is the short role ID used in URLs and email addresses. Keep `Agent` in the display name when useful, but do not append `-agent` to the slug just because the display name includes it; for example, `Deal Sourcing Agent` should use `deal-sourcing@{workspace}.agentled.ai`, not `deal-sourcing-agent@{workspace}.agentled.ai`.\n\n#### Agent Files\n\n| Tool | Description |\n|------|-------------|\n| `list_agent_files` | List files attached to an agent (knowledge, context, reference docs) |\n| `get_agent_file` | Get the content of a specific agent file |\n| `upload_agent_file` | Upload a file (max 400KB text/markdown) to an agent |\n| `update_agent_file` | Update a file already attached to an agent; use this after `get_agent_file` for `JOURNAL.md`, `OBJECTIVES.md`, and `PEOPLE.md` edits |\n| `delete_agent_file` | Delete a file from an agent |\n\nReflection files follow the same durable markdown pattern used by OpenClaw and Hermes memory surfaces: keep `JOURNAL.md` as a concise dated log, `OBJECTIVES.md` as active/completed goals, and `PEOPLE.md` as stable relationship context. Read first, update only when there is durable signal, and send full replacement content. See `docs/AGENT_REFLECTION_FILES.md` for the UI, MCP, and CLI editing contract.\n\n#### Routines\n\nRoutines are scheduled prompts attached to an agent — the agent evaluates the prompt on a set interval and can trigger workflows or send notifications.\n\nExample — add a daily deal-sourcer routine to an existing agent:\n```\n# Step 1: create the agent\ncreate_agent({\n  name: \"Daily Deal Sourcer\",\n  agentType: \"deal-sourcer\",\n  enabledApps: [\"agentled\", \"kg\", \"web-scraping\"],\n  appPermissions: {\n    kg: { access: \"write\", writeApprovalRequired: true },\n    \"web-scraping\": { access: \"read\" }\n  },\n  assignedWorkflowIds: [\"<opportunity-scoring-workflow-id>\"],\n  activate: true\n})\n\n# Step 2: attach a routine\ncreate_routine({\n  agent_id: \"<agent-id>\",\n  name: \"Daily Sourcing Run\",\n  prompt: \"Find 5 new SaaS startups that match our deal criteria and trigger the scoring workflow for each.\",\n  interval: \"daily\"\n})\n```\n\nRead access is implicit and never requires approval. The internal `agentled` app is selected as an app when needed but is not configurable in `appPermissions`.\n\n| Tool | Description |\n|------|-------------|\n| `list_routines` | List all routines for an agent |\n| `create_routine` | Create a routine (name, prompt, interval) |\n| `update_routine` | Update routine fields; recalculates nextRunAt if interval changes |\n| `pause_routine` | Pause a routine |\n| `resume_routine` | Resume a paused routine |\n| `trigger_routine` | Run a routine immediately without changing its schedule |\n| `delete_routine` | Permanently delete a routine |\n\nInterval values: `weekday-morning`, `weekday-evening`, `weekly-monday`, `weekly-tuesday-evening`, `weekly-friday-evening`, `daily`, `monthly`, `6h`, `48h`.\n\n#### Deprecated Low-Level Runtime\n\nDirect low-level monitor-runtime MCP tools are deprecated and no longer\nregistered. Use `create_agent` / `update_agent` plus routines for autonomous\nwork.\n\n### Channels (Email, Slack, WhatsApp, Signal)\n\nChannels route inbound messages into the agent chat runtime. Each channel has a `defaultAgentId` that decides which agent handles the conversation. Replies are sent back through the originating channel.\n\n| Tool | Description |\n|------|-------------|\n| `list_channels` | List configured channels with their `defaultAgentId`, enabled state, and non-secret config (secrets redacted) |\n| `set_channel_default_agent` | Assign the agent that handles a channel's inbound conversations |\n| `configure_channel` | Update non-secret channel config — `enabled`, `defaultAgentId`, `allowedSenders` (email), `defaultChannelId` (slack) |\n| `set_channel_defaults` | Update workspace-wide defaults: `maxSessionsPerDay`, `sessionTimeoutMinutes`, `toolMode` |\n\n> Secret credentials (Slack bot tokens, signing secrets, WhatsApp access tokens, Signal webhook secrets) are NEVER readable or writable via the external API. Connect those via Settings → Channels in the UI — OAuth flows store them encrypted at rest.\n\n### Conversational Agent\n\n| Tool | Description |\n|------|-------------|\n| `chat` | Send a message to the AgentLed AI agent. Build workflows through natural language — no JSON required. Supports multi-turn conversations via session_id. |\n\n#### Chat Tool — Usage & Examples\n\nThe `chat` tool is a conversational AI agent that can reason, plan, and build workflows through dialogue. Think of it as the difference between `gh api` (raw) and `gh copilot` (intelligent).\n\n**Parameters:**\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `message` | string | Yes | The message to send to the AI agent |\n| `session_id` | string | No | Session ID from a previous response, for multi-turn conversations |\n\n**Response format:**\n\n```json\n{\n  \"response\": \"The agent's reply — may include workflow suggestions, explanations, or confirmation of actions taken\",\n  \"sessionId\": \"mcp-chat-ws123-1711929600000\"\n}\n```\n\n**Multi-turn conversation:**\n\n```\n# Turn 1: Describe what you want\nchat(\"Build me a workflow that enriches LinkedIn companies and scores them by ICP fit\")\n# → Agent responds with a plan and creates a draft workflow\n# → Response includes sessionId: \"mcp-chat-ws123-1711...\"\n\n# Turn 2: Iterate on the design\nchat(\"Add an email finding step using the company domain\", session_id: \"mcp-chat-ws123-1711...\")\n# → Agent modifies the workflow, maintaining conversation context\n\n# Turn 3: Finalize\nchat(\"Looks good, publish it as live\", session_id: \"mcp-chat-ws123-1711...\")\n# → Agent publishes the workflow\n```\n\n**When to use `chat` vs structured tools:**\n\n| Use `chat` when... | Use structured tools when... |\n|---------------------|------------------------------|\n| You have a high-level goal | You know the exact pipeline JSON |\n| You want AI recommendations | You need precise control |\n| You're exploring available skills or integrations | You're automating a known pattern |\n| You want to iterate through dialogue | You're doing bulk operations |\n\n**Notes:**\n- 5-minute timeout — break complex requests into smaller steps if needed\n- Responses are non-streaming (collected then returned) for MCP client compatibility\n- The agent has full access to planning tools, workflow builder, and workspace context\n- Error responses include actionable messages (e.g., timeout → \"try breaking it into smaller steps\")\n\n### Intent Router\n\n| Tool | Description |\n|------|-------------|\n| `do` | Natural language intent router — describe what you want and it auto-selects and executes the right tool |\n\n### Help & Feedback — Talk to the Agentled Team\n\n**For AI agents — pick the right channel:**\n\n| What you hit | Where it goes |\n|-------------|---------------|\n| Workflow not behaving as expected, app/integration question, platform/billing question, missing feature, anything about how Agentled works | Call `submit_feedback_to_agentled` (below). Routes straight to the team. |\n| Bug in the **CLI itself** (`agentled` command crashes, writes wrong data to `.agentled/`, flag doesn't work) — a reproducible CLI code defect | File a GitHub issue at <https://github.com/agentled/mcp-server/issues>. Include CLI version + reproduction steps. |\n| Anything else, or you're not sure | `submit_feedback_to_agentled` — the team will reroute if needed. |\n\n> **Do not** search npm metadata, scrape GitHub, or shell out to `gh` to \"find\" a bug tracker — the routes above are the only ones. The `bugs` field in the package points at the human contact page (<https://www.agentled.ai/en/contact-us>) on purpose.\n\n**For humans:** email **contact@agentled.ai** or visit <https://www.agentled.ai/en/contact-us>.\n\n| Tool | Description |\n|------|-------------|\n| `submit_feedback_to_agentled` | Ask a question, file a bug, request a feature, or escalate an issue. Types: `ask`, `bug`, `feature_request`, `escalation`. Provide `userEmail` if you want a reply. |\n\n### Coming from n8n?\n\nImport existing n8n workflows and make them AI-native:\n\n| Tool | Description |\n|------|-------------|\n| `preview_n8n_import` | Preview an n8n workflow import (dry run) |\n| `import_n8n_workflow` | Import an n8n workflow into Agentled |\n\n## Looking Up Entity-Scoped Data\n\nWhen you need all records related to a specific entity, use the two-tool chain instead of paginating `get_knowledge_rows`:\n\n**Example 1 — all deals scored by an investor:**\n```\n1.  query_kg_edges({ entityName: \"Investor Name\", relationshipType: \"SCORED\" })\n    → returns edges with targetNodeIds\n\n2.  get_knowledge_rows_by_ids({ rowIds: <targetNodeIds from step 1> })\n    → returns full row data for each matched deal\n```\n\n**Example 2 — all leads sourced from a campaign:**\n```\n1.  query_kg_edges({ entityName: \"Campaign Name\", relationshipType: \"SOURCED\" })\n    → returns edges with targetNodeIds\n\n2.  get_knowledge_rows_by_ids({ rowIds: <targetNodeIds from step 1> })\n    → returns full contact/lead rows\n```\n\n**Why this matters:** `get_knowledge_rows` is limited to 200 rows per call. At 3k rows that means 15 round trips; at 10k it means 50. The KG-edge path is O(edges for that entity) — independent of total list size — so it stays fast regardless of how large the list grows.\n\n**Node ID convention:** `source_node_id` and `target_node_id` values from `query_kg_edges` are knowledge row IDs. Rows outside the authenticated workspace are silently excluded.\n\n## For Agencies: White-Label Ready\n\nBuild workflows once, deploy to multiple clients under your own brand. Configure branding directly from the MCP server:\n\n```\n\"Set my workspace branding: displayName 'Acme AI', primaryColor '#6366f1', tagline 'Powered by Acme'\"\n```\n\nUse `get_branding` and `update_branding` to manage displayName, logo, colors, favicon, tagline, and badge visibility. Client portal appearance updates instantly.\n\n## Persistent Memory — Examples\n\nMemories let workflows learn across executions. Store what worked, recall it next time.\n\n### Store a fact after enrichment\n\n```\n\"Store a memory: key 'icp_criteria', value { industry: 'fintech', minEmployees: 50, region: 'EU' },\ncategory 'preference', scope 'workspace'\"\n```\n\n### Recall before scoring\n\n```\n\"Recall memory 'icp_criteria' at workspace scope — use it to score this batch of leads\"\n```\n\n### Search for past outcomes\n\n```\n\"Search memories for 'conversion rate' in the 'outcome' category\"\n```\n\n### Track a running metric\n\n```\n\"Store memory: key 'total_leads_processed', value 43, merge 'increment', scope 'workspace'\"\n```\n\nEach subsequent call with `merge: 'increment'` adds to the existing value — no read-modify-write needed.\n\n### Outreach PCPL\n\nFor email or outbound workflows, track PCPL as a business metric:\n\n```\nPCPL = prospects contacted / positive replies\n```\n\nUse `analyticsConfig` for contacted prospects, positive replies, and PCPL. Literal PCPL should use a `ratio` metric with `ratioMode: \"raw\"`; positive reply rate should use the default percentage ratio.\n\n## Routines — Examples\n\nRoutines are scheduled prompts attached to agents. Use them for autonomous work\nsuch as daily checks, weekly digests, and workflow follow-up.\n\n### Create an agent with a daily sourcing routine\n\n```\n\"Create a deal sourcing agent, then add a daily routine that checks the\nincoming-leads knowledge list and starts the lead-enrichment workflow for\nqualified new rows. Limit the routine to 10 workflow starts per day.\"\n```\n\nTool sequence:\n\n```\ncreate_agent({\n  name: \"Daily Deal Sourcer\",\n  agentType: \"deal-sourcer\",\n  enabledApps: [\"agentled\", \"kg\"],\n  assignedWorkflowIds: [\"wf_abc123\"],\n  activate: true\n})\n\ncreate_routine({\n  agent_id: \"<agent-id-or-slug>\",\n  name: \"Daily New Lead Review\",\n  prompt: \"Review incoming-leads, identify qualified new rows, and start the lead-enrichment workflow for each. Do not start more than 10 workflow runs in one day.\",\n  interval: \"daily\",\n  max_steps_per_run: 20,\n  max_credits_per_day: 50\n})\n```\n\n### Create a weekly workflow health routine\n\n```\n\"Add a weekly routine to the operations agent that reviews workflow execution\nhistory, flags abnormal failures, and notifies me only when action is needed.\"\n```\n\n```\ncreate_routine({\n  agent_id: \"operations\",\n  name: \"Weekly Workflow Health Review\",\n  prompt: \"Review recent workflow execution history. If failures or stalls require action, summarize the affected workflows, likely impact, and recommended next step. Otherwise record that no action is needed.\",\n  interval: \"weekly-monday\"\n})\n```\n\n### Pause and resume\n\n```\n\"Pause routine <routine-id>\"\n\"Resume routine <routine-id>\"\n\"Run routine <routine-id> now\"\n```\n\n## Works With\n\n- **Claude Code** (Anthropic)\n- **Codex** (OpenAI)\n- **Cursor**\n- **Windsurf**\n- Any MCP-compatible client\n\n## Links\n\n- [Agentled Platform](https://www.agentled.app)\n- [npm Package](https://www.npmjs.com/package/@agentled/mcp-server)\n- [GitHub](https://github.com/Agentled/mcp-server)\n- [Report Issues](https://github.com/Agentled/mcp-server/issues)\n\n## Building from Source\n\n```bash\ngit clone https://github.com/Agentled/mcp-server.git\ncd mcp-server\nnpm install\nnpm run build\n```\n\n## License\n\nMIT\n",
  "bytes": 50592,
  "sha": "0c3ae27594620d8b56d29472916a57799aba919fed2916c1195fbc3b66760ce1",
  "repo_slug": "agentled/mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_agentled_mcp_server_be2dfb91/readme"
}