46 lines
2.7 KiB
JSON
46 lines
2.7 KiB
JSON
{
|
|
"name": "agent",
|
|
"section": 1,
|
|
"title": "OpenAI-compatible autonomous coding agent",
|
|
"synopsis": [
|
|
"agent [--setup]",
|
|
"agent [--setup] REQUEST"
|
|
],
|
|
"description": "Runs a persistent ReAct-style loop against any OpenAI-compatible HTTPS API (Groq, OpenAI, xAI, etc.). **No environment variables** are used for credentials: everything lives in **`~/.agent/config.json`** on your **personal Hyperdrive**, created on first run with Groq-oriented defaults.\n\nOn a **TTY**, the interactive shell line editor is suspended during the session (**`suspendReplForSubprocess`**). Assistant output streams with ANSI highlighting; tool invocations are labeled.\n\n**Interrupt:** **Ctrl+C** aborts in-flight HTTPS requests (**`SIGINT`** / **`AbortSignal`**) and restores the REPL.\n\n**HTTPS policy:** Delegated **`fetch`** follows the booter (**`ctx.httpFetch`**). Where **`BARE_OS_HTTP_ALLOWLIST`** is set, operators must include your provider hostname (for example **`api.groq.com`**, **`api.openai.com`**, **`api.x.ai`**).\n\n**Tools:** **`read_file`**, **`write_file`**, **`edit_file`**, **`create_directory`**, **`search_files`** (**`grep`**), **`run_command`** (**`execLine`**), **`run_js_script`** (writes **`~/.agent/_tmp_agent_run.mjs`** then **`node`**), **`get_system_info`**, **`edit_agent_config`**, **`list_bin`**, **`task_complete`**.",
|
|
"options": [
|
|
{
|
|
"flag": "--setup",
|
|
"meaning": "interactive prompts for REST base URL, API key, model, provider; writes **`~/.agent/config.json`**"
|
|
},
|
|
{
|
|
"flag": "--help",
|
|
"meaning": "usage summary (also **`-h`**)"
|
|
}
|
|
],
|
|
"files": [
|
|
"~/.agent/config.json — REST endpoint, bearer token, model, sampling, **max_iterations**",
|
|
"~/.agent/history.json — truncated chat messages",
|
|
"~/.agent/progress.txt — human-readable tool log",
|
|
"~/.agent/instructions.md — optional user goals (**read** once per session)",
|
|
"~/.agent/context.md — optional long-running context (**read** once per session)",
|
|
"~/.agent/last_command_out.txt — stdout/stderr capture for **`run_command`** when possible"
|
|
],
|
|
"keywords": ["agent", "openai", "groq", "rest", "llm", "react", "tools"],
|
|
"examples": [
|
|
{
|
|
"caption": "configure credentials",
|
|
"code": "agent --setup"
|
|
},
|
|
{
|
|
"caption": "natural-language task",
|
|
"code": "agent \"list ten random names from /bin\""
|
|
}
|
|
],
|
|
"seeAlso": [
|
|
{ "name": "man", "section": 1 },
|
|
{ "name": "bare-os-shell", "section": 7 },
|
|
{ "name": "curl", "section": 1 }
|
|
],
|
|
"bareOsNotes": "Session blocks shell input via REPL suspend; **`ctx.readLine`** masking for API keys depends on booter capabilities. Prefer **`chmod 600`** on **`config.json`** (best-effort)."
|
|
}
|