This document describes how agent.yaml is interpreted by the current Hugind
runtime.
name(string): agent identifier. Used for install/log naming.version(string): agent version.hugind_version(string, optional): semver constraint (example:>=0.6.0).entry_point(string): entry module path (.jsor.wasm).mode(string, optional):script(default) oragentic.script: agent code drives execution, callsllm.chat()manually.agentic: agent registers tools and a system prompt; the runtime drives an LLM tool-use loop automatically.
max_turns(u32, optional): maximum LLM round-trips in agentic mode (default: 10). Can also be set at runtime viaset_max_turns(n)in JS.wasm(object, optional): WASM runtime config.backend(object, optional): API base URL/model/session config.permissions(object, optional): host capability controls.dependencies(object, optional): MCP servers.env(array, optional): environment variables exposed to the agent.
descriptionauthorlicense
Unknown extra fields are also tolerated.
Used when entry_point points to a .wasm module.
wasi_mounts: only WASI mounts are available; host FS APIs are disabled.host_filesystem: only host FS APIs are available; no WASI mounts are added.both(default): enables both.
List of { host, guest } mappings for WASI preopens.
guestmust be absolute and cannot contain...hostis canonicalized.- If
hostis outside agent root, it is rejected unlesspermissions.filesystem.allow_outside_agent_root: true.
memory: enforced as a store memory limit when parseable (e.g.512MB).timeout: enforced as overall WASM execution timeout.cpu: currently only toggles fuel mode with a fixed fuel budget.max_output: currently parsed in schema but not enforced globally for WASM.
Base API URL (default: http://127.0.0.1:8080/v1).
String used as default model name for LLM hostcalls when model is omitted.
If url is not provided, Hugind also tries to resolve a config file from
~/.hugind/configs/<config>.yml|yaml and builds base URL from
server.host/server.port.
mode:stateless|fresh|resumeid: required forresume; ignored forfresh
Semantics:
stateless: noX-Session-IDheader.fresh: generates UUID v4, sends it asX-Session-ID, then deletes/state/:idat run end.resume: requires non-emptyid, sendsX-Session-ID, no auto-delete.
Note: if backend object is present, it must contain at least url or
config.
Applies to host capabilities (net, host FS APIs, shell/process).
allow: master switch.allowed_domains: domain allowlist (example.comalso matches subdomains).allowed_ips: exact IP allowlist entries (not CIDR parsing).block_private_networks: blocks resolved private/loopback/link-local targets.timeout,max_response_bytes: apply to host network fetch calls.
Controls host FS APIs only (not WASI mounts).
allow: master switch.read,write,create,delete: operation flags.allow_outside_agent_root: allows scopes outside agent root.allowed_paths,denied_paths: prefix-based path policy.follow_symlinks: whether to resolve symlinks during checks.
Behavior notes:
- If
allowed_pathsis empty andallow_outside_agent_rootisfalse, access is scoped to runtime FS root. hugind agent run --cwd <path>changes runtime FS root; outside-agent paths requireallow_outside_agent_root: true.hugind agent run --log-file <path>only affects runtime log destination.
allow: master switch.whitelist: only listed commands allowed (exact program match).blacklist: listed commands denied.timeout,max_output,env_clear,working_dir: execution guards.
If both whitelist and blacklist are set, both checks apply.
MCP servers are configured under dependencies.mcp.
Supported keys per server:
name(required)required(defaultfalse)transport(onlystdiois supported)command(required ifrequired: true)argsenvcwdversionanddescription(metadata)
Runtime behavior:
- Missing command on
required: truefails startup. - Missing command on optional entries skips that server.
- Tool names are
server:tool; with one server, baretoolis accepted.
JavaScript runtime:
- Global
tools.list()andtools.call(name, args)async APIs. - Both return JSON strings.
WASM runtime:
- Host imports
hugind.tools_listandhugind.tools_call. tools_callinput JSON format:{"name":"server:tool","args":{...}}.
Each item can be:
- a string:
"VAR_NAME"(optional variable) - an object:
{ name: "VAR_NAME", required: true|false, ... }
Runtime behavior:
- Values are read from host environment at run time.
- Injected under
input.meta.env. - Missing required vars fail the run.
- Extra keys (for example
description) are accepted but not interpreted.
See assets/agent.yaml for a full annotated example.