Skip to main content

Module agents

Module agents 

Source
Expand description

Agent roster, MCP tool loop

Functions§

agent_backend_kind
Backend kind of a roster agent: "local" | "remote" (unknown/empty slug → "local").
agent_remote_connection_test
Verify that a configured remote-MCP agent can answer the non-generative tools/list handshake. This never sends a chat prompt.
agent_roster_add_remote
Convenience: create/update a REMOTE-MCP agent from primitives so the UI never hand-builds the backend enum. transport_kind"tcp" | "http" | "stdio"; endpoint is host:port / a URL / a command line respectively.
agent_roster_get
agent_roster_list
agent_roster_remove
agent_roster_upsert
agent_runtime_status
Truthful runtime projection for one roster agent. Definitions are durable; this response describes only the currently effective local-model residency and recent decode measurement, so callers do not mistake “configured” for “loaded on GPU”.
agent_set_allowed_mcp_tools
Convenience: set allowed_mcp_tools on a roster agent (persist via upsert).
ingest_chat_cml
Store a chat turn’s inline CML context (#project: / #topic: / #task: / [[concept]]) into the person’s inforg (their private library). No-op if the message has no tags. Returns concepts stored.
mcp_call_tool_gated
Principal-gated MCP tool call. principal_permitted = false → Err without MCP. Tool must be on the agent’s allowed_mcp_tools (or *); empty allowlist denies all.
mcp_ensure_safe_tool_allowlist
If allowlist is empty, seed list_capabilities + computer_vision (dogfood-safe). Does not Permit any call — only widens the roster allowlist.
mcp_list_local_tools
List local in-process MCP tools (tools/list) for Talk / allowlist UI.
provider_credential_remove
Remove a user-owned connection credential from the operating-system keychain.
provider_credential_store
Store a bearer credential for a user-owned connection in the operating system keychain. The secret is intentionally write-only at this API boundary.
run_remote_agent_turn
Run one turn against a REMOTE-MCP agent from the roster (native-only). Privacy-gated via the job router (Classified/sanctuary never leaves the device), then issues an MCP tools/call to the provider and appends the reply as an agent message. Returns a ChatInferenceResult-shaped JSON.