gizai:agent/research
Web research and bounded HTTP reads for agent capabilities. Hosts supply network admission explicitly.
import * as Research from "gizai:agent/research";Types
Link
type Link = { title: string; url: string; }A source a step found.
title:stringurl:string
Outcome
type Outcome = { ok: bool; text: string; note: string; links: Vec<Link>; }A tool's result: text for the model, a note for the person, sources.
ok:booltext:stringnote:stringlinks:Vec<M28.Link>
Context
type Context = { sys: System; inside: bool; }The host of a research call and whether it runs inside the host's network (private addresses admitted).
sys:gizlang_system.Systeminside:bool
Answer
type Answer = { status: i64; text: string; headers: Vec<Http.Header>; }An API's answer: its status, its body as text and its headers.
status:i64text:stringheaders:Vec<gizlang_http.Header>
Functions
search
function search(context: Context, query: string): OutcomeUp to eight web results: DuckDuckGo's HTML page (no key, no script, no ads), or Bing's when DuckDuckGo turns the request away: it answers a rate-limited address with 202, or with 200 and a challenge page instead of results, often for a whole day.
Effects: fail, read, write, console, io.
read
function read(context: Context, address: string): OutcomeA page's title and text, at most MOST_TEXT bytes of it.
Effects: fail, read, write, console, io.
linksOf
function linksOf(json: string): Vec<Link>Sources from the JSON an item keeps.
Effects: fail.
call
function call(context: Context, method: string, address: string, headers: Vec<Http.Header>, body: bytes): AnswerCalls an API on the public Internet: method to address with headers and body, following redirects and
reading at most MOST_PAGE bytes of text; the body of any status is kept.
Effects: fail, read, write, console, io.