Skip to main content

Configuration

Configure your AgentVault projects with YAML configuration files.

agent.yaml

The main agent configuration file at project root:

name: My Agent
description: Description of your agent
entry: src/index.ts
memory: 256
compute: medium
cycles: 1000000000000
routing:
- canister-a-id
- canister-b-id

Configuration Options

OptionTypeDescriptionDefault
namestringAgent namepackage.json name
descriptionstringAgent description-
entrystringEntry point filesrc/index.ts
memorynumberMemory allocation (MB)256
computestringCompute tier: low, medium, highmedium
cyclesbigintInitial cycles allocation1T
routingarrayRouting canisters-

Memory Tiers

TierMemoryUse Case
Low128 MBSimple agents, minimal state
Medium256 MBStandard agents (default)
High512 MB+Complex agents, large state

Compute Tiers

TierComputeUse Case
Low1xLight processing
Medium2xStandard processing (default)
High4xIntensive processing

icp.yaml

ICP network configuration for deployment settings:

environments:
local:
network:
type: local
host: http://127.0.0.1:4943
replicaCount: 4
cycles:
initial: 100T
production:
network:
type: ic
host: https://ic0.app
replicaCount: 20
cycles:
initial: 500T
refillThreshold: 100T

optimization:
level: 3
shrink: true
removeDebug: true

Environment Options

OptionDescription
network.typelocal or ic
network.hostNetwork endpoint URL
replicaCountNumber of replicas
cycles.initialInitial cycles allocation
cycles.refillThresholdAuto-refill threshold

Optimization Options

OptionDescription
levelOptimization level (0-3)
shrinkEnable WASM shrinking
removeDebugRemove debug symbols

Environment Variables

ICP Configuration

ICP_LOCAL_URL=http://127.0.0.1:4943    # Local replica URL
ICP_MAINNET_URL=https://ic0.app # Mainnet URL
ICP_NETWORK=local # Default network
ICP_IDENTITY=default # dfx identity name

RPC Endpoints

# Ethereum
ETHEREUM_RPC_URL=https://eth.example.com
SEPOLIA_RPC_URL=https://sepolia.example.com
INFURA_API_KEY=your-key
ETHERSCAN_API_KEY=your-key

# Solana
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
SOLANA_MAINNET_RPC_URL=https://api.mainnet-beta.solana.com
SOLANA_DEVNET_RPC_URL=https://api.devnet.solana.com

# Polkadot
POLKADOT_RPC_URL=wss://rpc.polkadot.io
KUSAMA_RPC_URL=wss://kusama-rpc.polkadot.io

Application Settings

AGENTVAULT_DEBUG=false                  # Enable debug mode
AGENTVAULT_LOG_LEVEL=info # Log level
AGENTVAULT_CACHE_DIR=~/.agentvault # Cache directory

.env File

Create a .env file in your project root:

# ICP Configuration
ICP_LOCAL_URL=http://127.0.0.1:4943
ICP_MAINNET_URL=https://ic0.app

# Ethereum
ETHEREUM_RPC_URL=https://mainnet.infura.io/v3/YOUR_KEY
ETHERSCAN_API_KEY=YOUR_KEY

# Solana
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com

# Polkadot
POLKADOT_RPC_URL=wss://rpc.polkadot.io

Important: Add .env to .gitignore to avoid committing secrets.

Configuration Precedence

Configuration is loaded in this order (later overrides earlier):

  1. Default values
  2. agent.yaml
  3. icp.yaml
  4. .env file
  5. Environment variables
  6. CLI flags

Validation

Validate your configuration:

# Validate agent.yaml
agentvault validate

# Show effective configuration
agentvault config show

Project Structure

A complete AgentVault project:

my-agent/
├── .agentvault/
│ ├── config.yaml # Generated configuration
│ └── state/ # Local state storage
├── src/
│ └── index.ts # Agent entry point
├── agent.yaml # Agent configuration
├── icp.yaml # ICP deployment config
├── package.json
├── tsconfig.json
└── .env # Environment variables (gitignored)

Next Steps