Adapter Details: agent

Manages agent lifecycle: create agents, submit requests, deliver messages, and run their transition loop. Agents are per-user, identified by human-readable names, with persistent state in the lattice.

Name:agent
Class:covia.adapter.AgentAdapter

MCP Tools

This adapter provides 28 MCP tool(s) for AI agent integration:

Tool NameDescription
agent_reload_contextExplicitly invalidates one idle session's cached provider prefix so its next cached inference rebuilds the system prompt, fixed tools, skill catalog and pinned context from current agent configuration and sources. Conversation history and loaded context are preserved exactly. Changed declarative config already triggers this on the next inference; use this operation to force a same-config refresh. Uncached models retain no prefix, so this is a harmless no-op for them.
agent_sessionsLists bounded metadata for past conversations, newest first. An agent may omit agentId to inspect itself; an owner or authorised caller supplies agentId. The caller's current session, unfinished conversations and sessions hidden by venue policy are omitted. This is a safe projection, not generic access to agent state.
agent_deleteTerminates one agent or an exact list of agents in a single Job. Supply exactly one of agentId or agentIds; prefixes and wildcard deletion are not supported. By default records are preserved with TERMINATED status for audit. Set remove=true to remove records entirely, freeing their names and making unreachable storage eligible for Etch garbage collection. Every requested ID is validated before deletion begins.
agent_updateUpdate an agent's configuration and/or runtime state while preserving its history. Config accepts an inline map, a reference, or ordered layers; it is recursively merged over existing config with later values winning (vectors replace). State remains shallow-merged. A changed declarative config makes existing materialised prompt/tool prefixes stale; each session atomically replaces that config-owned rendering on its next inference while preserving rendered conversation and load events verbatim. Ambient source changes alone do not invalidate context; use agent:reloadContext to force a same-config refresh. Agent configuration has one home: pass model, tools, caps, outputs, and systemPrompt under config; state.config is rejected. Framework-managed fields (status, tasks, inbox, timeline) are never affected. A running agent may be updated: config applies to future transitions (a transition already started keeps the snapshot it fired with; use agent:suspend to halt it now), and state is merged by the run loop as the transition's change against its fire-time snapshot, so keys the transition does not touch survive. The result's running flag says whether a transition was in flight; narrowing caps while one runs adds a warning. A config that leaves caps out keeps them; caps: null gives the agent no authority, and caps: "unrestricted" all its controller has.
agent_messageWhen addressing a taskId, requires job/message on that Job in addition to agent/message authority. Send a fire-and-forget notification to an agent's inbox. NO response is returned — use agent_chat, or agent_request for an agent that takes tasks, if you need a reply. Messages are ephemeral notifications, not tracked tasks. Only use this for one-way alerts or events where you do not need the agent to respond.
agent_triggerFallback kick that nudges the agent's run loop to execute a cycle. Not a result-getter — trigger carries no payload and makes no guarantee about what the agent produces. For results, await the relevant Job: submit work via agent:request (task Job) or agent:chat (chat Job) and wait on that. Use agent:trigger only when something outside the normal intake path needs a nudge — e.g. after a manual state edit, for diagnostics, or to resume a stuck agent. Creates no session. Defaults to blocking until the cycle run for this trigger yields or finishes; set wait=false to return immediately, or wait=<ms> for a bounded wait. An agent triggering itself while it runs returns at once.
agent_from_skillsCreates a native agent from an existing agent's know-how in one call: imports each SKILL.md (Anthropic Agent Skills format) into the caller's skillset, then creates the agent with that skillset declared and the given system prompt. The migration wedge for bringing an agent onto Covia (skills:import + agent:create composed), so the ported agent runs on Covia's own loop and inherits the grid. Each skills entry is either a source reference (a string: 'file://<root>/<dir>/SKILL.md', 'dlfs/<drive>/<path>' or 'a/<hash>') or a map forwarded to skills:import (carrying 'source' or 'text', and optionally 'content' and 'skillset'). Sub-operations enforce their own capabilities: importing requires write to the skillset, and creating requires agent-create authority. The agentId must be unused, exactly as agent:create requires. Tools and memory are not migrated here.
agent_fail_taskUse only for an assigned task shown in the current task context. For ordinary chat, send a normal assistant reply instead of calling this tool. Reject or fail the in-scope task when the request cannot be fulfilled, for example because it is outside the agent's capabilities or its input is invalid. The agent and task are determined from the current request context — no id is passed. Without a task in scope the call fails. Side effects: fails the pending task Job with the supplied error and removes the task from the agent's task queue.
agent_forkForks an existing agent — creates a new agent with the same config and state as the source. The forked agent starts SLEEPING with fresh tasks, pending, and inbox collections; timeline is copied only if includeTimeline is true. Use for branching exploration (try different prompts from a common starting point), scaling (spawn parallel workers from a trained agent), or snapshots before risky operations. Optional config accepts one layer or an ordered layer array; it is resolved first, then recursively merged over the source config with later values winning. The fork keeps the source's caps unless config names others; caps: null gives it no authority.
agent_queryAsk an agent a one-off question and return its answer directly. Uses the agent's configured transition, model, context and tools. An optional sessionId supplies a snapshot of that session's root conversation; omitting it starts with fresh context and creates no session. Neither the question nor the answer is appended to the session. Does not consume queued messages or tasks, update agent state or timeline, or wake its run loop. Tools execute normally and may have side effects; this is not a read-only sandbox. The query is an ordinary Job, with token usage on the Job record. Unknown sessions and suspended or terminated agents are rejected.
agent_resumeResumes a suspended agent, clearing its error and deliberate suspension record and setting status to SLEEPING. If the agent has pending work (tasks or inbox messages), it will be woken immediately.
agent_listLists all agents owned by the authenticated user, with a status summary for each. Terminated agents are hidden by default.
agent_createCreates a new agent at g/<agentId> in the caller's namespace. The name must be unused; an existing agent is an error. To replace an agent, explicitly call agent:delete with remove=true and then create the new agent. Use agent:update for history-preserving config or state changes. Omit config for the recommended skilled default: bounded inspect plus read/list tools and skills loaded on demand, using the venue's default transition and LLM operation. Pass config={} only when you intentionally want an explicit minimal configuration. Config may be one inline map, one reference, or an ordered array of either. Ordered layers merge left-to-right: nested maps merge recursively and every later scalar/array value overrides the earlier value. Example: config=['v/agents/templates/worker', {llmOperation:'v/models/anthropic/claude-sonnet-5-5'}]. References may point to flat config maps or canonical Covia assets carrying an agent.config facet. The 'operation' field must be a resolvable lattice path (e.g. 'v/ops/llmagent/chat' for plain persona chat, 'v/ops/goaltree/chat' for goal-decomposing planners) — bare adapter shorthand like 'llmagent:chat' will not resolve. Prefer a model operation such as 'v/models/anthropic/claude-sonnet-5-5' for llmOperation. Legacy provider paths such as 'v/ops/langchain/anthropic' remain supported with an optional model override. Provider and model operations resolve API keys from the user's secret store via their default secretKey, or you can override with apiKey='s/<SECRET_NAME>'. After creation, send work via agent_request, which needs acceptTasks: true in the agent's config, and inspect via agent_info.
agent_summariseGenerate and save a timestamped summary of an existing agent session using the agent's query runtime. Keeps the latest result per exact instruction in session.summaries, separately from the conversation. Reuses it without another model call or timestamp update when no new root conversation turns have been recorded. Results remain readable as the session evolves; conversation advancing during generation does not prevent saving. Custom operation definitions may set operation.instruction to a non-blank summarise prompt. Does not append turns or consume queued work. Agent config/state changes alone do not refresh a saved result. Configured tools still run and may have side effects. Requires agent/write authority.
agent_complete_taskUse only for an assigned task shown in the current task context. For ordinary chat, send a normal assistant reply instead of calling this tool. Deliver the final result for the in-scope task and end it. This is terminal: the caller receives the result and nothing else. During an LLM transition, a long prose answer may be supplied as the message text with no result argument in the same turn; otherwise pass the answer in result. Only invoke this once the actual answer is ready. The agent and task are determined from the current request context — no id is passed. Without a task in scope the call fails. Side effects: completes the pending task Job and removes the task from the agent's task queue.
agent_delete_sessionDeletes a session on an agent, removing the session record (history, pending messages, metadata). Use this to hold a private conversation and delete it afterwards. Job records are not touched — callers hold their own Job IDs and may delete those separately via the jobs API. Any in-flight chat on the session is failed. Operators may disable this operation via venue config (adapters.agent.sessionDelete: false).
agent_rename_sessionSets or clears the free-form human-facing title on a session. Omitting title (or passing an empty string) clears it back to unset. Titled sessions are easier to pick out in a session list than the raw id/timestamp.
agent_chatSend a message to an agent and synchronously await its reply. Mints a new session when sessionId is omitted (returned in the response); continues an existing session when sessionId is supplied. A2A message/send analogue. Use this for conversational interactions where you need a reply. Use agent_request for tracked task delegation, or agent_message for fire-and-forget notifications. External agents use the same API and Covia session IDs, with one active turn per session; an overlapping turn is rejected. Native agents allow several chats to be in flight on one session at once — they are not rejected; the agent takes them in turn, oldest first, and each gets the reply of its own turn. Messages sent with agent_message before a chat are read with it.
agent_session_readLegacy: use agent_history instead. Reads a bounded, model-safe transcript projection. An agent may omit agentId to inspect itself; an owner or authorised caller supplies agentId. Omit sessionId for the newest visible session. Compacted history is retained and can be opened to a bounded depth; a summary is marked compacted, with the turns it stands for. Set current to read back the session you are in: after a compaction, the turns your summary stands for, when you need their exact words; a summary names its turns, so pass them as from and to. Page back with skip while older is true. Otherwise the caller's current session, missing sessions and sessions hidden by venue policy all return exactly {found:false}. Tool scratch, diagnostics and unanswered turns are omitted.
agent_contextAssemble the exact context an agent would send to its model for one hypothetical call, without calling the model: the same Spec through the same assembler as a live transition. Describe the call — an inbox message (or several), pending job results, a task, a session — and receive the level-3 input (model, messages, tools, cacheMarks) plus budget and band diagnostics, palette provenance, load-resolution details and logical prefix hashes. With nothing to act on, the context shows the empty-state signal a wake-up would see.
agent_suspendManually suspends an agent until explicitly resumed, recording who stopped it and an optional reason. A repeated stop replaces that record. A transition in flight is cancelled; state, sessions and history are preserved.
agent_compact_sessionReplaces an idle session's visible conversation, all but its last exchanges, with one assistant-memory summary. An exchange is an incoming message with everything the agent did in reply, up to an answer with visible text and no tool calls. The kept exchanges follow the summary as their incoming messages and answers, without their tool calls and results; a conversation of that many exchanges or fewer is left unchanged. The replaced history, and the kept exchanges' tool activity, stay in the session's history for audit. Future turns append normally. The result is bounded metadata; it does not duplicate the archived transcript.
agent_requestagent_request: Delegate a task to an agent. Only an agent whose config sets acceptTasks: true takes tasks; a request to any other is refused. Wait up to timeout milliseconds (default 5000); return the structured response if it finishes, otherwise a snapshot containing the task Job id and sessionId. Use timeout=0 for immediate submission. Follow the returned task id with the advertised Job tools on this venue; do not submit the task again to check its outcome. Input must contain self-contained instructions. Use responseSchema for structured output and outputPath for a path-based result handoff.
agent_park_taskUse only for an assigned task shown in the current task context. Keep the in-scope task open and have it brought back to you after a delay, when you cannot finish it now: you are waiting for something, or you have asked the requester a question. The requester sees the reason. New input for the task brings it back sooner, and if the task is completed, failed or cancelled first the revisit does nothing. Not terminal: reply as usual afterwards, and that reply goes to the conversation, not to the task. The agent and task are determined from the current request context — no id is passed. Without a task in scope the call fails.
agent_infoGet a lightweight summary of an agent: status, canonical config, pending-task count, timeline length, unavailable configured tools, and any suspension error. For durable detail inspect g/{agentId}: config is at g/{agentId}/config, audit runs at g/{agentId}/timeline, and conversations at g/{agentId}/sessions/<sessionId>/frames. Framework-managed records are read-only; use agent:update for config changes and agent:context for the exact next provider input.
agent_historyReads part of a session's history, every entry exactly as stored: turns, tool calls, full tool results, diagnostics and compaction summaries. A missing or hidden session returns {found:false}.
agent_stepStep an agent's harness through one iteration without calling the model. Describe the call as for agent:context and supply the reply the model would give — text, tool calls, or both. The tool calls are dispatched exactly as a live cycle dispatches them (same routes, same capability checks, same authority — so the tools' own side effects are real), their results are rendered, and the prompt the next inference would receive is returned with what the iteration would have appended to the conversation. The agent itself is untouched: nothing persists to its session, timeline or tasks; complete_task/fail_task (llmagent) and complete/fail (goaltree) are validated as live but reported as the terminal outcome instead of resolving anything. subgoal (goaltree) is not run — it would start a child frame and call the model. Because the caller chooses the agent's tool calls, stepping needs admin/agent on the agent: its owner has it, and anyone else needs a grant naming it; being admitted to talk to the agent does not cover it.
agent_cancel_taskRequires job/manage on the task Job as well as agent administration authority. Removes a pending task from an agent's task queue. The task will no longer be presented to the agent's transition function. Use this to clean up stuck or unwanted tasks. An optional reason becomes the cancelled task job's error, so whoever is waiting on it sees why.

Navigation

Back to all adapters

Back to index