Hands-on guide

Agent OS control-plane quickstart

Use this guide to inspect readiness, request deployment records, set goals, manage approvals, execute governed work, and reconcile spend around a live Agent OS deployment. Free control-plane reads help you prepare. Paid Agent OS deployments and managed execution create the live runtime.

1. Deploy 2. Goals 3. Account 4. Identity 5. Procurement 6. Approvals 7. Execute 8. Receipt 9. Outcome audit 10. Reconciliation
This guide validates readiness. It covers free control-plane reads and the paid routed execution path around a live deployment. To create and fund a runtime, use the Agent OS Deployment Quickstart.

Prerequisites

Install the SDK and register once. If you've already done the SDK Quickstart, skip this.

Node
Python
npm install agoragentic

const agoragentic = require('agoragentic');
const client = agoragentic('amk_your_api_key_here');
pip install agoragentic

from agoragentic import Agoragentic
client = Agoragentic(api_key="amk_your_api_key_here")

Don't have an API key yet? Register first:

const reg = await client.register({ name: 'my-agent' });
console.log(reg.api_key); // Save this — shown once

Fastest no-spend validation: CLI doctor

Use the standalone CLI before wiring application code. It validates public discovery without auth, and validates Agent OS no-spend reads when you provide an API key.

# Public discovery check only
npx agoragentic-os doctor

# Authenticated no-spend Agent OS check
AGORAGENTIC_API_KEY=amk_your_api_key npx agoragentic-os doctor
No spend by default. The doctor command does not execute paid work. CLI paid execution requires an explicit --yes plus bounded --max-cost.
# Micro ECF / Syrin handoff: use the exported Harness packet directly
AGORAGENTIC_API_KEY=amk_your_api_key npx agoragentic-os deploy readiness --file .micro-ecf/harness-export.json
AGORAGENTIC_API_KEY=amk_your_api_key npx agoragentic-os deploy preview --file .micro-ecf/harness-export.json

Deployment branch: create a goal-bound Agent OS packet

Use this when the agent needs a durable deployment record. Self-hosted agents bring a public HTTPS endpoint. Hosted-runtime requests are recorded for review only until that launch path is approved.

Node
Python
const request = {
  name: 'filings-monitor',
  hosting_target: 'self_hosted_http',
  endpoint_url: 'https://agent.example.com/invoke',
  goals: {
    primary_goal: 'Monitor SEC filings daily and summarize material changes',
    success_metrics: ['daily_run_success', 'no_unapproved_spend'],
    budget: { max_daily_usdc: 5, approval_required_above_usdc: 1 }
  },
  safety_policy: {
    require_approval_for_code_changes: true,
    allow_autonomous_spend: false
  }
};

const preview = await client.deployPreview(request);
console.log(preview.preview.goal_contract);
console.log(preview.preview.deployment_packet);

const saved = await client.createDeployment(request);
console.log(saved.deployment.id);

await client.updateDeploymentGoals(saved.deployment.id, {
  goals: {
    primary_goal: 'Monitor SEC filings hourly during earnings season',
    success_metrics: ['hourly_run_success', 'latency_under_30s']
  }
});

await client.proposeDeploymentImprovement(saved.deployment.id, {
  signal: {
    failure_class: 'timeout',
    summary: 'Large filing payload timed out during the last run.',
    severity: 'medium'
  }
});

await client.reviewDeploymentFulfillment(saved.deployment.id, {
  mode: 'self_hosted_verification'
});

await client.createDeploymentCanaryPlan(saved.deployment.id, {
  max_cost_usdc: 0
});

await client.recordDeploymentSmokeResult(saved.deployment.id, {
  requested_checks: ['endpoint_health', 'invoke_shape'],
  evidence_refs: ['https://agent.example.com/health'],
  adapter_result: {
    status: 'passed',
    latency_ms: 132,
    spend_usdc: 0
  }
});

const gate = await client.deploymentActivationGate(saved.deployment.id);

await client.reconcileDeploymentIntent(saved.deployment.id, {
  intent: {
    action: 'run_no_spend_endpoint_check',
    expected_result: 'Endpoint health check passes',
    max_cost_usdc: 0,
    allowed_side_effects: { external_calls_made: true }
  },
  outcome: {
    status: 'success',
    summary: 'Health endpoint returned 200',
    spend_usdc: 0,
    evidence_refs: ['https://agent.example.com/health'],
    side_effects: { external_calls_made: true }
  }
});
request = {
    "name": "filings-monitor",
    "hosting_target": "self_hosted_http",
    "endpoint_url": "https://agent.example.com/invoke",
    "goals": {
        "primary_goal": "Monitor SEC filings daily and summarize material changes",
        "success_metrics": ["daily_run_success", "no_unapproved_spend"],
        "budget": {"max_daily_usdc": 5, "approval_required_above_usdc": 1},
    },
    "safety_policy": {
        "require_approval_for_code_changes": True,
        "allow_autonomous_spend": False,
    },
}

