{"_id":"@adezdev/adam-agent","_rev":"9-6018e197a74c0ce911bb8ed90448e76a","name":"@adezdev/adam-agent","dist-tags":{"latest":"0.5.9"},"versions":{"0.5.1":{"name":"@adezdev/adam-agent","version":"0.5.1","keywords":["agent","ai","llm","openai","claude","cli","tui"],"author":{"name":"Mario Zechner"},"license":"MIT","_id":"@adezdev/adam-agent@0.5.1","maintainers":[{"name":"adezdev","email":"paredezdev@gmail.com"}],"homepage":"https://github.com/adezdev/adam#readme","bugs":{"url":"https://github.com/adezdev/adam/issues"},"bin":{"adam":"dist/cli.js"},"dist":{"shasum":"36f1abb262c719afefc1bd4e2e15f4a8d0d2c88e","tarball":"https://registry.npmjs.org/@adezdev/adam-agent/-/adam-agent-0.5.1.tgz","fileCount":38,"integrity":"sha512-goH8Y7+QybU9L4zwel04u+wAvyOFLaXLZ2Dx4ZWJNTnq2pkUXuF40565wMLnSvQRj/2PdVU8HbVphXFpeDUlIw==","signatures":[{"sig":"MEUCICY0tmO0SdZccPgsIdsSD3XItTYTBknegQW0x5RXVYgjAiEA9bhoEbh8vof3uw9sG7LIGZ616Ltx+BNJBNMvbgN7TK8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":143589},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"809f0348c62ef7f4eddcf32841b403f00dd9f224","scripts":{"build":"tsc -p tsconfig.build.json && node -e \"require('fs').chmodSync('dist/cli.js',0o755)\"","check":"biome check --write .","clean":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\""},"_npmUser":{"name":"adezdev","email":"paredezdev@gmail.com"},"repository":{"url":"git+https://github.com/adezdev/adam.git","type":"git","directory":"packages/agent"},"_npmVersion":"11.17.0","description":"General-purpose agent with tool calling and session persistence","directories":{},"_nodeVersion":"24.19.0","dependencies":{"glob":"^11.0.3","chalk":"^5.5.0","openai":"^5.12.2","@types/glob":"^8.1.0","@adezdev/adam-tui":"^0.5.1"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/adam-agent_0.5.1_1786598125885_0.10643708296746768","host":"s3://npm-registry-packages-npm-production"}},"0.5.2":{"name":"@adezdev/adam-agent","version":"0.5.2","keywords":["agent","ai","llm","openai","claude","cli","tui"],"author":{"name":"Mario Zechner"},"license":"MIT","_id":"@adezdev/adam-agent@0.5.2","maintainers":[{"name":"adezdev","email":"paredezdev@gmail.com"}],"homepage":"https://github.com/adezdev/adam#readme","bugs":{"url":"https://github.com/adezdev/adam/issues"},"bin":{"adam":"dist/cli.js"},"dist":{"shasum":"755d1bc16082b2fa5a9c13f15e0590dca794e3b7","tarball":"https://registry.npmjs.org/@adezdev/adam-agent/-/adam-agent-0.5.2.tgz","fileCount":38,"integrity":"sha512-VgxZLt08uXM0RIqO0KWYaS2FhSJtfOVoLMKCLFEr2QyMq8k5uKbI69NnlBqLZJ6VBSK+vwpRhpFzXeG8mz/VLw==","signatures":[{"sig":"MEQCIFL4l6sTnwELr5vMGGbLlFLwvysYf00oDnq5U0eGaTisAiB0OU48DniUsdIDb0RQ1GcLYu0tVMQgRCixM91ZFIjGwQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":143589},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"51c2ce6e7a35dc740931e29afce7d8e87d120553","scripts":{"build":"tsc -p tsconfig.build.json && node -e \"require('fs').chmodSync('dist/cli.js',0o755)\"","check":"biome check --write .","clean":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\""},"_npmUser":{"name":"adezdev","email":"paredezdev@gmail.com"},"repository":{"url":"git+https://github.com/adezdev/adam.git","type":"git","directory":"packages/agent"},"_npmVersion":"11.17.0","description":"General-purpose agent with tool calling and session persistence","directories":{},"_nodeVersion":"24.19.0","dependencies":{"glob":"^11.0.3","chalk":"^5.5.0","openai":"^5.12.2","@types/glob":"^8.1.0","@adezdev/adam-tui":"^0.5.2"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/adam-agent_0.5.2_1786598654849_0.4998397778920005","host":"s3://npm-registry-packages-npm-production"}},"0.5.3":{"name":"@adezdev/adam-agent","version":"0.5.3","keywords":["agent","ai","llm","openai","claude","cli","tui"],"author":{"name":"Mario Zechner"},"license":"MIT","_id":"@adezdev/adam-agent@0.5.3","maintainers":[{"name":"adezdev","email":"paredezdev@gmail.com"}],"homepage":"https://github.com/adezdev/adam#readme","bugs":{"url":"https://github.com/adezdev/adam/issues"},"bin":{"adam":"dist/cli.js"},"dist":{"shasum":"7b0d468ed72bb81524988b7ac226f10b5a0bbf5a","tarball":"https://registry.npmjs.org/@adezdev/adam-agent/-/adam-agent-0.5.3.tgz","fileCount":38,"integrity":"sha512-A6beJZgkcqX4Rp5PjoJkIDXYqlTYLMIko48dmsCcCoVhyz8htzhEBhOxwV7kDK70ClaLqVX7i6SF0OPmUd4alw==","signatures":[{"sig":"MEQCIBGoUIqX2KMUJcqYpFvz7E4WdtZcfYAGUC3GDuh9MAn1AiAe/7j8KOWK9GnGzwM/sNITcJG1YmxK3ShvX7/GvEyjnA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":143589},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"877a010073b277da839864a6c2ebbaafdde6be42","scripts":{"build":"tsc -p tsconfig.build.json && node -e \"require('fs').chmodSync('dist/cli.js',0o755)\"","check":"biome check --write .","clean":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\""},"_npmUser":{"name":"adezdev","email":"paredezdev@gmail.com"},"repository":{"url":"git+https://github.com/adezdev/adam.git","type":"git","directory":"packages/agent"},"_npmVersion":"11.17.0","description":"General-purpose agent with tool calling and session persistence","directories":{},"_nodeVersion":"24.19.0","dependencies":{"glob":"^11.0.3","chalk":"^5.5.0","openai":"^5.12.2","@types/glob":"^8.1.0","@adezdev/adam-tui":"^0.5.3"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/adam-agent_0.5.3_1786599426886_0.21324548131703525","host":"s3://npm-registry-packages-npm-production"}},"0.5.4":{"name":"@adezdev/adam-agent","version":"0.5.4","keywords":["agent","ai","llm","openai","claude","cli","tui"],"author":{"name":"Mario Zechner"},"license":"MIT","_id":"@adezdev/adam-agent@0.5.4","maintainers":[{"name":"adezdev","email":"paredezdev@gmail.com"}],"homepage":"https://github.com/adezdev/adam#readme","bugs":{"url":"https://github.com/adezdev/adam/issues"},"bin":{"adam":"dist/cli.js"},"dist":{"shasum":"caec21840d470d5c163482d979d39a9bace599c2","tarball":"https://registry.npmjs.org/@adezdev/adam-agent/-/adam-agent-0.5.4.tgz","fileCount":38,"integrity":"sha512-pes0uxOWHZqVVZMXd/A+hoQXQmuzfZoBjDWhArOl+ZLMNb9yxb85UrIQ01Uv58r2lIxkfpC/BRbini35jH33qA==","signatures":[{"sig":"MEUCICVWdjLzwKu0GeZ8gdqtNl6lSDViptkQPP3OUziyXQ+/AiEA2Vb0qrBypUPo0vcH94CFRI3GxwlMidxBMd+XHs5/d2Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":146972},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"537f6f9daa5cdc2132c9616aaed5f3624f4423b8","scripts":{"build":"tsc -p tsconfig.build.json && node -e \"require('fs').chmodSync('dist/cli.js',0o755)\"","check":"biome check --write .","clean":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\""},"_npmUser":{"name":"adezdev","email":"paredezdev@gmail.com"},"repository":{"url":"git+https://github.com/adezdev/adam.git","type":"git","directory":"packages/agent"},"_npmVersion":"11.17.0","description":"General-purpose agent with tool calling and session persistence","directories":{},"_nodeVersion":"24.19.0","dependencies":{"glob":"^11.0.3","chalk":"^5.5.0","openai":"^5.12.2","@types/glob":"^8.1.0","@adezdev/adam-tui":"^0.5.4"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/adam-agent_0.5.4_1786600187652_0.17068262801011502","host":"s3://npm-registry-packages-npm-production"}},"0.5.5":{"name":"@adezdev/adam-agent","version":"0.5.5","keywords":["agent","ai","llm","openai","claude","cli","tui"],"author":{"name":"Mario Zechner"},"license":"MIT","_id":"@adezdev/adam-agent@0.5.5","maintainers":[{"name":"adezdev","email":"paredezdev@gmail.com"}],"homepage":"https://github.com/adezdev/adam#readme","bugs":{"url":"https://github.com/adezdev/adam/issues"},"bin":{"adam":"dist/cli.js"},"dist":{"shasum":"08796bd3921916409607bd28a026d71845be95a1","tarball":"https://registry.npmjs.org/@adezdev/adam-agent/-/adam-agent-0.5.5.tgz","fileCount":42,"integrity":"sha512-AwMb/GvA4zKszrgtGAFBowNp3aBwUdVeCIPdD5Mh7nNkIxQOHz2XnPH42GHIx/RPejcImSgMZMXZP9iWu4sQKA==","signatures":[{"sig":"MEQCID44jgBi0YyTuarDs77j0YnJmpbNovEVhOLkci+sMmSRAiBQYuUSQ/6gWdjXdeDUxqgjasrXG7JyFLlhGmt8G666SQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":146485},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"8f3e0f0d544a40cc995d8c6a10d31a17702d8eae","scripts":{"build":"tsc -p tsconfig.build.json && node -e \"require('fs').chmodSync('dist/cli.js',0o755)\"","check":"biome check --write .","clean":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\""},"_npmUser":{"name":"adezdev","email":"paredezdev@gmail.com"},"repository":{"url":"git+https://github.com/adezdev/adam.git","type":"git","directory":"packages/agent"},"_npmVersion":"11.17.0","description":"General-purpose agent with tool calling and session persistence","directories":{},"_nodeVersion":"24.19.0","dependencies":{"glob":"^11.0.3","chalk":"^5.5.0","openai":"^5.12.2","@types/glob":"^8.1.0","@adezdev/adam-tui":"^0.5.5"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/adam-agent_0.5.5_1786600853518_0.0966842699048549","host":"s3://npm-registry-packages-npm-production"}},"0.5.6":{"name":"@adezdev/adam-agent","version":"0.5.6","keywords":["agent","ai","llm","openai","claude","cli","tui"],"author":{"name":"Mario Zechner"},"license":"MIT","_id":"@adezdev/adam-agent@0.5.6","maintainers":[{"name":"adezdev","email":"paredezdev@gmail.com"}],"homepage":"https://github.com/adezdev/adam#readme","bugs":{"url":"https://github.com/adezdev/adam/issues"},"bin":{"adam":"dist/cli.js"},"dist":{"shasum":"05f34eedec9ed97d66235c98b110c8e925d0ec64","tarball":"https://registry.npmjs.org/@adezdev/adam-agent/-/adam-agent-0.5.6.tgz","fileCount":42,"integrity":"sha512-Lpv3iV9M+y3MYZZDb53NCbXavHriw9DfKljHKyPJ5Gw30zmso0Nxg1OMAuKoGM4HFYPxZ67yN81nBwBBVWY02Q==","signatures":[{"sig":"MEYCIQDoN3IwUxXYmSl9KKy1iXYvb2Zw7QW6r2uMpkmluLyl+QIhAOfA1laO8c/t6dqYNBJaH0eYHFCBUGDYitdwTgveIIyN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":146487},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"dffbf5b247cc0b1d21a2f878ffb8b71ef58b3823","scripts":{"build":"tsc -p tsconfig.build.json && node -e \"require('fs').chmodSync('dist/cli.js',0o755)\"","check":"biome check --write .","clean":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\""},"_npmUser":{"name":"adezdev","email":"paredezdev@gmail.com"},"repository":{"url":"git+https://github.com/adezdev/adam.git","type":"git","directory":"packages/agent"},"_npmVersion":"11.17.0","description":"General-purpose agent with tool calling and session persistence","directories":{},"_nodeVersion":"24.19.0","dependencies":{"glob":"^11.0.3","chalk":"^5.5.0","openai":"^5.12.2","@types/glob":"^8.1.0","@adezdev/adam-tui":"^0.5.6"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/adam-agent_0.5.6_1786601358899_0.8252516807521857","host":"s3://npm-registry-packages-npm-production"}},"0.5.7":{"name":"@adezdev/adam-agent","version":"0.5.7","keywords":["agent","ai","llm","openai","claude","cli","tui"],"author":{"name":"Mario Zechner"},"license":"MIT","_id":"@adezdev/adam-agent@0.5.7","maintainers":[{"name":"adezdev","email":"paredezdev@gmail.com"}],"homepage":"https://github.com/adezdev/adam#readme","bugs":{"url":"https://github.com/adezdev/adam/issues"},"bin":{"adam":"dist/cli.js"},"dist":{"shasum":"04dbf2bb926b0b397c1ba2d44e13e460f3d356f7","tarball":"https://registry.npmjs.org/@adezdev/adam-agent/-/adam-agent-0.5.7.tgz","fileCount":42,"integrity":"sha512-/wRbJt5uufI4ReXwDRLCDztL3HcC27ozcAsl8E6xCOdvfJX/gpJSdgZ1hNqP39f/cfK1FovnAlVok8JRybXuJw==","signatures":[{"sig":"MEQCIB9emkQnmlCYghUOCBEQIgdreMdlaMC+mwXRZHjMOT49AiBuWqI2kWYZemDFnRE6IoxesN9mfz9I78f+gQ6uwJry0w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":169907},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"65a0d79890c05342acc64b231e6fdd95ee28e332","scripts":{"build":"tsc -p tsconfig.build.json && node -e \"require('fs').chmodSync('dist/cli.js',0o755)\"","check":"biome check --write .","clean":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\""},"_npmUser":{"name":"adezdev","email":"paredezdev@gmail.com"},"repository":{"url":"git+https://github.com/adezdev/adam.git","type":"git","directory":"packages/agent"},"_npmVersion":"11.17.0","description":"General-purpose agent with tool calling and session persistence","directories":{},"_nodeVersion":"24.19.0","dependencies":{"glob":"^11.0.3","chalk":"^5.5.0","openai":"^5.12.2","@types/glob":"^8.1.0","@adezdev/adam-tui":"^0.5.7"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/adam-agent_0.5.7_1786601916993_0.6137846026797864","host":"s3://npm-registry-packages-npm-production"}},"0.5.8":{"name":"@adezdev/adam-agent","version":"0.5.8","keywords":["agent","ai","llm","openai","claude","cli","tui"],"author":{"name":"Mario Zechner"},"license":"MIT","_id":"@adezdev/adam-agent@0.5.8","maintainers":[{"name":"adezdev","email":"paredezdev@gmail.com"}],"homepage":"https://github.com/adezdev/adam#readme","bugs":{"url":"https://github.com/adezdev/adam/issues"},"bin":{"adam":"dist/cli.js"},"dist":{"shasum":"d034d2529b104c1ffe1b08b602e0fab620bc4d90","tarball":"https://registry.npmjs.org/@adezdev/adam-agent/-/adam-agent-0.5.8.tgz","fileCount":42,"integrity":"sha512-teQKhpHya13QQ8Lk+j+QTdYUcO3OoemU/VVB3ao0o006UAD8n3gtRNL8jatXEEwF5I0P/udS75HdBHhU3z43Kw==","signatures":[{"sig":"MEUCIQCm9TokPg/7e10Rxo5fiMgr57MCQKGgNUssN1o73kfPCQIgTi1Ca3CpRiO3cEEWeoSBXrcTPY5ZzwSTgEcX1IFaajg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":167584},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"f6f7c4be23d35bfc2bf01e3a67fb265d7cee3421","scripts":{"build":"tsc -p tsconfig.build.json && node -e \"require('fs').chmodSync('dist/cli.js',0o755)\"","check":"biome check --write .","clean":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\""},"_npmUser":{"name":"adezdev","email":"paredezdev@gmail.com"},"repository":{"url":"git+https://github.com/adezdev/adam.git","type":"git","directory":"packages/agent"},"_npmVersion":"11.17.0","description":"General-purpose agent with tool calling and session persistence","directories":{},"_nodeVersion":"24.19.0","dependencies":{"glob":"^11.0.3","chalk":"^5.5.0","openai":"^5.12.2","@types/glob":"^8.1.0","@adezdev/adam-tui":"^0.5.8"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/adam-agent_0.5.8_1786602242947_0.24156113036721094","host":"s3://npm-registry-packages-npm-production"}},"0.5.9":{"name":"@adezdev/adam-agent","version":"0.5.9","description":"General-purpose agent with tool calling and session persistence","type":"module","bin":{"adam":"dist/cli.js"},"main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"clean":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"","build":"tsc -p tsconfig.build.json && node -e \"require('fs').chmodSync('dist/cli.js',0o755)\"","check":"biome check --write ."},"dependencies":{"@adezdev/adam-tui":"^0.5.9","@types/glob":"^8.1.0","chalk":"^5.5.0","glob":"^11.0.3","openai":"^5.12.2"},"devDependencies":{},"keywords":["agent","ai","llm","openai","claude","cli","tui"],"author":{"name":"Mario Zechner"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/adezdev/adam.git","directory":"packages/agent"},"engines":{"node":">=20.0.0"},"gitHead":"8f0039b324ad950d43222f82808e71434949e5a4","_id":"@adezdev/adam-agent@0.5.9","bugs":{"url":"https://github.com/adezdev/adam/issues"},"homepage":"https://github.com/adezdev/adam#readme","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-WYvrKAciHuI0KQo0l+nMYP3wC9QPrYr+Bhl2rxXexMcIHfKaAyyXu8iB8PgyCTlXtugMrDa40F6B18/tHt54mw==","shasum":"394f1d208fde53e498364a2bc20cebae57f16cd3","tarball":"https://registry.npmjs.org/@adezdev/adam-agent/-/adam-agent-0.5.9.tgz","fileCount":46,"unpackedSize":174731,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD9U9mAJtxmeCmbpYKWl8R5LaCKIK460nRt/3p61OupWAIgTIHiKSXo8JEpgM4bn1ZWTN84yJxjQCzH3aqW15WDa5M="}]},"_npmUser":{"name":"adezdev","email":"paredezdev@gmail.com"},"directories":{},"maintainers":[{"name":"adezdev","email":"paredezdev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/adam-agent_0.5.9_1786603404482_0.4294895937846086"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-13T05:15:25.701Z","modified":"2026-08-13T06:43:24.816Z","0.5.1":"2026-08-13T05:15:26.026Z","0.5.2":"2026-08-13T05:24:14.995Z","0.5.3":"2026-08-13T05:37:07.042Z","0.5.4":"2026-08-13T05:49:47.785Z","0.5.5":"2026-08-13T06:00:53.661Z","0.5.6":"2026-08-13T06:09:19.064Z","0.5.7":"2026-08-13T06:18:37.147Z","0.5.8":"2026-08-13T06:24:03.089Z","0.5.9":"2026-08-13T06:43:24.660Z"},"bugs":{"url":"https://github.com/adezdev/adam/issues"},"author":{"name":"Mario Zechner"},"license":"MIT","homepage":"https://github.com/adezdev/adam#readme","keywords":["agent","ai","llm","openai","claude","cli","tui"],"repository":{"type":"git","url":"git+https://github.com/adezdev/adam.git","directory":"packages/agent"},"description":"General-purpose agent with tool calling and session persistence","maintainers":[{"name":"adezdev","email":"paredezdev@gmail.com"}],"readme":"# adam-agent\r\n\r\nA general-purpose agent with tool calling and session persistence, modeled after Claude Code but extremely hackable and minimal. It comes with a built-in TUI (also modeled after Claude Code) for interactive use.\r\n\r\nEverything is designed to be easy:\r\n- Writing custom UIs on top of it (via JSON mode in any language or the TypeScript API)\r\n- Using it for inference steps in deterministic programs (via JSON mode in any language or the TypeScript API)\r\n- Providing your own system prompts and tools\r\n- Working with various LLM providers or self-hosted LLMs\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install -g @adezdev/adam-agent\r\n```\r\n\r\nThis installs the `adam` command globally.\r\n\r\n## Quick Start\r\n\r\nBy default, adam uses OpenAI's API with model `gpt-5-mini` and authenticates using the `OPENAI_API_KEY` environment variable. Any OpenAI-compatible endpoint works, including Ollama, vLLM, OpenRouter, Groq, Anthropic, etc.\r\n\r\n```bash\r\n# Single message\r\nadam \"What is 2+2?\"\r\n\r\n# Multiple messages processed sequentially\r\nadam \"What is 2+2?\" \"What about 3+3?\"\r\n\r\n# Interactive chat mode (no messages = interactive)\r\nadam\r\n\r\n# Continue most recently modified session in current directory\r\nadam --continue \"Follow up question\"\r\n\r\n# GPT-OSS via Groq\r\nadam --base-url https://api.groq.com/openai/v1 --api-key $GROQ_API_KEY --model openai/gpt-oss-120b\r\n\r\n# GLM 4.5 via OpenRouter\r\nadam --base-url https://openrouter.ai/api/v1 --api-key $OPENROUTER_API_KEY --model z-ai/glm-4.5\r\n\r\n# Claude via Anthropic's OpenAI compatibility layer. See: https://docs.anthropic.com/en/api/openai-sdk\r\nadam --base-url https://api.anthropic.com/v1 --api-key $ANTHROPIC_API_KEY --model claude-opus-4-1-20250805\r\n\r\n# Gemini via Google AI\r\nadam --base-url https://generativelanguage.googleapis.com/v1beta/openai/ --api-key $GEMINI_API_KEY --model gemini-2.5-flash\r\n```\r\n\r\n## Usage Modes\r\n\r\n### Single-Shot Mode\r\nProcess one or more messages and exit:\r\n```bash\r\nadam \"First question\" \"Second question\"\r\n```\r\n\r\n### Interactive Mode\r\nStart an interactive chat session:\r\n```bash\r\nadam\r\n```\r\n- Type messages and press Enter to send\r\n- Type `exit` or `quit` to end session\r\n- Press Escape to interrupt while processing\r\n- Press CTRL+C to clear the text editor\r\n- Press CTRL+C twice quickly to exit\r\n\r\n### JSON Mode\r\nJSON mode enables programmatic integration by outputting events as JSONL (JSON Lines).\r\n\r\n**Single-shot mode:** Outputs a stream of JSON events for each message, then exits.\r\n```bash\r\nadam --json \"What is 2+2?\" \"And the meaning of life?\"\r\n# Outputs: {\"type\":\"session_start\",\"sessionId\":\"bb6f0acb-80cf-4729-9593-bcf804431a53\",\"model\":\"gpt-5-mini\",\"api\":\"completions\",\"baseURL\":\"https://api.openai.com/v1\",\"systemPrompt\":\"You are a helpful assistant.\"} {\"type\":\"user_message\",\"text\":\"What is 2+2?\"} {\"type\":\"assistant_start\"} {\"type\":\"token_usage\",\"inputTokens\":314,\"outputTokens\":16,\"totalTokens\":330,\"cacheReadTokens\":0,\"cacheWriteTokens\":0} {\"type\":\"assistant_message\",\"text\":\"2 + 2 = 4\"} {\"type\":\"user_message\",\"text\":\"And the meaning of life?\"} {\"type\":\"assistant_start\"} {\"type\":\"token_usage\",\"inputTokens\":337,\"outputTokens\":331,\"totalTokens\":668,\"cacheReadTokens\":0,\"cacheWriteTokens\":0} {\"type\":\"assistant_message\",\"text\":\"Short answer (pop-culture): 42.\\n\\nMore useful answers:\\n- Philosophical...\r\n```\r\n\r\n**Interactive mode:** Accepts JSON commands via stdin and outputs JSON events to stdout.\r\n```bash\r\n# Start interactive JSON mode\r\nadam --json\r\n# Now send commands via stdin\r\n\r\n# Pipe one or more initial messages in\r\n(echo '{\"type\": \"message\", \"content\": \"What is 2+2?\"}'; cat) | adam --json\r\n# Outputs: {\"type\":\"session_start\",\"sessionId\":\"bb64cfbe-dd52-4662-bd4a-0d921c332fd1\",\"model\":\"gpt-5-mini\",\"api\":\"completions\",\"baseURL\":\"https://api.openai.com/v1\",\"systemPrompt\":\"You are a helpful assistant.\"} {\"type\":\"user_message\",\"text\":\"What is 2+2?\"} {\"type\":\"assistant_start\"} {\"type\":\"token_usage\",\"inputTokens\":314,\"outputTokens\":16,\"totalTokens\":330,\"cacheReadTokens\":0,\"cacheWriteTokens\":0} {\"type\":\"assistant_message\",\"text\":\"2 + 2 = 4\"}\r\n```\r\n\r\nCommands you can send via stdin in interactive JSON mode:\r\n```json\r\n{\"type\": \"message\", \"content\": \"Your message here\"}  // Send a message to the agent\r\n{\"type\": \"interrupt\"}                                 // Interrupt current processing\r\n```\r\n\r\n## Configuration\r\n\r\n### Command Line Options\r\n```\r\n--base-url <url>        API base URL (default: https://api.openai.com/v1)\r\n--api-key <key>         API key (or set OPENAI_API_KEY env var)\r\n--model <model>         Model name (default: gpt-4o-mini)\r\n--api <type>            API type: \"completions\" or \"responses\" (default: completions)\r\n--system-prompt <text>  System prompt (default: \"You are a helpful assistant.\")\r\n--continue              Continue previous session\r\n--json                  JSON mode\r\n--no-context-files      Don't auto-load AGENTS.md/CLAUDE.md context files\r\n--help, -h              Show help message\r\n```\r\n\r\n## Context Files\r\n\r\nAdam automatically loads project context into the system prompt, matching Claude Code's/pi's `AGENTS.md`/`CLAUDE.md` convention:\r\n- One global file from `~/.adam` (or `$ADAM_CONFIG_DIR`)\r\n- One file per directory walking from the current working directory up to the filesystem root\r\n\r\nIn each directory, the first match wins, checked in this order: `AGENTS.override.md`, `AGENTS.md`, `AGENTS.MD`, `CLAUDE.md`, `CLAUDE.MD`. Found files are wrapped in a `<project_context>` block and appended to the system prompt, ordered from the global file down through the most specific (closest to cwd) ancestor last. Disable with `--no-context-files`.\r\n\r\n## Session Persistence\r\n\r\nSessions are automatically saved to `~/.adam/sessions/` and include:\r\n- Complete conversation history\r\n- Tool call results\r\n- Token usage statistics\r\n\r\nUse `--continue` to resume the last session:\r\n```bash\r\nadam \"Start a story about a robot\"\r\n# ... later ...\r\nadam --continue \"Continue the story\"\r\n```\r\n\r\n## Tools\r\n\r\nThe agent includes built-in tools for file system operations:\r\n- **read_file** - Read file contents\r\n- **list_directory** - List directory contents\r\n- **bash** - Execute shell commands\r\n- **glob** - Find files by pattern\r\n- **ripgrep** - Search file contents\r\n\r\nThese tools are automatically available when using the agent through the `adam` command for code navigation tasks.\r\n\r\n## JSON Mode Events\r\n\r\nWhen using `--json`, the agent outputs these event types:\r\n- `session_start` - New session started with metadata\r\n- `user_message` - User input\r\n- `assistant_start` - Assistant begins responding\r\n- `assistant_message` - Assistant's response\r\n- `reasoning` - Reasoning/thinking (for models that support it)\r\n- `tool_call` - Tool being called\r\n- `tool_result` - Result from tool\r\n- `token_usage` - Token usage statistics (includes `reasoningTokens` for models with reasoning)\r\n- `error` - Error occurred\r\n- `interrupted` - Processing was interrupted\r\n\r\nThe complete TypeScript type definition for `AgentEvent` can be found in [`src/agent.ts`](src/agent.ts#L6).\r\n\r\n## Build an Interactive UI with JSON Mode\r\nBuild custom UIs in any language by spawning adam in JSON mode and communicating via stdin/stdout.\r\n\r\n```javascript\r\nimport { spawn } from 'child_process';\r\nimport { createInterface } from 'readline';\r\n\r\n// Start the agent in JSON mode\r\nconst agent = spawn('adam', ['--json']);\r\n\r\n// Create readline interface for parsing JSONL output from agent\r\nconst agentOutput = createInterface({input: agent.stdout, crlfDelay: Infinity});\r\n\r\n// Create readline interface for user input\r\nconst userInput = createInterface({input: process.stdin, output: process.stdout});\r\n\r\n// State tracking\r\nlet isProcessing = false, lastUsage, isExiting = false;\r\n\r\n// Handle each line of JSON output from agent\r\nagentOutput.on('line', (line) => {\r\n    try {\r\n      const event = JSON.parse(line);\r\n\r\n      // Handle all event types\r\n      switch (event.type) {\r\n        case 'session_start':\r\n          console.log(`Session started (${event.model}, ${event.api}, ${event.baseURL})`);\r\n          console.log('Press CTRL + C to exit');\r\n          promptUser();\r\n          break;\r\n\r\n        case 'user_message':\r\n          // Already shown in prompt, skip\r\n          break;\r\n\r\n        case 'assistant_start':\r\n          isProcessing = true;\r\n          console.log('\\n[assistant]');\r\n          break;\r\n\r\n        case 'reasoning':\r\n          console.log(`[thinking]\\n${event.text}\\n`);\r\n          break;\r\n\r\n        case 'tool_call':\r\n          console.log(`[tool] ${event.name}(${event.args.substring(0, 50)})\\n`);\r\n          break;\r\n\r\n        case 'tool_result':\r\n            const lines = event.result.split('\\n');\r\n            const truncated = lines.length - 5 > 0 ? `\\n.  ... (${lines.length - 5} more lines truncated)` : '';\r\n            console.log(`[tool result]\\n${lines.slice(0, 5).join('\\n')}${truncated}\\n`);\r\n          break;\r\n\r\n        case 'assistant_message':\r\n          console.log(event.text.trim());\r\n          isProcessing = false;\r\n          promptUser();\r\n          break;\r\n\r\n        case 'token_usage':\r\n          lastUsage = event;\r\n          break;\r\n\r\n        case 'error':\r\n          console.error('\\n❌ Error:', event.message);\r\n          isProcessing = false;\r\n          promptUser();\r\n          break;\r\n\r\n        case 'interrupted':\r\n          console.log('\\n⚠️  Interrupted by user');\r\n          isProcessing = false;\r\n          promptUser();\r\n          break;\r\n      }\r\n    } catch (e) {\r\n      console.error('Failed to parse JSON:', line, e);\r\n    }\r\n});\r\n\r\n// Send a message to the agent\r\nfunction sendMessage(content) {\r\n  agent.stdin.write(`${JSON.stringify({type: 'message', content: content})}\\n`);\r\n}\r\n\r\n// Send interrupt signal\r\nfunction interrupt() {\r\n  agent.stdin.write(`${JSON.stringify({type: 'interrupt'})}\\n`);\r\n}\r\n\r\n// Prompt for user input\r\nfunction promptUser() {\r\n  if (isExiting) return;\r\n\r\n  if (lastUsage) {\r\n    console.log(`\\nin: ${lastUsage.inputTokens}, out: ${lastUsage.outputTokens}, cache read: ${lastUsage.cacheReadTokens}, cache write: ${lastUsage.cacheWriteTokens}`);\r\n  }\r\n\r\n  userInput.question('\\n[user]\\n> ', (answer) => {\r\n    answer = answer.trim();\r\n    if (answer) {\r\n      sendMessage(answer);\r\n    } else {\r\n      promptUser();\r\n    }\r\n  });\r\n}\r\n\r\n// Handle Ctrl+C\r\nprocess.on('SIGINT', () => {\r\n  if (isProcessing) {\r\n    interrupt();\r\n  } else {\r\n    agent.kill();\r\n    process.exit(0);\r\n  }\r\n});\r\n\r\n// Handle agent exit\r\nagent.on('close', (code) => {\r\n  isExiting = true;\r\n  userInput.close();\r\n  console.log(`\\nAgent exited with code ${code}`);\r\n  process.exit(code);\r\n});\r\n\r\n// Handle errors\r\nagent.on('error', (err) => {\r\n  console.error('Failed to start agent:', err);\r\n  process.exit(1);\r\n});\r\n\r\n// Start the conversation\r\nconsole.log('Adam Agent Interactive Chat');\r\n```\r\n\r\n## Reasoning\r\n\r\nAdam supports reasoning/thinking tokens for models that provide this capability:\r\n\r\n### Usage Examples\r\n\r\n```bash\r\n# OpenAI o1/o3 - see thinking content with Responses API\r\nadam --api responses --model o1-mini \"Explain quantum computing\"\r\n\r\n# Groq gpt-oss - reasoning with Chat Completions\r\nadam --base-url https://api.groq.com/openai/v1 --api-key $GROQ_API_KEY \\\r\n  --model openai/gpt-oss-120b \"Complex math problem\"\r\n\r\n# Gemini 2.5 - thinking content automatically configured\r\nadam --base-url https://generativelanguage.googleapis.com/v1beta/openai/ \\\r\n  --api-key $GEMINI_API_KEY --model gemini-2.5-flash \"Think step by step\"\r\n\r\n# OpenRouter - supports various reasoning models\r\nadam --base-url https://openrouter.ai/api/v1 --api-key $OPENROUTER_API_KEY \\\r\n  --model \"qwen/qwen3-235b-a22b-thinking-2507\" \"Complex reasoning task\"\r\n```\r\n\r\n### Supported Providers\r\n\r\n| Provider | Model | API | Thinking Content | Notes |\r\n|----------|-------|-----|------------------|-------|\r\n| **OpenAI** | o1, o3 | Responses | ✅ Full | Thinking events + token counts |\r\n| | o1, o3 | Chat Completions | ❌ | Token counts only |\r\n| | gpt-5 | Both APIs | ❌ | Model limitation (empty summaries) |\r\n| **Groq** | gpt-oss | Chat Completions | ✅ Full | Via `reasoning_format: \"parsed\"` |\r\n| | gpt-oss | Responses | ❌ | API doesn't support reasoning.summary |\r\n| **Gemini** | 2.5 models | Chat Completions | ✅ Full | Auto-configured via extra_body |\r\n| **Anthropic** | Claude | OpenAI Compat | ❌ | Use native API for thinking |\r\n| **OpenRouter** | Various | Both APIs | Varies | Depends on underlying model |\r\n\r\n### Technical Details\r\n\r\nThe agent automatically:\r\n- Detects provider from base URL\r\n- Tests model reasoning support on first use (cached)\r\n- Adjusts request parameters per provider:\r\n  - OpenAI: `reasoning_effort` (minimal/low)\r\n  - Groq: `reasoning_format: \"parsed\"`\r\n  - Gemini: `extra_body.google.thinking_config`\r\n  - OpenRouter: `reasoning` object with `effort` field\r\n- Parses provider-specific response formats:\r\n  - Gemini: Extracts from `<thought>` tags\r\n  - Groq: Uses `message.reasoning` field\r\n  - OpenRouter: Uses `message.reasoning` field\r\n  - OpenAI: Uses standard `reasoning` events\r\n\r\n## Architecture\r\n\r\nThe agent is built with:\r\n- **agent.ts** - Core Agent class and API functions\r\n- **cli.ts** - Thin bin entry point; applies CLI-only side effects (Windows\r\n  codepage, `.env` autoload) then hands off to main.ts\r\n- **main.ts** - Argument parsing, mode dispatch (single-shot/interactive/JSON),\r\n  and the `main()` function exported by the package for library consumers\r\n- **args.ts** - Custom typed argument parser\r\n- **session-manager.ts** - Session persistence\r\n- **tools/** - Tool implementations\r\n- **renderers/** - Output formatters (console, TUI, JSON)\r\n\r\n## Development\r\n\r\n### Running from Source\r\n\r\n```bash\r\n# Run directly with npx tsx - no build needed\r\nnpx tsx src/cli.ts \"What is 2+2?\"\r\n\r\n# Interactive TUI mode\r\nnpx tsx src/cli.ts\r\n\r\n# JSON mode for programmatic use\r\necho '{\"type\":\"message\",\"content\":\"list files\"}' | npx tsx src/cli.ts --json\r\n```\r\n\r\n### Testing\r\n\r\nThe agent supports three testing modes:\r\n\r\n#### 1. Test UI/Renderers (non-interactive mode)\r\n```bash\r\n# Test console renderer output and metrics\r\nnpx tsx src/cli.ts \"list files in /tmp\" 2>&1 | tail -5\r\n# Verify: ↑609 ↓610 ⚒ 1 (tokens and tool count)\r\n\r\n# Test TUI renderer (with stdin)\r\necho \"list files\" | npx tsx src/cli.ts 2>&1 | grep \"⚒\"\r\n```\r\n\r\n#### 2. Test Model Behavior (JSON mode)\r\n```bash\r\n# Extract metrics for model comparison\r\necho '{\"type\":\"message\",\"content\":\"write fibonacci in Python\"}' | \\\r\n  npx tsx src/cli.ts --json --model gpt-4o-mini 2>&1 | \\\r\n  jq -s '[.[] | select(.type==\"token_usage\")] | last'\r\n\r\n# Compare models: tokens used, tool calls made, quality\r\nfor model in \"gpt-4o-mini\" \"gpt-4o\"; do\r\n  echo \"Testing $model:\"\r\n  echo '{\"type\":\"message\",\"content\":\"fix syntax errors in: prnt(hello)\"}' | \\\r\n    npx tsx src/cli.ts --json --model $model 2>&1 | \\\r\n    jq -r 'select(.type==\"token_usage\" or .type==\"tool_call\" or .type==\"assistant_message\")'\r\ndone\r\n```\r\n\r\n#### 3. LLM-as-Judge Testing\r\n```bash\r\n# Capture output from different models and evaluate with another LLM\r\nTASK=\"write a Python function to check if a number is prime\"\r\n\r\n# Get response from model A\r\nRESPONSE_A=$(echo \"{\\\"type\\\":\\\"message\\\",\\\"content\\\":\\\"$TASK\\\"}\" | \\\r\n  npx tsx src/cli.ts --json --model gpt-4o-mini 2>&1 | \\\r\n  jq -r '.[] | select(.type==\"assistant_message\") | .text')\r\n\r\n# Judge the response\r\necho \"{\\\"type\\\":\\\"message\\\",\\\"content\\\":\\\"Rate this code (1-10): $RESPONSE_A\\\"}\" | \\\r\n  npx tsx src/cli.ts --json --model gpt-4o 2>&1 | \\\r\n  jq -r '.[] | select(.type==\"assistant_message\") | .text'\r\n```\r\n\r\n### Build\r\n\r\n```bash\r\nnpm run build\r\ndist/cli.js \"Hello\"\r\n```\r\n\r\n## Use as a Library\r\n\r\n```typescript\r\nimport { Agent, ConsoleRenderer } from '@adezdev/adam-agent';\r\n\r\nconst agent = new Agent({\r\n  apiKey: process.env.OPENAI_API_KEY,\r\n  baseURL: 'https://api.openai.com/v1',\r\n  model: 'gpt-5-mini',\r\n  api: 'completions',\r\n  systemPrompt: 'You are a helpful assistant.'\r\n}, new ConsoleRenderer());\r\n\r\nawait agent.ask('What is 2+2?');\r\n```","readmeFilename":"README.md"}