Skip to main content

Create Your First Agent

This guide walks you through creating and configuring your first AI agent in Conto.

What is an Agent?

An agent in Conto represents your AI system that will make payments. This could be:
  • An OpenAI Assistant
  • A Claude-based agent
  • A LangChain agent
  • An AutoGPT instance
  • Any custom AI system

Creating an Agent

Via Dashboard

1

Navigate to Agents

Go to Agents in the sidebar and click New Agent.
2

Fill in Details

FieldDescriptionExample
NameHuman-readable nameCustomer Support Agent
TypeAgent frameworkOPENAI_ASSISTANT
DescriptionWhat the agent doesHandles customer inquiries
External IDFramework-specific IDasst_abc123 (OpenAI)
3

Create Agent

Click Create Agent. The agent will be created in ACTIVE status.

Via API

curl -X POST https://conto.finance/api/agents \
  -H "Authorization: Bearer $CONTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Customer Support Agent",
    "agentType": "OPENAI_ASSISTANT",
    "description": "Handles customer inquiries and payments",
    "externalId": "asst_abc123"
  }'

Agent Types

TypeDescription
OPENAI_ASSISTANTOpenAI Assistants API
ANTHROPIC_CLAUDEClaude via API
LANGCHAINLangChain agents
AUTOGPTAutoGPT instances
CUSTOMAny other agent framework

Agent Status

Agents can have the following statuses:

ACTIVE

Agent can make transactions. This is the default status.

PAUSED

Temporarily disabled. Use for maintenance or investigation.

SUSPENDED

Suspended by admin. Requires manual review to reactivate.

REVOKED

Permanently disabled. Cannot be reactivated.

Generating SDK Keys

After creating an agent, generate an SDK key for authentication:
1

Open Agent Details

Click on your agent to open the detail page.
2

Go to SDK Keys

Click the SDK Keys tab.
3

Generate Key

Click Generate New Key and enter a name (e.g., “Production Key”).
4

Save the Key

Copy and save the key immediately! It will only be shown once.
The key format is: conto_agent_[64-character-hex]

Key Management Best Practices

Never hardcode API keys in your code:
const conto = new Conto({
  apiKey: process.env.CONTO_API_KEY
});
Generate new keys periodically and revoke old ones. Set expiration dates when creating keys.
Use different keys for development, staging, and production:
  • dev-key - For local development
  • staging-key - For staging environment
  • production-key - For production
Check the SDK Keys tab to see usage statistics:
  • Usage count
  • Last used timestamp
  • Expiration date

Linking Wallets

An agent needs at least one linked wallet to make payments.
1

Go to Agent Details

Open your agent’s detail page.
2

Click Assign Wallet

In the Wallets section, click Assign Wallet.
3

Select Wallet

Choose a wallet to link. You must have already created a wallet.
4

Configure Limits

Set spending limits for this agent-wallet combination:
{
  "spendLimitPerTx": 100,
  "spendLimitDaily": 1000,
  "spendLimitWeekly": 5000,
  "spendLimitMonthly": 15000
}
5

Set Time Windows (Optional)

Restrict when the agent can make transactions:
{
  "allowedHoursStart": 9,
  "allowedHoursEnd": 17,
  "allowedDays": ["Mon", "Tue", "Wed", "Thu", "Fri"]
}

Assigning Policies

Add policies to control agent spending behavior:
1

Go to Agent Details

Open your agent’s detail page.
2

Click Assign Policy

In the Policies section, click Assign Policy.
3

Select Policies

Choose one or more policies to apply. Policies are evaluated in priority order.

Testing Your Agent

Once configured, test your agent:
import { Conto } from '@conto/sdk';

const conto = new Conto({
  apiKey: process.env.CONTO_API_KEY
});

// Test payment request (without executing)
const request = await conto.payments.request({
  amount: 10.00,
  recipientAddress: '0x...',
  purpose: 'Test payment'
});

console.log('Status:', request.status);
console.log('Reasons:', request.reasons);

if (request.status === 'APPROVED') {
  console.log('Agent is ready to make payments!');
  console.log('Wallet:', request.wallet.address);
  console.log('Available balance:', request.wallet.availableBalance);
}

Monitoring Agent Activity

Track your agent’s activity in the dashboard:
  • Transactions - View all payments made by the agent
  • Analytics - See spending trends and patterns
  • Audit Logs - Full audit trail of all actions
  • Alerts - Get notified of unusual activity

Next Steps