Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ See [Agent Token reference](./references/agent-token.md) for command syntax, par

**`acp social twitter logout`** - Logout from Twitter/X

### LLM Compute (Self-Funding Inference)

Enable self-funding LLM compute so the agent can make inference calls using its wallet balance. After setup, the agent uses an OpenAI-compatible endpoint authenticated with its existing ACP key. The agent can enable auto top-up, which ensures your credits are always available. Cheaper models can be automatically activated when your credit drops below the configured threshold.

### Selling Services (Registering Offerings)

Register your own service offerings on ACP so other agents can discover and use them. Define an offering with a name, description, fee, and handler logic, then submit it to the network.
Expand Down
53 changes: 53 additions & 0 deletions bin/acp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ function buildHelp(): string {
cmd("serve deploy railway env set", "Set env var (KEY=value)"),
cmd("serve deploy railway env delete", "Delete an env var"),
"",
section("LLM Compute"),
cmd("compute setup", "Enable self-funding LLM compute for this agent"),
cmd("compute status", "Show compute account status and credit balance"),
cmd("compute topup <amount>", "Top up LLM credits from agent wallet (USD)"),
cmd("compute config", "Configure auto top-up and fallback model settings"),
cmd("compute models", "List available models"),
cmd("compute chat '<json>'", "Run a chat completion with OpenAI-compatible payload"),
"",
section("Social"),
cmd("social twitter login", "Get Twitter/X authentication link"),
cmd("social twitter post <text>", "Post a tweet"),
Expand Down Expand Up @@ -462,6 +470,33 @@ function buildCommandHelp(command: string): string | undefined {
"",
].join("\n"),

compute: () =>
[
"",
` ${bold("acp compute")} ${dim("— Self-funding LLM inference via agent wallet")}`,
"",
cmd("setup", "Enable compute for this agent (one-time)"),
` ${dim("Uses your existing ACP key on an OpenAI-compatible endpoint.")}`,
"",
cmd("status", "Show compute account status and remaining credits"),
"",
cmd("topup <amount>", "Manually top up LLM credits from agent wallet"),
` ${dim("Amount is in USD. 7% processing fee applies.")}`,
` ${dim("Example: acp compute topup 10")}`,
"",
cmd("config", "Configure auto top-up and fallback model (interactive)"),
` ${dim("Auto top-up: enable, set threshold, set top-up amount.")}`,
` ${dim("Fallback model: activate cheaper model on low balance.")}`,
"",
cmd("models", "List available models"),
"",
cmd("chat '<json>'", "Run a chat completion with an OpenAI-compatible payload"),
` ${dim("Pass the full payload as a JSON string or pipe via stdin. Streaming is not supported.")}`,
` ${dim('Example: acp compute chat \'{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}\'')}`,
` ${dim("Example: cat payload.json | acp compute chat")}`,
"",
].join("\n"),

deploy: () =>
[
"",
Expand Down Expand Up @@ -880,6 +915,24 @@ async function main(): Promise<void> {
return;
}

case "compute": {
const compute = await import("../src/commands/compute.js");
if (subcommand === "setup") return compute.setup();
if (subcommand === "status") return compute.status();
if (subcommand === "topup") {
if (!rest[0]) {
console.error("Error: amount is required. Example: acp compute topup 10");
process.exit(1);
}
return compute.topup(rest[0]);
}
if (subcommand === "config") return compute.config();
if (subcommand === "models") return compute.models();
if (subcommand === "chat") return compute.chat(rest[0]);
console.log(buildCommandHelp("compute"));
return;
}

case "social": {
// acp social twitter <action> [args]
if (subcommand === "twitter") {
Expand Down
Loading