Skip to main content

Runtime v2 — Agent Lifecycle

Runtime v2 introduces first-class primitives for orchestrating autonomous agents. Create persistent agents, assign goal-oriented missions, govern which tools they can use, checkpoint progress, and intervene when decisions need human oversight.

Base URL: https://novyx-ram-api.fly.dev

Tier: All plans

MCP: All 16 tools available via novyx-mcp v2.4.0+


Agents

Agents are persistent identities that survive across sessions. Each agent has a name, model configuration, and a set of capability packs that define what tools it can use.

Create Agent

POST /v1/agents

Register a new agent in the Novyx Runtime. The agent persists until explicitly deleted.

Request body

ParameterTypeRequiredDescription
namestringYesHuman-readable agent name
agent_idstringNoCustom ID (auto-generated if omitted)
descriptionstringNoWhat this agent does
modelstringNoLLM model name (default: gpt-4o-mini)
providerstringNoLLM provider: openai, anthropic, litellm (default: openai)
instructionsstringNoSystem prompt / instructions
capabilitiesstring[]NoEnabled capability pack names

Examples

from novyx import Novyx

nx = Novyx(api_key="nram_your_key")

agent = nx.create_agent(
name="research-agent",
description="Investigates vendor contracts and compliance gaps",
model="claude-sonnet-4-20250514",
provider="anthropic",
capabilities=["web-search", "file-read"]
)
print(agent["agent_id"]) # agt_f7a2...

List Agents

GET /v1/agents

List all agents for the current tenant.

ParameterTypeRequiredDescription
statusstringNoFilter by status: active, paused, archived
limitintegerNoMax results (default: 100)

Get Agent

GET /v1/agents/{agent_id}

Retrieve a single agent by ID, including its current status, capabilities, and active missions.

Delete Agent

DELETE /v1/agents/{agent_id}

Permanently remove an agent. Active missions for this agent will be cancelled.


Missions

Missions are goal-oriented tasks assigned to agents. They have a lifecycle — queued → running → paused → completed or failed — and can be constrained by success criteria and capability packs.

Create Mission

POST /v1/missions

Assign a bounded job to an agent.

Request body

ParameterTypeRequiredDescription
agent_idstringYesAgent to assign this mission to
goalstringYesWhat the mission should accomplish
constraintsstring[]NoConstraints on execution
success_criteriastring[]NoHow to determine success
allowed_capabilitiesstring[]NoCapability packs allowed for this mission

Examples

mission = nx.create_mission(
agent_id="agt_f7a2",
goal="Audit Q1 vendor contracts for compliance gaps",
constraints=["Read-only access", "No external API calls"],
success_criteria=["All 12 contracts reviewed", "Risk report generated"],
allowed_capabilities=["file-read"]
)
print(mission["mission_id"]) # msn_9c3d...

List Missions

GET /v1/missions
ParameterTypeRequiredDescription
agent_idstringNoFilter by agent
statusstringNoFilter: queued, running, paused, completed, failed
limitintegerNoMax results (default: 100)

Get Mission

GET /v1/missions/{mission_id}

Pause Mission

POST /v1/missions/{mission_id}/pause

Pause a running mission. The agent stops execution and can be resumed later.

Resume Mission

POST /v1/missions/{mission_id}/resume

Resume a paused mission from where it left off.

Cancel Mission

POST /v1/missions/{mission_id}/cancel

Cancel a mission permanently. Cannot be resumed after cancellation.


Capability Packs

Capability packs define which tools an agent can use and the risk level of each tool. This is policy enforcement at the orchestration layer — agents can only use tools in their assigned capability packs.

Create Capability Pack

POST /v1/capabilities

Request body

ParameterTypeRequiredDescription
namestringYesPack name (e.g., web-search, file-write)
descriptionstringNoWhat this pack enables
toolsobject[]NoTool definitions with schemas
risk_levelsobjectNoRisk level per tool: { "tool_name": "low" | "medium" | "high" | "critical" }

