Skip to content
For the complete documentation index optimized for AI agents, see llms.txt or llms-full.txt. A markdown version of this page is available by appending .md to the URL or sending Accept: text/markdown.

Explore Stacks

For AI agents: the documentation index is at llms.txt (full corpus: llms-full.txt). A markdown source for this page is /agent-skills/explore.md.

The a4 explore command is how agents (and humans) discover available stacks and introspect their schemas. Agent skills instruct the AI to run this command before writing any Arete code, so it always has accurate entity names, field paths, and types.


Terminal window
# List all available stacks
a4 explore
# Show entities and views for a stack
a4 explore <stack-name>
# Show fields and types for a specific entity
a4 explore <stack-name> <EntityName>

Add --json to any command for machine-readable output (this is what agents use):

Terminal window
a4 explore --json
a4 explore ore --json
a4 explore ore OreRound --json

Terminal window
$ a4 explore
Public Registry
────────────────────────────────────────────────────────
ore wss://ore.stack.arete.run
Entities: OreRound, OreTreasury, OreMiner
Your Stacks
────────────────────────────────────────────────────────
my-game wss://my-game-abc123.stack.arete.run [active]

Without authentication, you see public registry stacks only. When logged in (a4 auth login), you also see your own stacks.


Terminal window
$ a4 explore ore
Stack: ore (OreStream)
URL: wss://ore.stack.arete.run
Entities
────────────────────────────────────────────────────────
OreRound 3 views (state, list, latest)
Primary key: id.round_id
Fields: 15
OreTreasury 2 views (state, list)
Primary key: id.treasury_address
Fields: 8
OreMiner 2 views (state, list)
Primary key: id.miner_address
Fields: 12
Tip: Run `a4 explore ore OreRound` for field details

Terminal window
$ a4 explore ore OreRound
Entity: OreRound
Primary key: id.round_id
Fields
──────────────────────────────────────────────────────────────────
id
id.round_id u64
id.round_address Pubkey?
state
state.motherlode u64?
state.total_miners u64?
state.total_deployed u64?
state.expires_at i64?
metrics
metrics.deploy_count u64?
metrics.checkpoint_count u64?
results
results.top_miner Pubkey?
results.top_miner_reward u64?
Views
──────────────────────────────────────────────────────────────────
state State
list List
latest List (sort by id.round_id desc)

Field types with ? are nullable (wrapped in Option on the Rust side, optional in TypeScript).


Agents use the --json flag to get structured output they can parse:

Terminal window
$ a4 explore ore OreRound --json
{
"name": "OreRound",
"primary_keys": ["id.round_id"],
"fields": [
{ "path": "id.round_id", "rust_type": "u64", "nullable": false, "section": "id" },
{ "path": "id.round_address", "rust_type": "Pubkey", "nullable": true, "section": "id" },
{ "path": "state.motherlode", "rust_type": "u64", "nullable": true, "section": "state" }
],
"views": [
{ "id": "OreRound/state", "mode": "state", "pipeline": [] },
{ "id": "OreRound/list", "mode": "list", "pipeline": [] },
{ "id": "OreRound/latest", "mode": "list", "pipeline": [{"Sort": {"key": "id.round_id", "order": "desc"}}] }
]
}

This is what the agent skills instruct the AI to call. The AI then uses the field paths and types to write correct SDK code.


StateWhat you see
Not logged inPublic stacks only
Logged inPublic stacks + global stacks + your own stacks

Public stacks like ore are always available to everyone. Global stacks are available to all authenticated users. Your own deployed stacks are only visible when logged in.

Terminal window
# Log in to see all stacks
a4 auth login
# Now explore shows everything
a4 explore

The core problem with AI coding tools is stale context. If an agent has outdated schema information, it writes code with wrong field names or missing types.

a4 explore solves this because:

  • It queries the live Arete API, not static files
  • It reflects the exact schema of the deployed stack
  • The CLI version you have installed determines the API compatibility
  • Agent skills tell the AI to always run it before writing code

This means you never need to update the skill files when a stack changes. The agent gets fresh data every time.