{"_id":"@aspct3434/agent-ai","_rev":"7-0edf2c56bb322204ba62468b9433c6ce","name":"@aspct3434/agent-ai","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@aspct3434/agent-ai","version":"0.1.0","keywords":["agent","installer","onboarding","cli"],"license":"MIT","_id":"@aspct3434/agent-ai@0.1.0","maintainers":[{"name":"aspct3434","email":"Kareem.i.souda@gmail.com"}],"homepage":"https://github.com/Aspct3434/agent-ai#readme","bugs":{"url":"https://github.com/Aspct3434/agent-ai/issues"},"bin":{"agent-ai":"bin/agent-ai.js"},"dist":{"shasum":"d64164349c39512c857ffa63f87c95009a358f18","tarball":"https://registry.npmjs.org/@aspct3434/agent-ai/-/agent-ai-0.1.0.tgz","fileCount":4,"integrity":"sha512-TUvdPJSMFSPqFYfVcLwStWPe+QurGvxoBmh2SbsJTTXFiVKVL4RycwAK5KMfua0YjtNz9bFhi9OvBBJHw4VH1A==","signatures":[{"sig":"MEYCIQCjN8Jl/pxrv5Dy+aTloEukkRodWA5fb1qI/uyeuCbm8QIhALL6kSKIxotrxvWsp2yhkVoT3zmcx8X5Dz6KejWljrYW","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":45786},"engines":{"node":">=18"},"gitHead":"ab94549644832f43af681abeadb86da59398decd","scripts":{"test":"node tests/installer-cli.test.js","pack:dry-run":"npm pack --dry-run"},"_npmUser":{"name":"aspct3434","email":"Kareem.i.souda@gmail.com"},"repository":{"url":"git+https://github.com/Aspct3434/agent-ai.git","type":"git"},"_npmVersion":"10.9.2","description":"OpenClaw-style onboarding installer and lifecycle CLI for Agent AI.","directories":{},"_nodeVersion":"22.17.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/agent-ai_0.1.0_1779643642112_0.7977177868744836","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package has been renamed to @aspct3434/distill-agent"},"0.1.3":{"name":"@aspct3434/agent-ai","version":"0.1.3","keywords":["agent","installer","onboarding","cli"],"license":"MIT","_id":"@aspct3434/agent-ai@0.1.3","maintainers":[{"name":"aspct3434","email":"Kareem.i.souda@gmail.com"}],"homepage":"https://github.com/Aspct3434/agent-ai#readme","bugs":{"url":"https://github.com/Aspct3434/agent-ai/issues"},"bin":{"agent-ai":"bin/agent-ai.js"},"dist":{"shasum":"77f0478f9f2898ea9517be956be2faac87cf409d","tarball":"https://registry.npmjs.org/@aspct3434/agent-ai/-/agent-ai-0.1.3.tgz","fileCount":4,"integrity":"sha512-WPhaJrPy/TBnsLARkjRKb9d/ooszEVptZfTw8jm1xgb2oKPNFrw/Yb2m1SLZ/tKugPglbgT1eTeS2vLcqPoN3w==","signatures":[{"sig":"MEQCIALlqacyq8i6mMPNIQVtLfIZ3CdEdEiF2ZeS2H0/9jr4AiBWDvtO4Ip5VTvEjAKrw6dUepTscnc0l7r27XnVATxD6w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48648},"engines":{"node":">=18"},"gitHead":"70590301b1774b1b0b81aa32e35e5a76ee3459b7","scripts":{"test":"node tests/installer-cli.test.js","pack:dry-run":"npm pack --dry-run"},"_npmUser":{"name":"aspct3434","email":"Kareem.i.souda@gmail.com"},"repository":{"url":"git+https://github.com/Aspct3434/agent-ai.git","type":"git"},"_npmVersion":"10.9.2","description":"OpenClaw-style onboarding installer and lifecycle CLI for Agent AI.","directories":{},"_nodeVersion":"22.17.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/agent-ai_0.1.3_1779647421180_0.765821349397475","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package has been renamed to @aspct3434/distill-agent"},"0.1.4":{"name":"@aspct3434/agent-ai","version":"0.1.4","keywords":["agent","installer","onboarding","cli"],"license":"MIT","_id":"@aspct3434/agent-ai@0.1.4","maintainers":[{"name":"aspct3434","email":"Kareem.i.souda@gmail.com"}],"homepage":"https://github.com/Aspct3434/agent-ai#readme","bugs":{"url":"https://github.com/Aspct3434/agent-ai/issues"},"bin":{"agent-ai":"bin/agent-ai.js"},"dist":{"shasum":"7939614a9908ab836a6e510ac164919f4ddfe857","tarball":"https://registry.npmjs.org/@aspct3434/agent-ai/-/agent-ai-0.1.4.tgz","fileCount":4,"integrity":"sha512-5ushBtjnge5gOhuGRuz/iyZZQ3CFjcCMWraBCXXxJW27mVjAryjiy/DiPfjMlZRWmDucyHBPEp0X4Km9R8toLA==","signatures":[{"sig":"MEUCIHk5AcSM+2gw88nJWCZVMwagmDcVJQEUSD4Yi33TpsXvAiEAm+OernT+ru7tZ+DrbvMjKSSIqeJbrmYcxoYcfKqkhIs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48648},"engines":{"node":">=18"},"gitHead":"6c21f7df42e04d274c78e8b1c517041af7d0a834","scripts":{"test":"node tests/installer-cli.test.js","pack:dry-run":"npm pack --dry-run"},"_npmUser":{"name":"aspct3434","email":"Kareem.i.souda@gmail.com"},"repository":{"url":"git+https://github.com/Aspct3434/agent-ai.git","type":"git"},"_npmVersion":"10.9.2","description":"OpenClaw-style onboarding installer and lifecycle CLI for Agent AI.","directories":{},"_nodeVersion":"22.17.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/agent-ai_0.1.4_1779647714324_0.9163080474241725","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package has been renamed to @aspct3434/distill-agent"},"0.1.5":{"name":"@aspct3434/agent-ai","version":"0.1.5","keywords":["agent","installer","onboarding","cli"],"license":"MIT","_id":"@aspct3434/agent-ai@0.1.5","maintainers":[{"name":"aspct3434","email":"Kareem.i.souda@gmail.com"}],"homepage":"https://github.com/Aspct3434/agent-ai#readme","bugs":{"url":"https://github.com/Aspct3434/agent-ai/issues"},"bin":{"agent-ai":"bin/agent-ai.js"},"dist":{"shasum":"599310ec0ecc3e924019bcf50ca3016d1dc8671e","tarball":"https://registry.npmjs.org/@aspct3434/agent-ai/-/agent-ai-0.1.5.tgz","fileCount":4,"integrity":"sha512-8PKzjbd7BmOkYbiY4WXTcoiqZ4zlH5UCicsNZAK3ULUlUytDLX4c0QakASqKrUTt0mSHV9KzbgGymtKXGFYP1g==","signatures":[{"sig":"MEQCIDBQOd8t2uizpH8ortEjm92WhMVsa1DfkOua/atnMb0bAiB5/oeosa7YPI3BjRdMxzLFpG2oLMARl757dqz7eHTjig==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":52749},"engines":{"node":">=18"},"gitHead":"a8d902e673759302ff267eefdadb8d92eff3fe29","scripts":{"test":"node tests/installer-cli.test.js","pack:dry-run":"npm pack --dry-run"},"_npmUser":{"name":"aspct3434","email":"Kareem.i.souda@gmail.com"},"repository":{"url":"git+https://github.com/Aspct3434/agent-ai.git","type":"git"},"_npmVersion":"10.9.2","description":"OpenClaw-style onboarding installer and lifecycle CLI for Agent AI.","directories":{},"_nodeVersion":"22.17.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/agent-ai_0.1.5_1779653656913_0.6933862185540458","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package has been renamed to @aspct3434/distill-agent"},"0.1.6":{"name":"@aspct3434/agent-ai","version":"0.1.6","keywords":["agent","installer","onboarding","cli"],"license":"MIT","_id":"@aspct3434/agent-ai@0.1.6","maintainers":[{"name":"aspct3434","email":"Kareem.i.souda@gmail.com"}],"homepage":"https://github.com/Aspct3434/agent-ai#readme","bugs":{"url":"https://github.com/Aspct3434/agent-ai/issues"},"bin":{"agent-ai":"bin/agent-ai.js"},"dist":{"shasum":"9fe1b3eb46308189913d7f5174b162fe31cd5561","tarball":"https://registry.npmjs.org/@aspct3434/agent-ai/-/agent-ai-0.1.6.tgz","fileCount":4,"integrity":"sha512-VF7lH0bbTeU74651JWXoXSkxNZfUlM8PxJI/tUUqkOa/bw5YsBt0ZS0LmZ/7bcTo702ZLLQLhi499qY+4ZymJw==","signatures":[{"sig":"MEYCIQDQ3KR1Y2COZBpLB3gcFXR6DZNqHyYq4WTRoLsqktJn3QIhAPPgUEw18CMsl2849LSHxzi4aGhOgxj2C7Sva3sGZK6T","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55436},"engines":{"node":">=18"},"gitHead":"ed952c869458a8da76713ca4f209a551a16f7b7f","scripts":{"test":"node tests/installer-cli.test.js","pack:dry-run":"npm pack --dry-run"},"_npmUser":{"name":"aspct3434","email":"Kareem.i.souda@gmail.com"},"repository":{"url":"git+https://github.com/Aspct3434/agent-ai.git","type":"git"},"_npmVersion":"10.9.2","description":"OpenClaw-style onboarding installer and lifecycle CLI for Agent AI.","directories":{},"_nodeVersion":"22.17.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/agent-ai_0.1.6_1779719378023_0.03892014991101456","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package has been renamed to @aspct3434/distill-agent"},"0.2.0":{"name":"@aspct3434/agent-ai","version":"0.2.0","keywords":["distill","agent","ai","autonomous-agents","llm","react-agent","mcp","skill-distillation","installer","cli"],"license":"MIT","_id":"@aspct3434/agent-ai@0.2.0","maintainers":[{"name":"aspct3434","email":"Kareem.i.souda@gmail.com"}],"homepage":"https://github.com/Aspct3434/agent-ai#readme","bugs":{"url":"https://github.com/Aspct3434/agent-ai/issues"},"bin":{"distill":"bin/agent-ai.js","agent-ai":"bin/agent-ai.js"},"dist":{"shasum":"ebb002a93bde7f72177fc27f44fe9f7b91aac287","tarball":"https://registry.npmjs.org/@aspct3434/agent-ai/-/agent-ai-0.2.0.tgz","fileCount":4,"integrity":"sha512-9IPiCZHfGPKta5kZaYS4rG+UyiYNldot+5Ww11q+bxW2elZnbmzQMRjq8B9hCf1AuXMp0N4TEkf5eOfIC2tSzg==","signatures":[{"sig":"MEUCIFRoXqrPE4qiRd3wiAAKKCGsc6NnMO1b/bzHBdRqchjEAiEAndhA06GG/t6BZYEskX7IVr9nUlxxvPLLdsbVeEMB6FY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69740},"engines":{"node":">=18"},"gitHead":"20dce18c9c1e6093b997a7db00540aaed2f2c08b","scripts":{"test":"node tests/installer-cli.test.js","pack:dry-run":"npm pack --dry-run"},"_npmUser":{"name":"aspct3434","email":"Kareem.i.souda@gmail.com"},"repository":{"url":"git+https://github.com/Aspct3434/agent-ai.git","type":"git"},"_npmVersion":"10.9.2","description":"Distill — interactive installer and lifecycle CLI for the Distill autonomous agent framework.","directories":{},"_nodeVersion":"22.17.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/agent-ai_0.2.0_1779886506205_0.12333534930389778","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package has been renamed to @aspct3434/distill-agent"}},"time":{"created":"2026-05-24T17:27:21.876Z","modified":"2026-05-27T12:57:19.127Z","0.1.0":"2026-05-24T17:27:22.268Z","0.1.3":"2026-05-24T18:30:21.318Z","0.1.4":"2026-05-24T18:35:14.463Z","0.1.5":"2026-05-24T20:14:17.070Z","0.1.6":"2026-05-25T14:29:38.165Z","0.2.0":"2026-05-27T12:55:06.337Z"},"bugs":{"url":"https://github.com/Aspct3434/agent-ai/issues"},"license":"MIT","homepage":"https://github.com/Aspct3434/agent-ai#readme","keywords":["distill","agent","ai","autonomous-agents","llm","react-agent","mcp","skill-distillation","installer","cli"],"repository":{"url":"git+https://github.com/Aspct3434/agent-ai.git","type":"git"},"description":"Distill — interactive installer and lifecycle CLI for the Distill autonomous agent framework.","maintainers":[{"name":"aspct3434","email":"Kareem.i.souda@gmail.com"}],"readme":"# Distill\n\nA production-grade ReAct agent built for reliability. Features **task-contract execution** to prevent hallucination, **skill distillation** to evolve its own tools, **hybrid memory**, and a real-time streaming control panel.\n\n## Architecture\n\n```mermaid\ngraph TD\n    %% External Interfaces\n    UI[Control Panel UI <br/>React + Tailwind]\n    Adapters[Messaging Adapters <br/>Telegram, Discord, Slack, Email]\n    TUI[Terminal UI]\n\n    %% Gateway & Concurrency\n    subgraph Gateway Layer\n        API[FastAPI Gateway]\n        WS[WebSocket Stream]\n        Queue[Session FIFO Queue]\n        \n        API --- WS\n        WS --> Queue\n    end\n\n    UI --> API\n    Adapters --> API\n    TUI --> WS\n\n    %% Core Agent Engine\n    subgraph Core Agent Engine\n        Agent[Agent Engine <br/>ReAct Loop]\n        Contract[Task Contract System <br/>Evidence Gating]\n        Plan[Plan Management <br/>Action Ledger]\n        Eval[Skill Distiller <br/>Evaluator]\n        \n        Agent <--> Contract\n        Agent <--> Plan\n        Agent --> Eval\n    end\n\n    Queue --> Agent\n\n    %% State & Memory\n    subgraph State & Memory\n        Checkpoint[(SQLite Checkpointer <br/>State & History)]\n        Chroma[(ChromaDB <br/>Semantic Memory)]\n        Neo4j[(Neo4j <br/>Graph Memory)]\n        \n        Agent <--> Checkpoint\n        Agent <--> Chroma\n        Agent <--> Neo4j\n    end\n\n    %% External Services\n    LLM((LLM Provider <br/>LiteLLM))\n    Agent <--> LLM\n\n    %% Tooling & Execution\n    subgraph Tooling & Execution Sandbox\n        Tools[Tool Manager]\n        MCP[MCP Servers]\n        Sandbox[Terminal Sandbox <br/>Docker / Host / Serverless]\n        Skills[Evolved Skills <br/>Auto-Maker]\n        \n        Agent --> Tools\n        Tools --> MCP\n        Tools --> Sandbox\n        Tools --> Skills\n        Eval -.->|Synthesizes & Validates| Skills\n    end\n```\n\n### Directory Structure\n\n```text\nsrc/\n  agent.py          -- ReAct loop, session management, checkpointing\n  contract.py       -- Task-contract system (evidence tracking)\n  evaluator.py      -- Skill distiller: trajectory -> reusable MCP skill\n  memory.py         -- HybridMemory: ChromaDB (semantic) + Neo4j (graph)\n  gateway.py        -- FastAPI app, WebSocket stream, session-per-FIFO-lane\n  tools.py          -- MCP servers, terminal, file, process, port tools\ncontrol-panel/      -- React + Tailwind chat UI with live token streaming\n```\n\n## 🌟 Key Features\n\n* **Task-Contract Execution**: The agent must declare the required execution evidence (files created, services running) before starting a task. The final response is gated on this physical evidence, eliminating \"I'll do it now\" hallucinations.\n* **Skill Distillation**: After a successful complex task, an LLM evaluates the trajectory and synthesizes a parameterized Python tool. New skills are versioned, validated, and automatically rolled back if their success rate drops.\n* **Session-per-FIFO-Lane Concurrency**: Every user session gets a dedicated queue and worker task, allowing high concurrency with strict message ordering.\n* **Hybrid Memory**: Combines SQLite full-text search, ChromaDB semantic embeddings, and Neo4j graph relationships to recall cross-session context.\n* **Universal Sandboxing**: Run shell operations locally, in Docker, or via serverless platforms (Daytona, E2B, Modal).\n* **Shareable Skills**: Export and import distilled skills via the open `SKILL.md` format.\n\n## 🚀 Quick Start\n\nThe fastest way to run Distill locally is using Docker Compose:\n\n```bash\n# 1. Copy the environment template\ncp an-api.env.example an-api.env\n\n# 2. Add your LLM API Key to an-api.env (e.g., MOONSHOT_API_KEY or OPENAI_API_KEY)\n# By default, Distill uses LiteLLM and supports OpenAI, Anthropic, Gemini, Ollama, etc.\n\n# 3. Start the application\ndocker compose up -d --build\n```\n\n* **Control Panel (UI)**: `http://localhost:5173`\n* **API / Docs**: `http://localhost:8000/docs`\n\n### CLI Installation\n\nYou can also install Distill globally using `npm` to get the robust interactive CLI installer:\n\n```powershell\nnpx @aspct3434/agent-ai install\n```\n*(Note: npm package currently retains the legacy `agent-ai` name)*\n\nAfter installation, use the CLI to manage the agent:\n```bash\nnpx @aspct3434/agent-ai start    # Start the backend and control panel\nnpx @aspct3434/agent-ai logs     # View running logs\nnpx @aspct3434/agent-ai update   # Pull the latest changes\n```\n\n## ⚙️ Configuration\n\nDistill is highly configurable via environment variables. Key settings in `an-api.env`:\n\n| Variable | Default | Description |\n|---|---|---|\n| `AGENT_MODEL` | `moonshot/kimi-k2.5` | The primary LLM to use (supports any LiteLLM provider string). |\n| `AGENT_SANDBOX` | (blank) | Leave blank for Docker Compose. Set to `docker` to run Docker-in-Docker, or `http` for serverless. |\n| `AGENT_REQUIRE_APPROVAL`| `off` | Set to `risky` or `all` to require human-in-the-loop approval before executing shell commands. |\n| `AGENT_API_TOKEN` | (blank) | Secure the API/WebSockets with a Bearer token. |\n\n## 🔌 Integrations & Adapters\n\nDistill can operate directly in your favorite platforms. Adapters are disabled by default and activate when you provide a bot token in `an-api.env`:\n* **Telegram**: Set `TELEGRAM_BOT_TOKEN`. Supports voice note transcriptions via Whisper.\n* **Discord**: Set `DISCORD_BOT_TOKEN`.\n* **Slack**: Set `SLACK_BOT_TOKEN` & `SLACK_APP_TOKEN` (Socket Mode).\n* **Email**: Set `EMAIL_ADDRESS`, `EMAIL_PASSWORD`, `EMAIL_IMAP_HOST`, `EMAIL_SMTP_HOST`.\n\nEach channel provides a live typing indicator, streams real-time tool execution logs, and isolates conversations.\n\n## 🧪 Testing\n\nDistill maintains a robust test suite covering contracts, planners, adapters, and the ReAct loop:\n\n```bash\npytest                        # Run the full suite\npytest tests/test_task_contract_loop.py -v   # Test the anti-hallucination contract system\n```\n","readmeFilename":"README.md"}