Examples

cap = nx.create_capability(
name="web-search",
description="Search the web and fetch pages",
tools=[
{"name": "search", "description": "Web search"},
{"name": "fetch_url", "description": "Fetch a URL"}
],
risk_levels={"search": "low", "fetch_url": "medium"}
)

List Capability Packs

GET /v1/capabilities

List all registered capability packs for the current tenant.


Checkpoints

Checkpoints save the state of a mission at a point in time. If something goes wrong, you can roll back the mission to any previous checkpoint.

Create Checkpoint

POST /v1/missions/{mission_id}/checkpoints

Request body

ParameterTypeRequiredDescription
mission_idstringYesMission to checkpoint
labelstringNoHuman-readable label (e.g., "pre-deploy", "after-review")

Examples

checkpoint = nx.create_checkpoint(
mission_id="msn_9c3d",
label="after-contract-review"
)
print(checkpoint["checkpoint_id"]) # chk_07...

List Checkpoints

GET /v1/missions/{mission_id}/checkpoints

List all checkpoints for a mission, ordered by creation time.

Rollback to Checkpoint

POST /v1/missions/{mission_id}/rollback

Restore a mission to a previous checkpoint. All state after the checkpoint is discarded.

Request body

ParameterTypeRequiredDescription
mission_idstringYesMission to rollback
checkpoint_idstringYesTarget checkpoint
reasonstringNoWhy the rollback is needed

Examples

result = nx.rollback_to_checkpoint(
mission_id="msn_9c3d",
checkpoint_id="chk_03",
reason="Agent hallucinated compliance status for vendor #7"
)

Supervisor Interventions

Interventions are human-in-the-loop controls. When an agent needs oversight — approving a risky action, pausing a misbehaving mission, or escalating a decision — supervisors record interventions that become part of the audit trail.

Create Intervention

POST /v1/interventions

Request body

ParameterTypeRequiredDescription
intervention_typestringYesOne of: approve, reject, pause, escalate, reroute, annotate, rollback_request
mission_idstringNoRelated mission
action_idstringNoRelated action
agent_idstringNoRelated agent
rationalestringNoWhy this intervention was made

Examples

intervention = nx.create_intervention(
intervention_type="reject",
mission_id="msn_9c3d",
agent_id="agt_c3b8",
rationale="Agent attempted to deploy to prod without staging verification"
)

List Interventions

GET /v1/interventions
ParameterTypeRequiredDescription
mission_idstringNoFilter by mission
agent_idstringNoFilter by agent
intervention_typestringNoFilter by type
limitintegerNoMax results (default: 100)

MCP Tools Summary

All 16 Runtime v2 tools available via novyx-mcp v2.4.0+:

ToolDescriptionKey ParametersTier
create_agentRegister a persistent agentname (str), model (str), provider (str), capabilities (list)Free
list_agentsList all agentsstatus (str), limit (int)Free
get_agentGet agent by IDagent_id (str)Free
delete_agentDelete an agentagent_id (str)Free
create_missionAssign a goal to an agentagent_id (str), goal (str), constraints (list)Free
list_missionsList missionsagent_id (str), status (str), limit (int)Free
get_missionGet mission by IDmission_id (str)Free
pause_missionPause a running missionmission_id (str)Free
resume_missionResume a paused missionmission_id (str)Free
cancel_missionCancel a missionmission_id (str)Free
create_capabilityRegister a capability packname (str), tools (list), risk_levels (object)Free
list_capabilitiesList capability packsFree
create_checkpointSave mission statemission_id (str), label (str)Free
list_checkpointsList checkpointsmission_id (str)Free
rollback_to_checkpointRestore to checkpointmission_id (str), checkpoint_id (str)Free
create_interventionRecord supervisor actionintervention_type (str), mission_id (str), rationale (str)Free
list_interventionsList interventionsmission_id (str), agent_id (str)Free