Registry / productivity / tasks-sqlite

tasks-sqlite

JSON →
library1.0.4jsnpmunverified

A streaming AI agent for project and task management, powered by Mimic synthetic data and the Vercel AI SDK, using SQLite as a file-based database without Docker or external databases. Version 1.0.4 is the current stable release. Key differentiators: no Docker required, file-based SQLite, streaming responses via AI SDK Message Stream protocol, synthetic data generation with Mimic, and a minimal Next.js chat UI. Designed for local development and testing, with a quick setup and multi-turn conversation support.

npm install tasks-sqlite
INSTALL
IMPORT
SIG · TASKS-SQLITE
T
tasks-sqlite
productivityjavascriptv1.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

useChat
import { useChat } from '@ai-sdk/react'
import { useChat } from 'ai/react'
In newer versions of Vercel AI SDK, useChat moved from 'ai/react' to '@ai-sdk/react'. Using the old path will fail.
streamText
import { streamText } from 'ai'
import { StreamText } from 'ai'
streamText is a named export, not a default export.
Database (better-sqlite3)
import Database from 'better-sqlite3'
const { Database } = require('better-sqlite3')
better-sqlite3 exports a default function, not a named export. Use default import.

Complete setup to install dependencies, create database, generate synthetic data, start agent, and test with curl.

// Step 1: Install dependencies (run in project root) npm install // Step 2: Create and seed the database // Run ./init-db.sh (creates tasks.db) // Then: npx mimic run && npx mimic seed --verbose // Step 3: Set environment variables // Create .env file: ANTHROPIC_API_KEY=sk-ant-... // Then: export $(cat .env | xargs) // Step 4: Start the agent cd agent npm install npm start // Step 5: Test with curl curl -X POST http://localhost:3002/chat \ -H "Content-Type: application/json" \ -d '{"messages": [{"role": "user", "content": "What projects are active?"}]}'
Debug
Known issues
breakingRequires Node.js >= 22. Older versions will fail to run the agent.
fix
Upgrade Node.js to version 22 or later.
affects: >=1.0.0
deprecatedThe useChat hook import path changed in AI SDK v3 from 'ai/react' to '@ai-sdk/react'.
fix
Use import { useChat } from '@ai-sdk/react' instead of 'ai/react'.
affects: >=3.0.0
gotchaThe init-db.sh script must be run from the root directory. Running from a different directory will fail to create the database correctly.
fix
Ensure you are in the project root when running ./init-db.sh.
affects: >=1.0.0
gotchaThe agent requires an Anthropic API key. Using a different LLM provider (e.g., OpenAI) is not supported out-of-the-box.
fix
Set ANTHROPIC_API_KEY environment variable with a valid Anthropic API key.
affects: >=1.0.0
gotchaThe UI and agent run on separate ports (3000 and 3002). Starting only one will result in connection errors.
fix
Keep both the agent (npm start in agent/) and the UI (npm run dev in ui/) running simultaneously.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'ai'
The ai package is not installed in the agent or UI directory.
fix
Run npm install in both the agent/ and ui/ directories.
sqlite3: command not found
The sqlite3 CLI is not installed on the system.
fix
Install sqlite3: on macOS it's pre-installed; on Debian/Ubuntu run 'apt install sqlite3'.
Error: Unexpected token '.'
Running with Node.js version older than 22 which does not support newer JavaScript syntax.
fix
Upgrade Node.js to version 22 or later.
TypeError: (0 , ai_react.useChat) is not a function
Importing useChat from 'ai/react' instead of '@ai-sdk/react' in newer AI SDK versions.
fix
Change import to: import { useChat } from '@ai-sdk/react'.
Upgrade
Version history
1.0.4latest on npm
Audit
Dependencies
@mimicai/clirequiredUsed for generating synthetic data and seeding the database.
better-sqlite3requiredSQLite driver for Node.js to interact with the database.
airequiredVercel AI SDK for streaming responses and model integration.
@ai-sdk/reactoptionalProvides the useChat hook for the Next.js UI.
nextoptionalFramework for the chat UI.
Agent activity
31 hits · last 30 days
node
28
OpenAI (training)
1
Resources
tasks-sqlite — npm install tasks-sqlite · libregistry