Skip to main content

Module agent

Module agent 

Source
Expand description

An Editor driven by an agent’s tools: the one tool layer of every front end an agent talks to — the MCP server (geop mcp) and the web app’s hosted assistant alike.

Each tool (tools) is a transaction on one editor through its protocol (Command in, Update out): a part is started or loaded, steps are added, edited and removed as their saved JSON (what a .geop file holds), the program is run, its elements listed by the stable names a step refers to them by, inspected, exported and saved. None of them names an operation: what there is to build, and how, is the registry’s, and the agent asks for it (list_operations).

The tools that read or write files by path (AgentTool::files) need the Files of the front end they run in; one with none — the browser, whose downloads are the user’s to start — does not offer them.

A Session keeps what a front end keeps of the editor’s answers — the last scene, the program as last shown — whoever sent the command, so that a front end driving the editor itself (the web app’s own clicks) and an agent’s tools can share it.

Structs§

AgentPrompt
A prompt an agent starts a task with: its name, what it is for and its arguments, by name, with what each is and whether it is required.
AgentResource
Something to read: its URI, name, what it is and its media type. A template URI has one {…} part, filled in to read it.
AgentTool
A tool an agent is offered: its name, what it does and the JSON schema of its input.
Image
A picture a tool answered with.
Session
One editor, driven by tools and by a front end alike, and what a front end keeps of its answers.
ToolAnswer
What a tool answered: its result as text — pretty JSON, or why it failed — and every update the editor sent while it ran, in order, for a front end that shows the editor to show.

Enums§

Contents
What a resource holds: text, or a picture.

Traits§

Files
The files of the front end a session runs in, which the tools that take a path read and write (AgentTool::files).

Functions§

prompts
Every prompt, in the order they are offered.
resource_templates
Every resource read by filling in its URI’s one {…} part.
resources
Every resource to read as it is, in the order they are offered.
tools
Every tool, in the order they are offered.