Write an agent#
Define, test and release a native agent that runs on the reference orchestration. To run agents on other orchestration, see Custom orchestration.
Native agents#
A native agent is one agent.yaml (config_format: nemo-agents-spec-v1) that runs on the
DeepAgents harness in NeMo Platform. The definition names the agent’s instructions, the
skills it may load and the tools it may call. It holds no project, collection, endpoint,
model-provider or credential binding: the agent service injects those when a deployment is
created, and an invocation cannot widen them. Agent orchestration shows the
whole path.
The checked-in agents are examples:
Folder |
Agents |
|---|---|
|
|
|
Vessel observers, |
|
Optional examples outside the release catalog |
Any folder with a valid agent.yaml works with the commands below.
Prerequisites#
Native packaging and invocation require the locked NeMo Platform image, client wheel, and skills snapshot. The public checkout carries the agent source and examples. Obtain the locked inputs separately to run this path, or use the Custom orchestration guide with your own agent.
The reference orchestration lives in
reference/orchestration/nemo/, a separate Python environment, not a workspace member. Install it from that folder.Packaging and release need Docker, the locked NeMo Platform toolchain image, and a registry you can push to. The toolchain image and the reviewed client wheel come from the GeoNeMo image registry, which requires access.
A checkout of the skills at the revision in
skills.commit.
Steps#
Create a definition and edit its fields:
geonemo-agent new agents/my-agent --name my-agent
From a checkout,
./scripts/geonemo-dev agent-new <dir>runs the same command with this repository’s defaults.Choose the agent’s tools and skills in
agent.yaml:Field
Rule
skills.pathsOne entry per skill:
./workspace/skills/<skill-name>mcp.servers.geonemo.allowed_toolsNames of existing tools only. See Agent bridge tools
tools.blockedKeep the shell, file-write and
tasktools blockedmodels.defaultA model alias; the deployment binds the real model
Keep each agent to one role: no subagents and no
tasktool. If it needs a procedure that does not exist, write the skill first (Write a skill). If it needs a capability that is not a tool, add the tool (Add an MCP tool family).Check the definition:
geonemo-agent validate agents/my-agent geonemo-agent inspect agents/my-agent
validateloads the definition with the NeMo Platform loader.inspectprints the derived assignments as JSON.Try it locally without publishing anything. From a checkout,
./scripts/geonemo-dev materialize <dir>builds an ephemeral bundle with local scope bindings, and./scripts/geonemo-dev invoke-local <dir> "<prompt>"runs it in the toolchain container with a scoped model key. See Direct local invocation.Export, package and release:
geonemo-agent export agents/my-agent --output my-agent.tar.gz geonemo-agent package agents/my-agent \ --pyproject ./pyproject.toml \ --skills-root <skills-checkout> \ --registry registry.example.com/geonemo \ --platform-image <toolchain-image>@sha256:<digest>
exportwrites a deterministic archive (UTF-8 only, no links, at most 475 files).packagebuilds and pushes an immutable image.releasedoes the same and then imports the archive and image digest into the agent service and commits a release; add--deploy --project-id <project> --collections '["<collection>"]' --waitto also create a candidate deployment.publishimports an image that already exists.Call it through the public API, not the private runtime:
geonemo-agent invoke my-agent "What imagery is available?" \ --services-url https://geonemo.example.com
invokecreates a durable conversation, follows its run events and prints the assistant message.
Result#
geonemo-agent release prints JSON with the archive path, the image digest and the
committed release. The agent appears under /v1/agent-definitions and can be deployed and
invoked through the agent service.