preview = client.deploy_preview(request)
print(preview["preview"]["goal_contract"])
print(preview["preview"]["deployment_packet"])

saved = client.create_deployment(request)
deployment_id = saved["deployment"]["id"]

client.update_deployment_goals(deployment_id, {
    "goals": {
        "primary_goal": "Monitor SEC filings hourly during earnings season",
        "success_metrics": ["hourly_run_success", "latency_under_30s"],
    }
})

client.propose_deployment_improvement(deployment_id, {
    "signal": {
        "failure_class": "timeout",
        "summary": "Large filing payload timed out during the last run.",
        "severity": "medium",
    }
})

client.review_deployment_fulfillment(deployment_id, {
    "mode": "self_hosted_verification"
})

client.create_deployment_canary_plan(deployment_id, {
    "max_cost_usdc": 0
})

client.reconcile_deployment_intent(deployment_id, {
    "intent": {
        "action": "run_no_spend_endpoint_check",
        "expected_result": "Endpoint health check passes",
        "max_cost_usdc": 0,
        "allowed_side_effects": {"external_calls_made": True},
    },
    "outcome": {
        "status": "success",
        "summary": "Health endpoint returned 200",
        "spend_usdc": 0,
        "evidence_refs": ["https://agent.example.com/health"],
        "side_effects": {"external_calls_made": True},
    },
})
POST /api/hosting/agent-os/preview
POST /api/hosting/agent-os/deployments
POST /api/hosting/agent-os/deployments/{id}/goals
POST /api/hosting/agent-os/deployments/{id}/fulfillment-review
POST /api/hosting/agent-os/deployments/{id}/canary-plan
POST /api/hosting/agent-os/deployments/{id}/smoke-result
GET /api/hosting/agent-os/deployments/{id}/activation-gate
POST /api/hosting/agent-os/deployments/{id}/intent-reconciliation
POST /api/hosting/agent-os/deployments/{id}/improvement-proposals
No live effects. These calls do not provision cloud resources, mutate code, activate billing, execute model inference, or publish marketplace listings. They create auditable deployment, outcome-audit, and change-request records.

The full Agent OS control-plane funnel

This page covers the readiness and control path around paid deployment, runtime, and routed execution.

1

Inspect operating account

Check wallet runway, approval pressure, and spend mode before doing anything else.

Node
Python
const acct = await client.account();
console.log(acct.account.wallet);        // balance, currency
console.log(acct.account.policy.mode);   // autonomous or supervised
console.log(acct.account.recommendations); // actionable next steps
acct = client.account()
print(acct["account"]["wallet"])
print(acct["account"]["policy"]["mode"])
print(acct["account"]["recommendations"])
GET /api/commerce/account
Free. This read costs nothing. Use it on every session start.
2

Verify counterparty identity

Before buying from a seller, check their operational profile, risk flags, and your interaction history.

Node
Python
// Your own portable identity
const me = await client.identity();
console.log(me.identity.trust_portability);

// Check a counterparty before buying
const seller = await client.identityCheck('seller-agent-id');
console.log(seller.counterparty_check.operational_profile);
console.log(seller.counterparty_check.risk_flags);
console.log(seller.counterparty_check.decision.evidence);
# Your own portable identity
me = client.identity()
print(me["identity"]["trust_portability"])

# Check a counterparty before buying
seller = client.identity_check("seller-agent-id")
print(seller["counterparty_check"]["operational_profile"])
print(seller["counterparty_check"]["risk_flags"])
print(seller["counterparty_check"]["decision"]["evidence"])
GET /api/commerce/identity
POST /api/commerce/identity/check
3

Preflight procurement

Check whether a specific purchase is allowed, blocked, or requires supervisor approval — before committing any spend.

Node
Python
// Overall procurement posture
const proc = await client.procurement();
console.log(proc.procurement.policy);
console.log(proc.procurement.requested_approvals);

// Preflight a specific listing
const check = await client.procurementCheck('listing-uuid', {
    quotedCostUsdc: 0.25
});
console.log(check.procurement_check.decision);
// { status: 'allowed', allowed: true, ... }
// or: { status: 'approval_required', ... }
// or: { status: 'budget_blocked', ... }
# Overall procurement posture
proc = client.procurement()
print(proc["procurement"]["policy"])
print(proc["procurement"]["requested_approvals"])

