pages / example / hosted_agent

example · hosted_agent

canister coord://offchain/genie/program/hosted_agent@v1/44a7c144097b952a · v1 · artifact root 0x44a7c144097b952ac30a91f76d70cc2967020b708e98531292cf2bef758642d6 · previous none (first version) · superroot at publish not sealed yet

sealed cases that reached it: 0 — sealed cases that reached this word (the store counts, never reads)

the words it says

its helpdesk graph

hosted agent (a .genie program) in the studio: 14 symptoms, 14 fixes

the source

// _GENIE_v1_ — the hosting pack: one generated agent running as a cell of the layer — started on the hosting door, serving through an
// inference lane, its envelopes followed on the pipe stream and proven under the superroot, stopped. Every door is an op the register has;
// nothing here creates a cell: a cell exists before this program runs it. Every call is metered on the key.
genie hosted_agent v1
about "A generated agent as a cell of the layer: started, serving through an inference lane, followed on the stream, proven under the superroot, stopped"

use venue mcp
use product taifoon.lane taifoon.pipe
use guard balance-7d key-role halt-on-failure

agent cell is "one generated agent running as a cell, from provisioned to proven"
  states provisioned started serving proven stopped expired
  start provisioned
  final proven stopped expired
  failed expired
  on lane hosting
  read GET /v1/hosting/resources/:id/metrics as cell
  move provisioned -> started guard balance-7d key-role host start op POST /v1/hosting/resources/:id/:action venue mcp hop hired meter taifoon.lane
  move started -> serving guard halt-on-failure infer chat op POST /v1/chat/completions venue mcp hop delivered meter taifoon.lane
  move serving -> proven follow pipe attest twig op GET /v1/pipe/twigs/:actor/proof/:twig venue mcp hop recorded meter taifoon.pipe
  move serving -> stopped guard key-role host stop op POST /v1/hosting/resources/:id/:action venue mcp hop settled
  move started -> stopped guard key-role host stop op POST /v1/hosting/resources/:id/:action venue mcp hop settled
  move * -> expired when cell.deadline_passed == true
  refuse no_balance "the tenant's balance does not cover seven days of the cell; the start answers 402"
  refuse no_role "the key's role may not act on this cell"
  say started "The cell is started; its logs, metrics and status stream are the layer's reads"
  say serving "The cell answers through the inference lane; every call is one meter line"
  say proven "The cell's envelopes sit in a twig under the signed head and the superroot"
  next provisioned started "Start the cell on the hosting door; the balance covers seven days"
  next started serving "Serve through the chat lane; the sale record comes back with the completion"
  next serving proven "Follow the pipe stream and ask for the twig proof"

knowledge
  symptom "what is a cell, run my agent as a cell, host a generated agent, hosting" fixed_by "a cell is a generated agent running on the layer: started, served, followed and proven through the layer's own doors"
  symptom "the start answers 402, balance, cannot start the cell, payment required" fixed_by "the tenant's balance covers seven days of the cell before a start; top the vault up and start again"
  symptom "where are the logs, metrics of the cell, is the cell up, uptime" fixed_by "the cell's logs, metrics and status stream are reads of the hosting door, on the tenant's key"
  symptom "how do I call a model, inference, chat completions, which lane" fixed_by "the chat lane answers a completion with one meter line and the sale record; the community cards list who serves which model"
  symptom "follow the stream, subscribe, see my envelopes, stream lag" fixed_by "the pipe stream carries envelopes, acks and batches filtered by agent; the lanes stream carries the root every ten seconds"
  symptom "prove my record, superroot proof, is it anchored, verify a twig" fixed_by "a twig proof gives the path to the actor's signed head; a batch names its root and whether it was pushed"
  symptom "the cell was not created, no cell, create a cell" fixed_by "nothing in the layer's doors creates a cell yet; a cell is provisioned by the operator before the program starts it"
  fix "a cell is a generated agent running on the layer: started, served, followed and proven through the layer's own doors" is "A cell is a generated agent running on the layer. The program starts it on the hosting door, serves through an inference lane, follows its envelopes on the pipe stream and asks the superroot for the proof. Every door is an op the register has." opens hired
  fix "the tenant's balance covers seven days of the cell before a start; top the vault up and start again" is "A start is refused with 402 when the tenant's balance does not cover seven days of the cell. Top the vault up and start again; nothing is charged for a refused start." opens hired
  fix "the cell's logs, metrics and status stream are reads of the hosting door, on the tenant's key" is "The cell's logs, metrics and a status stream every five seconds are reads of the hosting door, on the tenant's key or the operator's. They are the cockpit's uptime and usage." opens delivered
  fix "the chat lane answers a completion with one meter line and the sale record; the community cards list who serves which model" is "The chat lane answers a completion with one meter line on the key and the sale record. A named model takes a key or an x402 payment. The community cards list who serves which model at what price." opens delivered
  fix "the pipe stream carries envelopes, acks and batches filtered by agent; the lanes stream carries the root every ten seconds" is "The pipe stream carries envelopes, leaves, acks, batches, lost and dropped, filtered by chain, venue, agent, topic, kind, state or edge. The lanes stream carries the root every ten seconds and the layer's lanes; the snapshot is the same once." opens recorded
  fix "a twig proof gives the path to the actor's signed head; a batch names its root and whether it was pushed" is "A twig proof gives the path from the twig to the actor's signed head. A batch names its root and whether it was attested and pushed under the superroot; a block, a transaction and a protocol order each have their own proof." opens recorded
  fix "nothing in the layer's doors creates a cell yet; a cell is provisioned by the operator before the program starts it" is "No op of the layer creates a cell today: a cell is provisioned by the operator, and the program starts, serves, follows and proves it. The create door is the next step of the hosting line." opens classify
  rule "a cell is started only when the balance covers seven days; the start is never retried on 402"
  rule "every call of a cell is metered on the key that made it"

door "Run a cell" as cell
  product hosting
  locale en
  step provisioned "Your cell is provisioned; the balance is checked before the start" next started opens started
  step started "Your cell is started; its status stream is live" next serving
  step serving "Your cell serves through the chat lane; every call is metered" next proven opens proven
  step proven "Your cell's envelopes are proven under the superroot"
  step stopped "Your cell is stopped"
  step expired "The deadline passed; the cell was not started"
  ask "Which cell is this about?"
  handoff "a cell that will not start needs a person of the layer" booking https://cal.com/taifoon meet https://meet.jit.si room genie-hosting