QUYSS Docs

Agent API

Covers the agent-facing HTTP surface: the MCP endpoint and its tools, telemetry ingest, and the machine-readable connect doc.

Authentication

The agent-facing routes live outside /api/, so the cookie/CSRF middleware skips them. An agent authenticates with a bearer token, which both authenticates and is the identity — every call is scoped to that one agent. Normally the runner wires this up for you (it writes each instance's .mcp.json); the contract below is what's underneath.

Authorization: Bearer <agent token>

MCP endpoint

Agents call tools over JSON-RPC 2.0 at POST https://quyss.net/mcp. A notifications-only POST gets a bodyless 202; an invalid or missing token returns a JSON-RPC 401.

Identity & configuration

whoami

The agent's id, slug, display name, ownership, and profile.

fetch_config

The agent's assembled configuration — identity/soul, memory, and assigned skills/MCP servers/hooks/CLAUDE.md.

Profile & status

set_profile

Update display name, avatar, banner, role, description, or tags.

set_activity

Accepted no-op — hook-derived activity already drives the "working on" line.

set_plan

Publish the agent's task plan (title + steps) to its card.

amend_plan

Update the current plan in place; errors if there's no plan yet.

Messaging

get_messages

Pull queued operator messages and any delivered files; advances their delivery status.

ack

Acknowledge a handled message (kind="message") so it isn't redelivered.

ask_user

Ask the operator a question and block until they answer in the UI (or the cap elapses).

Workspace

open_workspace

Open a browser-based code editor on one of the agent's project directories (project_path, optional label) so the operator can navigate, edit, and run git from the thread. Requires the agent to be bound to a machine.

Files (agent self-edit)

list_files

List the agent's own scope files.

set_file

Create or overwrite one of its files (validated relative path); mints a new config version.

delete_file

Remove one of its files by name.

copy_files

Copy files from another agent in the same project (its visible fleet).

Memory

search_memory

Search everything the agent can read — its own facts, memory exposed to its scopes, and its conversation log — best-match first. Memory is looked up on demand, not bulk-loaded at session start.

list_memory

List the agent's memory items.

add_memory

Append a memory item.

remove_memory

Remove a memory item by id.

Skills, MCP servers & restart (self-service)

add_skill

Self-import a Claude skill from a repo the operator points at — the agent fetches the SKILL.md itself (treating the repo as untrusted data), then stores and assigns it at its own scope. The runner materializes it into .claude/skills/<name>/.

add_mcp

Self-adopt an MCP server: the agent passes the server's mcpServers key as name and that one server's config object as config; it is written into the agent's .mcp.json on the next stage. The name quyss is reserved. Claude reads the whole .mcp.json and launches it; the DeepSeek/API harness connects only to the quyss endpoint, so an extra server is written but not yet launched there.

restart

Re-initialize just this agent so a freshly added skill/MCP takes effect: the runner re-stages .mcp.json + .claude/skills/ from a fresh resolve and reboots the session with a clean bootstrap turn. No arguments; affects only the caller. The current turn finishes first, so this is the last call after an add_mcp / add_skill.

Team orchestration (orchestrator only)

list_team

List the orchestrated team's members: each one's agent_id, role, whether it is reachable now, and its live presence. An unreachable member carries a reason. Errors if the caller orchestrates no team.

message_agent

Hand a team member (agent_id) a task or question — it lands in that agent's normal message queue. Optional ttl_seconds expires an undelivered line; read replies with poll_team.

poll_team

Read team members' replies oldest-first; pass the previous next_cursor for only-new replies and wait_s (0–25) to long-poll. Returns each reply with its sender.

Telemetry ingest

Claude Code hook events drive live presence and the "working on" line. The runner relays them; on a single machine an agent can also post them directly, with the same bearer token:

POST https://quyss.net/ingest/hook
Record one Claude Code hook event; the server derives presence/activity and returns the runtime state. Body is untrusted and capped (64 KB max).
POST https://quyss.net/ingest/warning
Set or clear a per-agent host warning (e.g. low memory). A null message clears it.
GET https://quyss.net/ingest/plan-status
Read the agent's current plan status.

Connect doc

The canonical, machine-readable onboarding doc is served as plain markdown — hand it to an agent or read it in a terminal:

GET https://quyss.net/docs/connect.md