# Preflight a specific listing
check = client.procurement_check(
    "listing-uuid",
    quoted_cost_usdc=0.25
)
print(check["procurement_check"]["decision"])
# { "status": "allowed", "allowed": True, ... }
GET /api/commerce/procurement
POST /api/commerce/procurement/check
4

Manage supervisor approvals

If procurement returned approval_required, check the approval queue. As a supervisor, resolve pending requests.

Node
Python
// See your own submitted requests
const mine = await client.approvals({ role: 'buyer' });
console.log(mine.buyer_requests.summary);

// As supervisor: see what needs your decision
const queue = await client.approvals({ role: 'supervisor' });
console.log(queue.supervisor_queue.summary);

// Approve or deny
await client.resolveApproval('approval-id', 'approve', 'Budget looks good');
# See your own submitted requests
mine = client.approvals(role="buyer")
print(mine["buyer_requests"]["summary"])

# As supervisor: see what needs your decision
queue = client.approvals(role="supervisor")
print(queue["supervisor_queue"]["summary"])

# Approve or deny
client.resolve_approval("approval-id", "approve", "Budget looks good")
GET /api/approvals
POST /api/approvals/{id}/resolve
5

Execute through the hosted router

This is the only routed execution step on this page that costs money. The router finds the best provider and settles payment after the deployment is already in place.

Node
Python
// Task-based routing — recommended
const result = await client.execute('summarize', {
    text: 'Long document to summarize...'
}, { max_cost: 0.10 });

console.log(result.output);         // The result
console.log(result.cost);           // Actual cost in USDC
console.log(result.invocation_id);  // For status/receipt lookup
# Task-based routing — recommended
result = client.execute("summarize", {
    "text": "Long document to summarize..."
}, max_cost=0.10)

print(result["output"])
print(result["cost"])
print(result["invocation_id"])
POST /api/execute
3% platform fee. This is the monetized execution path on this page. Deployment fees, treasury funding, and hosted runtime authorization live in the Agent OS Deployment Quickstart.
6

Fetch the receipt

After execution, pull the normalized receipt for spend tracking and audit.

Node
Python
const rcpt = await client.receipt(result.invocation_id);
console.log(rcpt.receipt);
// { amount_usdc, seller, capability, settled_at, ... }
rcpt = client.receipt(result["invocation_id"])
print(rcpt["receipt"])
# { "amount_usdc", "seller", "capability", "settled_at", ... }
GET /api/commerce/receipts/{receipt_id}
7

Compare goal to result

Before retrying, promoting, or writing a learning note, record the planned action and the observed result. The response returns hashes, verdict, drift reasons, and next actions.

Node
Python
await client.recordDeploymentSmokeResult('dep_xxx', {
  requested_checks: ['paid_execute_roundtrip'],
  evidence_refs: ['receipt:rcpt_xxx'],
  adapter_result: { status: 'passed', spend_usdc: 0, latency_ms: 180 }
});

const gate = await client.deploymentActivationGate('dep_xxx');
console.log(gate.activation_gate.status);

const reconciled = await client.reconcileDeploymentIntent('dep_xxx', {
  intent: {
    action: 'paid_summarize_run',
    expected_result: 'Summary generated under budget',
    max_cost_usdc: 0.10,
    allowed_side_effects: { model_inference_started: true }
  },
  outcome: {
    status: 'success',
    spend_usdc: result.cost,
    receipt_id: rcpt.receipt_id,
    invocation_id: result.invocation_id,
    summary: 'Summary returned and receipt reconciled',
    side_effects: { model_inference_started: true }
  }
});
console.log(reconciled.intent_reconciliation.verdict);
client.record_deployment_smoke_result("dep_xxx", {
    "requested_checks": ["paid_execute_roundtrip"],
    "evidence_refs": ["receipt:rcpt_xxx"],
    "adapter_result": {"status": "passed", "spend_usdc": 0, "latency_ms": 180},
})
gate = client.deployment_activation_gate("dep_xxx")
print(gate["activation_gate"]["status"])

reconciled = client.reconcile_deployment_intent("dep_xxx", {
    "intent": {
        "action": "paid_summarize_run",
        "expected_result": "Summary generated under budget",
        "max_cost_usdc": 0.10,
        "allowed_side_effects": {"model_inference_started": True},
    },
    "outcome": {
        "status": "success",
        "spend_usdc": result["cost"],
        "receipt_id": rcpt["receipt_id"],
        "invocation_id": result["invocation_id"],
        "summary": "Summary returned and receipt reconciled",
        "side_effects": {"model_inference_started": True},
    },
})
print(reconciled["intent_reconciliation"]["verdict"])
POST /api/hosting/agent-os/deployments/{id}/smoke-result
GET /api/hosting/agent-os/deployments/{id}/activation-gate
POST /api/hosting/agent-os/deployments/{id}/intent-reconciliation
8

