Artemis docs
How to run agents from the console or the API, how billing works, and the real code behind both. Agents run on live data from Robinhood Chain (chain ID 4663).
Quickstart
Open the Console, pick an agent and write the command you would post to @artemis on X. Or call the same API the console uses:
curl -N https://www.artemis-agent.fun/api/run \
-H "Content-Type: application/json" \
-d '{"agentId":"artemis-core","command":"@artemis gas on Robinhood Chain?","payment":{"mode":"house"}}'Each visitor gets a few free runs per hour on house credits. For more, sign a key with your wallet and top up with USDG.
Run API
POST /api/run
Content-Type: application/json
{
"agentId": "artemis-core", // artemis-core | alpha-scout | thread-writer
"command": "@artemis what's $ETH doing?",
"replyTo": "https://x.com/user/status/1849...", // optional
"wallet": "0x…", // optional, enables "my balance"
"payment": { "mode": "house" } // or { "mode": "key", "key": "ak_0x…_0x…" }
}Errors return JSON with an error field: 400 bad input, 401 invalid key, 402 not enough credits, 429 house quota used up.
Event stream
The response is newline-delimited JSON, so the console can draw each tool call as it lands.
{"type":"start","runId":"run_8f3a92","agent":"artemis-core","mode":"llm","payer":"house"}
{"type":"tool_start","id":"call_1","name":"get_price","input":{"symbol":"ETH"}}
{"type":"tool_end","id":"call_1","name":"get_price","output":{"price_usd":3120.4,…},"ms":124,"ok":true}
{"type":"reply","text":"$ETH is trading at $3,120.40 (+1.20% 24h)…"}
{"type":"done","cost":1.8,"durationMs":2410,"toolCalls":2,"tokens":1350,"houseRemaining":4}Artemis key
Your key is a wallet signature over a fixed message. It proves which address pays — it cannot move funds. It lives in the browser tab (session storage) and is sent with each run; the server verifies it and never stores it. Smart-wallet signatures (ERC-1271/6492) are verified on-chain.
Artemis key Sign to create your Artemis key. This signature only identifies your wallet for paying Artemis credits. It cannot move funds and costs no gas. chain: 4663 epoch: 0
import { useSignMessage } from "wagmi";
import { encodeKey, KEY_MESSAGE } from "@/lib/key";
const sig = await signMessage.mutateAsync({ message: KEY_MESSAGE });
const key = encodeKey(address, sig); // "ak_<address>_<signature>"Credits
1 credit = $0.01, bought with USDG on Robinhood Chain (1 USDG = 100 credits). A run costs the model's real token price × 3, plus 0.05 credit per successful tool call. With DeepSeek a typical run is about 0.15 credit ($0.0015). Runs in demo mode are free, and every new key starts with 10 free credits.
To top up, approve USDG for the ArtemisCredits contract and call deposit — the console's Top up button does both:
/// @notice Top up your own credits. Approve this contract for `amount` USDG first.
function deposit(uint256 amount) external {
depositFor(msg.sender, amount);
}
/// @notice Top up credits for any wallet (gifts, team accounts).
function depositFor(address user, uint256 amount) public {
if (amount == 0) revert ZeroAmount();
if (user == address(0)) revert ZeroAddress();
_safeTransferFrom(msg.sender, address(this), amount);
depositedOf[user] += amount;
totalDeposited += amount;
emit Deposited(msg.sender, user, amount);
}How agents work
Each agent is a plain object: a system prompt, the tools it may call and a reply budget. This is the live definition of Artemis Core:
{
id: "artemis-core",
name: "Artemis Core",
tagline: "General-purpose agent for research, analysis and execution.",
tools: ["get_price", "chain_stats", "get_balance", "token_info", "search_posts", "swap_quote"],
maxChars: 280,
system: `${BASE}\nYou are Artemis Core: precise, calm, a little dry. Lead with the number, then one line of context.`,
},How tools work
A tool is a JSON-schema description plus an async run. The model sees the description, decides to call it, and the server runs it against live data. This is the chain status tool:
chain_stats: {
name: "chain_stats",
description: "Current Robinhood Chain status: latest block, gas price, chain id.",
parameters: { type: "object", properties: {} },
run: async () => {
const [block, gas] = await Promise.all([publicClient.getBlock(), publicClient.getGasPrice()]);
return {
chain: "Robinhood Chain",
chain_id: 4663,
block_number: Number(block.number),
block_time: new Date(Number(block.timestamp) * 1000).toISOString(),
txs_in_block: block.transactions.length,
gas_price_gwei: Number(formatGwei(gas)),
source: "rpc",
};
},
},