Connectors & grants
ka agent gives the engine extra capabilities without giving it trust: tools arrive through MCP servers the engine spawns, every scoped tool needs a grant you issued, and external writes leave intent rows.
The bridge
Section titled “The bridge”The worker’s security overlay appends one block to the engine config:
[[mcp]]name = "kagent"command = "<ka-agent binary>"args = ["__mcp"]The engine then spawns ka-agent __mcp as the kagent MCP server (stdio JSON-RPC 2.0, MCP 2025-06-18). Since v0.11 the __mcp process is a thin relay: every tool runs in the daemon over the admin endpoint (ordinary requests, no second store reader), and the engine reaches the tools as kagent__<tool> exec-tier hands (providers only accept [a-zA-Z0-9_-]+). Enabled plugin tools join the same list namespaced <id>.<tool>. The relay pins the acting user per worker; the daemon re-derives the user’s role from the store on every call (a disabled account’s calls are refused), never trusting the relay’s claim.
Each tool declares an effect; the approval profile decides what skips a card (see approvals): reads, proposals and writes inside ka agent’s own data root never ask; scheduling, spawning and external writes do.
| Tool | Effect | What it does |
|---|---|---|
kagent__memory_propose |
Propose | Proposes a memory for operator review, naming its target file (facts default, preferences, environment, profile); nothing is stored until you accept. The candidate records the acting user; acceptance lands it in that user’s memory root. |
kagent__notes_search |
Read | Case-insensitive search across the acting user’s notes (<data>/notes/*.md for the operator, <data>/users/<u>/notes/*.md otherwise), max 20 hits. |
kagent__notes_read |
Read | Reads one of the acting user’s notes (truncated at 8 KB). |
kagent__notes_append |
LocalWrite | Appends a line to a note file in the acting user’s notes root. |
kagent__kb_search |
Read | Searches the knowledge bases the acting user may read (at most 8 hits: title, snippet, citation); an unauthorized KB answers without confirming it exists. |
kagent__history_search |
Read | Searches past turns of the acting user’s sessions (bounded snippets, limit 10). |
kagent__history_show |
Read | Shows one past turn in full. |
kagent__http_get |
Read | HTTP GET. |
kagent__github_issues_list |
Read | Lists repository issues. |
kagent__github_pulls_get |
Read | Reads a pull request. |
kagent__github_issue_comment |
ExternalWrite | Comments on an issue (intent-logged). |
kagent__github_pull_review |
ExternalWrite | Reviews a pull request (intent-logged). |
kagent__remind |
LocalWrite | Sets, lists or cancels a reminder: a notification, never a model turn. |
kagent__send_file |
LocalWrite | Sends a file from the workspace (or attachments inbox) to you on your channels, with an optional caption. |
kagent__calendar_events |
Read | Lists calendar events for a window (1 to 14 days) from the configured /calendar source. |
kagent__skill_propose |
Propose | Offers a reusable procedure as a skill draft; only your acceptance installs it. |
kagent__cron_list |
Read | Lists scheduled agent jobs with their next fire time. |
kagent__cron_manage |
Schedule | Schedule, pause, resume, remove or trigger cron jobs (cron rows only, never reminders; never from inside a cron-fired turn). |
kagent__scout |
Spawn | Runs one read-only research child on a single question (see scout): a fresh strand in the caller’s partition, readonly mode, the role’s toolset intersected with read, glob, grep, web_search, web_fetch; the answer returns labeled non-authoritative. Disabled unless [scout] enabled = true. |
kagent__plan_update |
LocalWrite | Rewrites the body of a drafting or draft plan; approved or executing plans refuse. |
External MCP servers
Section titled “External MCP servers”Any MCP server’s tools become the agent’s tools:
ka-agent mcp add notes -- npx -y some-notes-mcpka-agent mcp add home --url http://homeassistant.local:8123/mcp \ --header Authorization=secret:ha.tokenka-agent mcp list · ka-agent mcp test # prove each server answers (initialize + tools/list)ka-agent mcp rm homeExactly one of a stdio command or a streamable-HTTP url per server. secret:<name> values in env and headers resolve from the secret store when the agent starts and never touch the config file. Their tools appear to the model as <server>__<tool>; in ask mode every call asks first, and the approval card names the tool. With more than one operator server the engine’s MCP discovery defaults to lazy to save context.
Web search
Section titled “Web search”ka-agent setup search wires the engine’s web_search tool: Tavily (free tier), Brave or Bing, with the key in the engine .env tier (ka-agent key set TAVILY_API_KEY, BRAVE_API_KEY or BING_API_KEY). doctor reports the state (✓ web search tavily (key set)), and web_fetch stays visible with private targets still refused unless granted.
Grants
Section titled “Grants”Grants are scope strings managed on the CLI and persisted in the store; the bridge reloads them on every tool call (never cached):
ka-agent grant add http:get:example.comka-agent grant add github:issues:readka-agent grant add http:get:* # wildcard tierka-agent grant listka-agent grant rm http:get:example.comA denial returns isError naming the required scope, so the model can tell you exactly what to grant. An SSRF guard applies to http_get and @url references: the hostname is resolved first, private addresses are rejected without the additional http:get:private grant, and the connection is pinned to the approved IP, so DNS rebinding cannot redirect a fetch after the check.
These scope strings gate connector tools. The operator [grants] block in ka-agent.toml (per-path access, the install gate, full access) is a separate surface that widens what the engine itself may do without a card; see approvals & safety.
Intents
Section titled “Intents”External writes (issue comments, pull reviews) write intent rows to the store before acting: tool, subject, status, timestamps. A retried call with identical arguments finds the earlier intent and is refused (duplicate external write refused); an intent whose outcome a crash left unknown is refused the same way, with the id named, so you confirm in /intents whether it ran instead of writing twice. The web UI surfaces the last 20 intents on /intents, next to the audit chain.
The scheduler
Section titled “The scheduler”/remind <Ns|Nm|Nh|Nd> <text> creates a durable task in the store. A timer in the daemon (15s tick) fires due reminders as messages through the runtime’s normal submission path: queue, single-flight and approvals all apply, so a reminder can never bypass a permission gate.