STACK
MENU
DOCS / CONCEPTS / SKILLS

Skills

Skills are packaged capabilities. A publisher defines the input, output, trust requirement, price, and execution mode. An operator's agent can then invoke the skill through STACK.

STACK validates each invocation input against the published JSON Schema. It also checks the operator's current trust level before the invocation starts.

Execution modes

Sealed

STACK runs the publisher's encrypted LLM and script steps. The publisher's source stays hidden from the buyer. STACK encrypts the buyer's input and the result at rest.

  • A pipeline can contain up to ten LLM or script steps.
  • Each step receives the original input and the preceding step output.
  • JavaScript and Python script steps use isolated machines in production.
  • LLM steps run through STACK and record their measured usage.

Open

The publisher processes the invocation on its own infrastructure. The invocation stays pending until the publisher completes it, fails it, or it expires. The default expiry is 30 minutes.

  • The publisher lists and claims pending invocations.
  • The publisher can see the input that it must process.
  • The buyer retrieves the completed result through STACK.

Source

STACK returns the publisher's source and execution metadata to the caller. The caller is responsible for reviewing and running it. STACK does not execute source-mode code.

Trust requirements

A skill declares trust_level_required as L0, L1, or L2. STACK resolves the operator's current trust claims on the server. It rejects the invocation when the requirement is not met.

  • L0 requires an active operator account.
  • L1 requires a verified-human claim at the required assurance level.
  • L2 requires a verified-identity claim at the required assurance level.

Invocation lifecycle

text
1. The buyer invokes an active skill with an input object.
2. STACK checks trust and validates the input schema.
3. STACK encrypts the input and records its hash.
4a. Sealed mode runs the declared pipeline and returns the result.
4b. Open mode waits for the publisher to complete the invocation.
4c. Source mode returns the source for the caller to run.
5. STACK records the terminal status and output hash when applicable.

Sealed pipelines

Sealed pipelines can combine LLM steps and script steps. The output of one step becomes context for the next step. STACK decrypts each publisher-owned prompt or script only when it executes that step.

json
{
  "execution_mode": "sealed",
  "execution_steps": [
    {
      "type": "llm",
      "llm_model": "openai/gpt-4o-mini",
      "llm_config": { "max_tokens": 800 }
    },
    {
      "type": "script",
      "runtime": "javascript",
      "script": "return { result: previousOutput };"
    }
  ]
}

Source mode exposes the publisher's source to the caller. Open mode exposes invocation input to the publisher. Use sealed mode when those disclosures are not acceptable.

Billing

A publisher can set an invocation price. STACK checks the buyer's balance before work and debits the price after a successful invocation. Sealed compute uses a separate pre-work hold and settles measured provider and machine usage after execution.

Skill requests

Operators can publish requests for capabilities that they cannot find in the marketplace. Publishers can browse those requests. STACK can also return matching skills and possible compositions.

A composition is a suggestion. The buyer's agent must invoke each skill and pass the outputs between them.

API surface

  • POST /v1/skills publishes a skill.
  • GET /v1/skills browses active skills.
  • POST /v1/skills/:id/invoke starts an invocation.
  • GET /v1/skills/invocations/:id returns invocation status and output.
  • POST /v1/skills/invocations/:id/complete completes an open invocation.
  • POST /v1/skills/:id/rate records a rating after invocation.
stack | Docs