-
Notifications
You must be signed in to change notification settings - Fork 4
Quick Start Tutorial
Alessio Rocchi edited this page Jan 27, 2026
·
1 revision
Get up and running with aistack in 5 minutes
In this tutorial, you'll:
- Install aistack
- Spawn your first agent
- Store and search memory
- Run a simple task
Time required: ~5 minutes
# Install aistack
npm install @blackms/aistack
# Initialize project
npx @blackms/aistack initCreate .env file:
ANTHROPIC_API_KEY=your_api_key_here# Spawn a coder agent
npx @blackms/aistack agent spawn -t coder -n my-first-coder
# Verify it was created
npx @blackms/aistack agent listExpected output:
Agents (1):
- my-first-coder (coder) - Status: idle
# Store a coding pattern
npx @blackms/aistack memory store \
-k "pattern:singleton" \
-c "Use singleton pattern for config management to ensure single instance"
# Store another pattern
npx @blackms/aistack memory store \
-k "pattern:factory" \
-c "Use factory pattern for creating objects with complex initialization"# Search for patterns
npx @blackms/aistack memory search -q "singleton"Expected output:
Found 1 result(s):
1. pattern:singleton (score: 0.95)
Use singleton pattern for config management to ensure single instance
# Run a simple task
npx @blackms/aistack agent run \
-t coder \
-p "Write a TypeScript function that validates email addresses"The agent will:
- Generate the function
- Add error handling
- Return the complete implementation
# Add aistack to Claude Code MCP
claude mcp add aistack -- npx @blackms/aistack mcp startIn Claude Code, you can now:
# Ask Claude to spawn an agent
Can you spawn a coder agent using the agent_spawn tool?
# Ask Claude to store memory
Store this pattern in memory: "Use dependency injection for testability"
# Ask Claude to search memory
Search memory for "dependency injection"
Here's a complete workflow using the CLI:
# 1. Spawn specialized agents
npx @blackms/aistack agent spawn -t coder -n backend-coder
npx @blackms/aistack agent spawn -t tester -n test-writer
# 2. Store architectural decisions
npx @blackms/aistack memory store \
-k "arch:api-design" \
-c "REST API with versioned endpoints (/api/v1/...)" \
-n "architecture"
# 3. Run code generation task
npx @blackms/aistack agent run \
-t coder \
-p "Create a REST API endpoint for user management" \
--context "@memory:arch:api-design"
# 4. Check system status
npx @blackms/aistack statusStart the visual dashboard:
npx @blackms/aistack web startOpen http://localhost:3001 and:
- View active agents
- Create tasks
- Browse memory
- Monitor system health
import { spawnAgent, getMemoryManager, getConfig } from '@blackms/aistack';
// Spawn an agent
const agent = spawnAgent('coder', {
name: 'my-coder',
metadata: { project: 'myapp' }
});
console.log(`Agent ${agent.name} spawned with ID: ${agent.id}`);
// Store memory
const memory = getMemoryManager(getConfig());
await memory.store('tip:testing', 'Always write tests for edge cases', {
namespace: 'best-practices'
});
// Search memory
const results = await memory.search('testing');
console.log(`Found ${results.count} results`);Now that you have the basics:
- Understanding Agents - How agents work
- Agent Overview - All 11 agent types
- Coder Agent - Deep dive into the coder agent
- Memory System - Persistent storage explained
- Memory Tools - All memory operations
- Code Review Workflow - Multi-agent code review
- Adversarial Testing - Adversarial review loop
- Configuration Guide - All configuration options
- MCP Integration - Claude Code integration
npx @blackms/aistack agent run \
-t documentation \
-p "Generate API documentation for this codebase" \
--context "@file:./src/api.ts"npx @blackms/aistack agent run \
-t tester \
-p "Write unit tests for the authentication module" \
--context "@file:./src/auth.ts"npx @blackms/aistack agent run \
-t reviewer \
-p "Review this pull request for best practices" \
--context "@file:./src/feature.ts"# Start adversarial review loop
npx @blackms/aistack workflow run adversarial-review- Start Simple: Begin with one agent type (coder or researcher)
- Use Memory: Store patterns, decisions, and learnings as you go
- Combine Agents: Use multiple specialized agents for complex tasks
-
Check Status: Use
npx @blackms/aistack statusfrequently -
Read Logs: Enable verbose logging with
-vflag for debugging
# Check system status
npx @blackms/aistack status
# Verify config
cat aistack.config.json# List all memory entries
npx @blackms/aistack memory list
# Check if FTS5 is working
npx @blackms/aistack system health# Verify MCP registration
claude mcp list
# Re-add if needed
claude mcp remove aistack
claude mcp add aistack -- npx @blackms/aistack mcp startContinue with First Agent Tutorial for a deeper, interactive walkthrough.
See Also
Getting Started
Core Concepts
Agent Guides
- Overview
- Coder
- Researcher
- Tester
- Reviewer
- Adversarial
- Architect
- Coordinator
- Analyst
- DevOps
- Documentation
- Security Auditor
MCP Tools
- Overview
- Agent Tools
- Memory Tools
- Task Tools
- Session Tools
- System Tools
- GitHub Tools
- Review Loop Tools
- Identity Tools
Recipes
- Index
- Code Review
- Doc Sync
- Multi-Agent
- Adversarial Testing
- Full-Stack Feature
- Memory Patterns
- GitHub Integration
Advanced
- Plugin Development
- Custom Agent Types
- Workflow Engine
- Vector Search Setup
- Web Dashboard
- Programmatic API
- Resource Monitoring
Reference