TypeScript interface defining agent runtime methods for generating and revising prompts in an AI system.
// Source: https://github.com/greyhaven-ai/autocontext | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/**
* Agent runtime interfaces and types.
* Port of autocontext/src/autocontext/runtimes/base.py
*/
import type { PromptVisibility } from "../types/index.js";
export interface AgentOutput {
text: string;
structured?: Record<string, unknown>;
costUsd?: number;
model?: string;
sessionId?: string;
metadata?: Record<string, unknown>;
}
export interface AgentRuntime {
generate(opts: {
prompt: string;
system?: string;
schema?: Record<string, unknown>;
promptVisibility?: PromptVisibility;
}): Promise<AgentOutput>;
revise(opts: {
prompt: strin
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key