tascan-local-agent
v1.0.0
Published
TaScan AI Agent — Local Claude Code executor. Patent 2: Closed-Loop Autonomous Operations.
Maintainers
Readme
TaScan Local Agent
Run Claude Code on your machine. Trigger tasks from anywhere.
Drop a task into the TaScan AI Inbox — from your phone, the MCP server, the API, or the cloud agent — and this local agent picks it up, spawns Claude Code, does real filesystem work, and marks it complete. You get an email. Task. Scan. Done.
Part of the TaScan Protocol — the universal task infrastructure platform built by Love Technologies. 10 patents filed, 265 claims.
What It Does
The TaScan Local Agent is the on-machine half of Patent 2: Closed-Loop Autonomous Operations Protocol. It bridges the gap between cloud-triggered tasks and local execution — the thing that actually needs your filesystem, your codebase, your installed tools.
The loop:
- Agent subscribes to Supabase Realtime on the AI Inbox task list
- A new task arrives (from mobile, API, MCP, cloud agent — anywhere)
- Agent spawns
claude -pwith the task as the prompt - Claude Code reads files, edits code, runs commands, deploys — real work
- Output is captured and saved as a task completion record in Supabase
- Admin receives email notification via SendGrid
- Every execution is logged to a daily tracking list (data flywheel)
A fallback polling loop (every 30 seconds by default) catches anything Realtime missed.
Task Routing
Tasks are routed by prefix in the title:
| Prefix | Handled By |
|--------|-----------|
| CODE: | Local agent (Claude Code) |
| SHELL: | Local agent (Claude Code) |
| PLAN: | Local agent (Claude Code) |
| (no prefix) | Local agent (Claude Code) |
| RESEARCH: | Cloud agent (agent-execute.js) |
| WRITE: | Cloud agent (agent-execute.js) |
| REVIEW: | Cloud agent (agent-execute.js) |
| MCP: | Cloud agent (agent-execute.js) |
Both agents watch the same inbox. The local agent claims CODE/SHELL/PLAN tasks first if it is running. Cloud handles everything else instantly.
Safety
Blocked keywords (task is rejected, not executed):
drop tablerm -rfformat c:truncateshutdownrebootprivate key
Dry run mode executes zero real commands — use it to verify wiring before going live.
Setup
Prerequisites
- Node.js >= 18
- Claude Code CLI (
claude) installed and authenticated - A TaScan account with an AI Inbox task list
Install
npm install -g tascan-local-agentOr run from a local clone:
git clone https://github.com/mikelove2nd/tascan-agent
cd tascan-agent
npm installEnvironment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| SUPABASE_SERVICE_KEY | Yes | Supabase service role key (not the anon key) |
| SUPABASE_URL | No | Defaults to the TaScan Supabase instance |
| AI_INBOX_ID | No | UUID of your AI Inbox task list |
| CLAUDE_WORKER_ID | No | UUID of the Claude worker record in Supabase |
| WORKING_DIR | No | Directory for Claude Code to work in (defaults to parent of agent dir) |
| DRY_RUN | No | Set to true to log tasks without executing |
| CLAUDE_TIMEOUT | No | Max ms to wait for Claude Code (default: 300000 = 5 min) |
| POLL_INTERVAL | No | Fallback poll interval in ms (default: 30000 = 30 sec) |
Run
export SUPABASE_SERVICE_KEY="eyJ..."
npm startDry run (no real execution):
npm run dryOr if installed globally:
SUPABASE_SERVICE_KEY="eyJ..." tascan-agentHow It Integrates
The local agent is one piece of the TaScan closed-loop architecture:
Mobile / API / MCP / Claude Desktop
|
v
TaScan AI Inbox (Supabase)
|
+----|----+
| |
v v
Local Agent Cloud Agent
(CODE/SHELL) (RESEARCH/WRITE)
| |
v v
Claude Claude API
Code (Haiku/Sonnet)
| |
+----+----+
|
v
task_completions (Supabase)
|
v
Email notification (SendGrid)The MCP server (tascan-mcp) can dispatch tasks to the AI Inbox directly. Any MCP-connected client — Claude Desktop, Cursor, your own tool — can trigger local code execution on your machine with a single tool call.
Patent 2: Closed-Loop Autonomous Operations Protocol
This package is a reference implementation of Patent 2. The core claim: a system where tasks originating from any channel (human, API, AI agent) are routed to the appropriate execution environment, executed autonomously, and fed back into a structured completion and audit record — creating a closed loop between intent and action.
The data flywheel: every execution creates a log entry. Every log entry trains the routing logic. The system gets better the more it runs.
Part of the TaScan Ecosystem
- TaScan App: https://app.tascan.io
- MCP Server:
npm install -g tascan-mcp(32 tools, OAuth 2.0, remote endpoint) - The Council (LLM Arena): https://llm-arena-love.netlify.app — 9 AI models deliberating in real time
- Patents: 10 provisional patents filed, 265 claims (Patents 1-10, filed 2026)
Author
Michael Edward Love II Founder, Love Technologies / TaScan Protocol [email protected] | https://tascan.io
License
MIT
