SDK·GitHub·Other

Agent World Awareness

One-line prediction-market context injection for any AI agent

Install

npm i agent-world-awareness

If you only need one thing in your system prompt — what the world currently believes — this is the package. One function call returns a markdown paragraph you can paste straight into a prompt template.

Cached to avoid hitting upstream APIs on every turn; invalidates on a 5-minute window.

Quickstart

import { worldAwareness } from 'agent-world-awareness'

const ctx = await worldAwareness({ apiKey: process.env.SF_API_KEY })
const systemPrompt = `You are a macro analyst. Current world state:\n\n${ctx}`

Works in Node, Bun, Cloudflare Workers, and Vercel Edge.

Tags

agentcontexttypescriptsdkprompt

Related