Documentation Index
Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Agent service runtime
Run a Veryfront agent as a separately deployed service when the agent needs an independent process boundary, direct control-plane registration, remote MCP tools, or service-level telemetry. Use an application route for normal in-app chat. Use an agent service when the agent must run outside the app server or when Veryfront Cloud needs to invoke a push runtime directly.Prerequisites
- At least one agent in
agents/that the service should expose (see Agents). - A deployment target you can run a long-running Node process on.
- For Veryfront Cloud registration:
VERYFRONT_API_TOKEN,VERYFRONT_PROJECT_IDorVERYFRONT_PROJECT_SLUG, and a publicly reachableVERYFRONT_AGENT_SERVICE_URL. See Configuration for the full list.
Create a service entrypoint
Create a process entrypoint that starts the default Veryfront Cloud agent service runtime:agents/tools/skills/resources/prompts/workflows/tasks/
/api/runs requests. Pass agentId when the service exposes
multiple agents and direct requests need a predictable default.
Keep agent behavior in project files
Define the agent inagents/ and keep service startup separate from agent
behavior:
veryfront.config.ts under ai.<primitive>.discovery.paths.
Configure registration
Control-plane registration is convention-first. Inauto mode, the service
registers only when VERYFRONT_API_TOKEN and
VERYFRONT_AGENT_SERVICE_URL are present.
VERYFRONT_AGENT_SERVICE_REGISTRATION=enabled when startup must fail if the
service cannot register. Use disabled when the service must run without
control-plane registration.
The service name resolves from VERYFRONT_AGENT_SERVICE_NAME, then the nearest
package.json or deno.json name, then veryfront-agent-service. Pass
serviceName only when code should override that convention.
Add remote MCP tools
UsemcpServers when the service needs remote tools. Use
veryfrontMcpServer() for Veryfront-owned control-plane MCP servers and normal
MCP server config objects for third-party servers.
mcpServers is omitted, the Veryfront Cloud preset includes
veryfrontMcpServer() by default. Pass mcpServers: [] to run without remote
MCP tools.
Refresh runtime state
UseresolveRuntimeState when a long-lived service run must refresh
instructions, context, or available tools at a model step boundary.
fetchDefaultAgentServiceProjectSteering() for the initial fetch and
createDefaultAgentServiceProjectSteeringRefresh() for step-boundary refresh.
Use lower-level helpers
UsestartAgentService() for the standard service shape. Use lower-level
helpers only when the service needs a custom server adapter, custom execution
preparation, or custom infrastructure.
| Helper | Use |
|---|---|
defineAgentService() | Normalize one or more agents into a service registry contract. |
startNodeAgentService() | Start a Node service around a request-native runtime. |
createNodeAgentServiceRuntimeInfrastructure() | Create Node config, logging, tracing, and telemetry infrastructure. |
prepareVeryfrontCloudAgentServiceChatExecution() | Prepare Veryfront Cloud chat execution with model, steering, and durable-run wiring. |
createAgentServiceProjectSteering() | Bind markdown agent definitions to project steering and skill refresh. |
Verify it worked
Start the service entrypoint and call the run route directly. The default port is3001; override with PORT if needed.
VERYFRONT_AGENT_SERVICE_HEARTBEAT_INTERVAL_MS).
Next
- Agents: define the agents the service discovers
- Tools: define tools the service can expose to agents
- MCP server: expose tools, prompts, and resources over MCP
Related
- Agent service runtime reference: complete service runtime API reference
veryfront/agent: agent API referenceveryfront/channels: control-plane and invoke channel contracts