
Snak
@kasarlabs
Build powerful and secure AI Agents powered by Starknet.
Overview
What is Snak?
An Agent Engine for creating powerful and secure AI Agents powered by Starknet, available as both an NPM package and a ready-to-use backend. It integrates with Starknet wallet (Argent X) and AI providers (Anthropic, OpenAI, Google Gemini, Ollama, DeepSeek). Designed for developers building autonomous or interactive agents on Starknet.
How to use Snak?
Clone the repository, install dependencies with pnpm, copy .env.example to .env and fill in Starknet credentials and AI API keys. Optionally configure AI models and agent settings in JSON files under config/. Run in prompt mode with pnpm run start or server mode with pnpm run start:server, optionally specifying custom agent and model configurations. Alternatively, install the @snakagent package and instantiate SnakAgent programmatically.
Key features of Snak
- Supports multiple AI providers (OpenAI, Anthropic, Google Gemini, Ollama).
- Customizable agent configuration with lore, objectives, knowledge, and plugins.
- Two operating modes: interactive and autonomous.
- Built-in short‑term memory and optional LangSmith tracing.
- Integrates with MCP servers for extended functionality.
- Available as both CLI/server and programmable NPM package.
Use cases of Snak
- Build autonomous DeFi agents that execute transactions on Starknet.
- Create interactive AI assistants for wallet queries (e.g., “What’s my ETH balance?”).
- Develop automated trading bots with custom strategies and memory.
- Deploy scalable agent backends with PostgreSQL persistence and server API.
FAQ from Snak
What prerequisites do I need?
A Starknet wallet (e.g., Argent X), an AI provider API key (or Ollama for local models), Docker and Docker compose, Node.js, and pnpm installed.
How can I switch between interactive and autonomous mode?
Set the mode field in your agent configuration file to "interactive" or "autonomous". Both modes are supported in prompt and server runs.
Can I use my own AI model?
Yes. Edit config/models/default.models.json or create a new model config file, specifying provider and model name. The agent loads the corresponding API key from the .env file.
Where is agent data stored?
Agent memory and chat history are persisted in a PostgreSQL database (configured via POSTGRES_* env vars). Optional LangSmith tracing sends logs to LangSmith.
How do I add new actions/plugins to an agent?
Follow the step‑by‑step guide at docs.kasar.io/add-agent-actions. Plugins are listed in the agent config under "plugins".