sf-sdk-world-read — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited sf-sdk-world-read (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
npm install @spfunctions/[email protected] @spfunctions/[email protected]
export SF_API_KEY="sf_..."world.read is cost-bearing and requires SF_API_KEY.
world.read → GET /api/agent/world?format=json → sf world --json → sf.world.get()import { SimpleFunctions } from "@spfunctions/sdk"
const sf = new SimpleFunctions({
apiKey: process.env.SF_API_KEY,
baseUrl: process.env.SF_API_URL ?? "https://simplefunctions.dev",
})
const world = await sf.world.get()
console.log(world.asOf)
console.log(world.regime?.label)
console.log(world.salient?.slice(0, 5).map(item => ({
type: item.type,
ticker: item.ticker,
label: item.label,
})))Stable fields when present: asOf, servedAt, op, region, regime, salient, childRegions, marketCount.
Use deltas when a long-running agent only needs changes since its last run:
// CLI equivalent: sf world --delta --json --since 1h
const deltaResponse = await fetch(
`https://simplefunctions.dev/api/agent/world/delta?since=1h`,
{ headers: { "Authorization": `Bearer ${process.env.SF_API_KEY}` } }
)
const delta = await deltaResponse.json()
console.log(delta.added) // new salient items
console.log(delta.removed) // items dropped from salience
console.log(delta.changed) // items with material price/indicator changesTypical delta payload is 30-50 tokens vs. 800+ for full snapshot. Use deltas inside agent loops; use snapshots on cold start.
import { watch } from "@spfunctions/agent/v1"
for await (const tick of watch.world({
cadence: "5min",
cycles: 12, // 1 hour
})) {
console.log(tick.asOf, tick.regime?.label, tick.salient?.length)
}watch.world() yields snapshots at the cadence. Each tick is a fresh world state.
For ticker-specific watch:
for await (const tick of watch.ticks({
tickers: ["KXFED-27APR-T3.50", "KXCPIYOY-26JUN-T4.2"],
cadence: "5min",
cycles: 1,
})) {
console.log(tick.ticker, tick.price, tick.delta)
}import { Agent, OpenRouterProvider } from "@spfunctions/agent/v1"
const agent = await Agent.create({
apiKey: process.env.SF_API_KEY,
provider: new OpenRouterProvider({ apiKey: process.env.OPENROUTER_API_KEY }),
model: { id: "anthropic/claude-haiku-4.5" },
builtinTools: ["world.read"],
options: {
watch: [
{ kind: "world", cadence: "5min" },
],
maxTurns: 4,
maxBudgetUsd: 0.50,
},
})
const run = agent.send("Watch world state. Summarize each material change.")
for await (const event of run.stream()) {
if (event.type === "agent.final") {
console.log(event.output)
}
}This pattern: the watch primitive feeds fresh world snapshots into the agent's context at each tick, and the agent's LLM summarizes the changes.
{
"name": "world.read",
"compatName": "world_read",
"permissions": ["read.public", "market_data", "read"],
"sideEffect": "none",
"costEffect": "api_cost",
"access": { "anonymousAllowed": false },
"schema": "WorldState",
"sdk": "sf.world.get()",
"http": "GET /api/agent/world?format=json",
"cli": "sf world --json"
}sideEffect: "none" = no state mutation. costEffect: "api_cost" = bills a small HTTP fetch cost. anonymousAllowed: false = requires SF API key.
SF_API_KEY. Browsing the manifest works without key; reading data does not.sf-sdk-quickstart — install + first call (run this first)sf-sdk-market-research — markets.search + market.inspect patternssf-agent-sdk-quickstart — Agent.create loop~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.