Skip to content

Configure Agents

Learn how to create, configure, and manage agents with all available fields and options.

Create a new agent in memory (not yet registered):

from agent0_sdk import SDK
# Initialize SDK
sdk = SDK(
chainId=11155111,
rpcUrl="https://sepolia.infura.io/v3/YOUR_PROJECT_ID",
signer=your_private_key,
ipfs="pinata",
pinataJwt=your_pinata_jwt
)
# Create an agent
agent = sdk.createAgent(
name="My AI Agent",
description="An intelligent assistant that helps with various tasks. Skills: data analysis, code generation, natural language processing. Pricing: $0.10 per request, free tier available.",
image="https://example.com/agent-image.png" # Optional
)
# Update basic information
agent.updateInfo(
name="Updated Agent Name",
description="Updated description",
image="https://example.com/new-image.png"
)
# Set agent as active/inactive
agent.setActive(True) # Active (visible in searches)
agent.setActive(False) # Inactive (hidden but not deleted)
# Enable/disable x402 payment support
agent.setX402Support(True)
# Set MCP endpoint
agent.setMCP(endpoint="https://mcp.example.com/")

When you set an MCP endpoint, the SDK automatically:

  • Fetches tools, prompts, and resources from the endpoint
  • Populates the agent’s capabilities
# Set A2A endpoint
agent.setA2A(agentcard="https://a2a.example.com/agent-card.json")

The SDK automatically:

  • Fetches skills from the A2A agent card
  • Indexes capabilities for search
# Set ENS name
agent.setENS(name="myagent.eth")

This stores the ENS name both:

  • In the registration file
  • As on-chain metadata
# Remove specific endpoint type
agent.removeEndpoint(type=EndpointType.MCP)
# Remove by value
agent.removeEndpoint(value="https://old-endpoint.com")
# Remove all endpoints
agent.removeEndpoints()

TypeScript Note: removeEndpoint and removeEndpoints methods are not available in the TypeScript SDK. Manually filter endpoints from the registration file instead.

# Set agent wallet address
agent.setAgentWallet(
addr="0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
chainId=11155111 # Optional: defaults to SDK's chain ID
)

The wallet address is stored as:

  • agentWallet endpoint in the registration file
  • agentWallet metadata on-chain

Agents can advertise their capabilities using the Open Agentic Schema Framework (OASF) taxonomies. This provides standardized classifications for skills and domains, improving discoverability and interoperability.

# Add skill without validation (allows any string)
agent.addSkill("custom_skill/my_skill", validate_oasf=False)
# Add skill with validation (ensures it exists in OASF taxonomy)
agent.addSkill("advanced_reasoning_planning/strategic_planning", validate_oasf=True)
# Add domain without validation
agent.addDomain("custom_domain/my_domain", validate_oasf=False)
# Add domain with validation
agent.addDomain("finance_and_business/investment_services", validate_oasf=True)
# Remove a skill
agent.removeSkill("advanced_reasoning_planning/strategic_planning")
# Remove a domain
agent.removeDomain("finance_and_business/investment_services")

All OASF methods support chaining:

agent.addSkill("data_engineering/data_transformation_pipeline", validate_oasf=True)\
.addDomain("technology/data_science", validate_oasf=True)\
.addSkill("natural_language_processing/summarization", validate_oasf=True)

OASF skills and domains are stored in the registration file’s endpoints array:

{
"endpoints": [
{
"name": "OASF",
"endpoint": "https://github.com/agntcy/oasf/",
"version": "v0.8.0",
"skills": [
"advanced_reasoning_planning/strategic_planning",
"data_engineering/data_transformation_pipeline"
],
"domains": [
"finance_and_business/investment_services",
"technology/data_science/data_visualization"
]
}
]
}

Note: Validation is disabled by default (validate_oasf=False / validateOASF=false) to allow flexibility, but it’s recommended to enable it to ensure your agent’s capabilities are properly classified.

Taxonomy Files: The SDK includes complete OASF v0.8.0 taxonomy files:

  • Python: agent0_sdk/taxonomies/all_skills.json and all_domains.json
  • TypeScript: src/taxonomies/all_skills.json and all_domains.json
# Using convenience method
agent.setTrust(
reputation=True,
cryptoEconomic=True,
teeAttestation=False
)

Available trust models:

  • reputation - On-chain feedback system
  • crypto-economic - Economic stake and slashing
  • tee-attestation - Trusted execution environment proofs
# Set on-chain metadata (stored on blockchain)
agent.setMetadata({
"version": "1.0.0",
"category": "developer-tools",
"pricing": "free"
})
# Get metadata
metadata = agent.getMetadata()
print(metadata)

Metadata is stored as on-chain key-value pairs in the Identity Registry contract.

Load an agent that’s already registered for editing:

# Load by agent ID
# Format: "chainId:agentId" (e.g., "11155111:123") or just "agentId" (uses default chain)
# where 11155111 is the Sepolia chain ID and 123 is the agent's token ID
agent = sdk.loadAgent("11155111:123") # Explicit chain
agent = sdk.loadAgent("123") # Uses SDK's default chain
# All fields are automatically loaded
print(f"Name: {agent.name}")
print(f"Description: {agent.description}")
print(f"MCP: {agent.mcpEndpoint}")

Difference between loadAgent() and getAgent():

  • sdk.loadAgent(agentId) - Returns an Agent object that can be modified and re-registered (loads registration file from IPFS/HTTP)
  • sdk.getAgent(agentId) - Returns an AgentSummary object with read-only data (queries subgraph for fast access)

All agent data can be accessed directly:

# Identity
agent.agentId # "11155111:123"
agent.agentURI # "ipfs://Qm..."
agent.name # "My Agent"
agent.description # "Description text"
agent.image # "https://..."
# Status
agent.active # True/False
agent.x402support # True/False
# Wallet
agent.walletAddress # "0x..."
agent.walletChainId # 11155111
# Endpoints (convenience properties)
agent.mcpEndpoint # "https://..."
agent.a2aEndpoint # "https://..."
agent.ensEndpoint # "myagent.eth"
# Capabilities (populated from endpoints)
agent.mcpTools # ["tool1", "tool2", ...]
agent.mcpPrompts # ["prompt1", "prompt2", ...]
agent.mcpResources # ["resource1", ...]
agent.a2aSkills # ["skill1", "skill2", ...]
# Lists (read-only)
agent.endpoints # List[Endpoint]
agent.trustModels # List[TrustModel]
agent.metadata # Dict[str, Any]
agent.owners # List[str]
agent.operators # List[str]
agent.updatedAt # Unix timestamp
# Create agent
agent = sdk.createAgent(
name="My AI Agent",
description="A powerful AI assistant",
image="https://example.com/agent.png"
)
# Set endpoints
agent.setMCP("https://mcp.example.com/")
agent.setA2A("https://a2a.example.com/agent.json")
agent.setENS("myagent.eth")
# Configure wallet
agent.setAgentWallet("0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb", chainId=1)
# Set trust models
agent.setTrust(reputation=True, cryptoEconomic=True)
# Add OASF skills and domains
agent.addSkill("data_engineering/data_transformation_pipeline", validate_oasf=True)\
.addDomain("technology/data_science", validate_oasf=True)
# Add metadata
agent.setMetadata({
"version": "1.0.0",
"language": "python",
"framework": "agent0"
})
# Set status flags
agent.setActive(True)
agent.setX402Support(False)
# Now ready to register!
print(f"Agent configured: {agent.name}")