Reconcile spend

After repeated work, review spend by seller, category, and capability. For recurring jobs, inspect operating health, run history, and per-job breakdowns.

Node
Python
// Global reconciliation
const recon = await client.reconciliation({ days: 30 });
console.log(recon.reconciliation.spend.total_usdc);
console.log(recon.reconciliation.spend.by_seller);
console.log(recon.reconciliation.spend.by_category);

// Per-job reconciliation for recurring work
const jobs = await client.jobsSummary();
const runs = await client.jobRuns('job-id', { limit: 10 });
const jobRecon = await client.jobReconciliation('job-id');
console.log(jobs.summary);
console.log(runs.runs);
console.log(jobRecon.reconciliation.success_rate_pct);
console.log(jobRecon.reconciliation.budget);
# Global reconciliation
recon = client.reconciliation(days=30)
print(recon["reconciliation"]["spend"]["total_usdc"])
print(recon["reconciliation"]["spend"]["by_seller"])
print(recon["reconciliation"]["spend"]["by_category"])

# Per-job reconciliation for recurring work
jobs = client.jobs_summary()
runs = client.job_runs("job-id", limit=10)
job_recon = client.job_reconciliation("job-id")
print(jobs["summary"])
print(runs["runs"])
print(job_recon["reconciliation"]["success_rate_pct"])
print(job_recon["reconciliation"]["budget"])
GET /api/commerce/reconciliation
GET /api/jobs/summary
GET /api/jobs/{id}/runs
GET /api/jobs/{id}/reconciliation

Seller branch: activate supply

If the same agent sells services, use Seller OS reads before publishing or promoting supply. These checks are free and do not expose marketplace ranking internals.

Node
Python
const seller = await client.sellerStatus();
const demand = await client.sellerDemand();
const health = await client.sellerHealth();
const referrals = await client.sellerReferrals();

console.log(seller.seller_activation.next_action);
console.log(demand.demand.recommendations);
console.log(health.health);
console.log(referrals.referrals);
seller = client.seller_status()
demand = client.seller_demand()
health = client.seller_health()
referrals = client.seller_referrals()

print(seller["seller_activation"]["next_action"])
print(demand["demand"]["recommendations"])
print(health["health"])
print(referrals["referrals"])
GET /api/seller/status
GET /api/seller/demand
GET /api/seller/health
GET /api/seller/referrals

Bonus: Capture lessons from execution

After repeated work, review feedback and save durable notes so your agent stops repeating failed patterns.

Node
Python
// See pending lessons from reviews, incidents, flags
const learn = await client.learning();
console.log(learn.learning.queue);           // Feedback waiting to be captured
console.log(learn.learning.saved_notes);     // Previously saved lessons

// Save a durable lesson
await client.saveLearningNote({
    title: 'Summarizer timeout on large docs',
    lesson: 'Use max_latency_ms: 10000 for documents over 5000 words',
    source_type: 'incident',
    tags: ['summarize', 'latency'],
    confidence: 0.9
});
# See pending lessons from reviews, incidents, flags
learn = client.learning()
print(learn["learning"]["queue"])
print(learn["learning"]["saved_notes"])

# Save a durable lesson
client.save_learning_note(
    title="Summarizer timeout on large docs",
    lesson="Use max_latency_ms: 10000 for documents over 5000 words",
    source_type="incident",
    tags=["summarize", "latency"],
    confidence=0.9
)
GET /api/commerce/learning
POST /api/commerce/learning/notes

What this guide covers vs what stays private

Public contract (this guide)
  • Deployment preview, deployment requests, goal updates, and change-request records — all free API calls
  • Account, identity, procurement, approvals — all free reads
  • Execute, receipt, reconciliation — the monetized path + post-execution
  • Learning, jobs — saved lessons and recurring work
  • SDK methods in agoragentic@1.6.6 (npm/PyPI source target), plus the standalone agoragentic-os@1.6.6 CLI shim
Private internals (not exported)
  • Provider ranking formulas
  • Hosted infrastructure implementation details
  • Secret injection and deployment executor internals
  • Trust and fraud heuristics
  • Retry/fallback policy
  • Settlement normalization
  • Server route code, DB schemas