Basic Usage
Getting Started with Axicov SDK
The Axicov SDK allows you to create, customize, and interact with AI agents programmatically. This guide will help you install the SDK, set up your environment, and create your first agent with custom tools.
Installation
Install the Axicov SDK using npm:
Or using yarn:
Prerequisites
The SDK requires:
Node.js 16 or higher
API keys for one of the supported AI models (Anthropic or Google Gemini)
MongoDB (optional, for persistent state)
Environment Setup
Create a .env
file in your project root with the following variables:
Basic Usage
Here's a simple example to create and interact with an agent:
Key Features
Agent Management
The Agent class is the core of the SDK, allowing you to:
Create AI agents with customizable parameters
Initialize them with specific tools
Send and receive messages
Maintain conversation state
Tool Registry System
Every agent can be equipped with tools that extend its capabilities:
Core tools: Essential functionality for all agents
Custom tools: Specialized capabilities for specific use cases
Tool selection: Choose which tools to include by index
Parameter Management
The Agent class uses two different parameter objects:
params
: For persistent configuration data that should be stored in a databaseSet during agent creation
Includes name, instructions, wallet addresses, etc.
Can be accessed and modified by tools when changes need to persist
runtimeParams
: For temporary data generated during executionSet during runtime, often by tools
Contains session-specific information
Used to share data between tool calls within a session
Thread Management
Each conversation with an agent has its own thread context:
threadId
: Unique identifier for the conversationThread context utilities: Help manage state within a thread
Support for both in-memory and MongoDB-based persistence
Next Steps
Learn how to Create Custom Tools
Explore the Tool Registry System
Understand Thread Management
See our API Reference for detailed documentation
Last updated