{"id":35209506,"url":"https://github.com/zbigniewsobiecki/llmist","last_synced_at":"2026-03-04T12:07:33.250Z","repository":{"id":326906845,"uuid":"1103781041","full_name":"zbigniewsobiecki/llmist","owner":"zbigniewsobiecki","description":"Streaming-first multi-provider LLM client in TypeScript with home-made tool calling","archived":false,"fork":false,"pushed_at":"2026-01-12T17:11:15.000Z","size":3642,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2026-01-12T17:12:17.890Z","etag":null,"topics":["agent-framework","agents","ai","anthropic","bun","function-calling","gemini","generative-ai","llm","llm-framework","multi-provider","nodejs","openai","streaming","tool-calling","typescript"],"latest_commit_sha":null,"homepage":"https://llmist.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zbigniewsobiecki.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-25T10:26:45.000Z","updated_at":"2026-01-12T17:11:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zbigniewsobiecki/llmist","commit_stats":null,"previous_names":["zbigniewsobiecki/llmist"],"tags_count":115,"template":false,"template_full_name":null,"purl":"pkg:github/zbigniewsobiecki/llmist","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbigniewsobiecki%2Fllmist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbigniewsobiecki%2Fllmist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbigniewsobiecki%2Fllmist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbigniewsobiecki%2Fllmist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zbigniewsobiecki","download_url":"https://codeload.github.com/zbigniewsobiecki/llmist/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zbigniewsobiecki%2Fllmist/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-framework","agents","ai","anthropic","bun","function-calling","gemini","generative-ai","llm","llm-framework","multi-provider","nodejs","openai","streaming","tool-calling","typescript"],"created_at":"2025-12-29T17:05:08.605Z","updated_at":"2026-01-16T11:54:52.352Z","avatar_url":"https://github.com/zbigniewsobiecki.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"llmist-icon.png\" alt=\"llmist\" width=\"128\" height=\"128\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003ellmist\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/zbigniewsobiecki/llmist/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/zbigniewsobiecki/llmist/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/zbigniewsobiecki/llmist\"\u003e\u003cimg src=\"https://codecov.io/gh/zbigniewsobiecki/llmist/graph/badge.svg?branch=dev\" alt=\"codecov\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/llmist\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/llmist.svg\" alt=\"npm version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eStreaming-first multi-provider LLM client in TypeScript with home-made tool calling\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003eThe flexible agent and tool layer for any LLM.\u003c/em\u003e\n\u003c/p\u003e\n\n---\n\n## Installation\n\n```bash\nnpm install llmist\n```\n\n## Packages\n\n| Package | Description |\n|---------|-------------|\n| [`llmist`](https://www.npmjs.com/package/llmist) | Core library - agents, gadgets, providers |\n| [`@llmist/cli`](https://www.npmjs.com/package/@llmist/cli) | Command-line interface |\n| [`@llmist/testing`](https://www.npmjs.com/package/@llmist/testing) | Testing utilities and mocks |\n\n## Core Capabilities\n\n### Gadget System (Home-Made Tool Calling)\n\nllmist implements its own tool calling syntax called \"gadgets\" - no native function calling or structured output required.\n\n- **[LLM- and streaming-friendly block format](https://llmist.dev/reference/block-format/)** — Tools execute the moment their block is parsed, not after the response completes\n- **[Built-in dependencies](https://llmist.dev/reference/block-format/#dependencies)** — DAG execution with parallel independent gadgets and sequential dependent ones\n- **Works with any model** — Any LLM that can follow instructions can use gadgets\n- **Configurable syntax markers** — Customize the block delimiters to fit your needs\n\n### Agent API\n\nLow-boilerplate, TypeScript-first API for building agents and subagents.\n\n- **[Fluent builder pattern](https://llmist.dev/library/getting-started/quick-start/)** — Chainable `.withModel()`, `.withGadgets()`, `.withHooks()` configuration\n- **Full TypeScript inference** — Gadget parameters are typed from Zod schemas, no assertions needed\n- **[Class \u0026 function gadgets](https://llmist.dev/library/guides/creating-gadgets/)** — Classes for complex tools, simple functions for quick ones\n- **[Subagent spawning](https://llmist.dev/library/advanced/subagents/)** — Nested agents for complex multi-step tasks\n\n### Hook System\n\nThree-layer architecture for deep integration with agent execution. [Learn more →](https://llmist.dev/library/guides/hooks/)\n\n- **Observers** — Read-only monitoring for logging and analytics\n- **Interceptors** — Synchronous transforms for modifying messages\n- **Controllers** — Async lifecycle control for flow management\n\nUse cases: observability, flow control, benchmarking, [human-in-the-loop](https://llmist.dev/library/guides/human-in-loop/), deep app/UI integration.\n\n### Multi-Provider Support\n\nFirst-class support for multiple LLM providers with unified API. [Learn more →](https://llmist.dev/library/providers/overview/)\n\n- **[OpenAI, Anthropic, Gemini, HuggingFace](https://llmist.dev/library/providers/overview/)** — Auto-discovery from environment variables\n- **Caching-aware** — Tracks cached vs. uncached tokens for accurate metrics\n- **[Built-in cost calculation](https://llmist.dev/library/guides/cost-tracking/)** — Real-time token counting and cost estimation\n- **[Multimodal](https://llmist.dev/library/advanced/multimodal/)** — Vision and image input support\n- **[Extensible](https://llmist.dev/library/advanced/custom-models/)** — Add custom providers or models\n\n### CLI \u0026 TUI\n\nDeveloper-first command-line experience for running and building agents. [Learn more →](https://llmist.dev/cli/getting-started/introduction/)\n\n- **[Config-driven](https://llmist.dev/cli/configuration/toml-reference/)** — TOML configuration for reusable profiles and templates\n- **[3rd party gadget system](https://llmist.dev/cli/gadgets/external-gadgets/)** — Load gadgets from local files, git URLs, or npm packages\n- **[Publish your own](https://llmist.dev/cli/gadgets/local-gadgets/)** — Write and easily share your gadgetry\n- **Raw LLM access** — Control over logging and direct access to request/response content\n- **[Interactive TUI](https://llmist.dev/cli/tui/overview/)** — Browse execution history, inspect raw payloads\n\n### Testing Infrastructure\n\nFull mocking for deterministic, LLM-free testing. [Learn more →](https://llmist.dev/testing/getting-started/introduction/)\n\n- **[MockBuilder](https://llmist.dev/testing/mocking/overview/)** — Fluent API for scripting mock responses\n- **[Gadget testing](https://llmist.dev/testing/gadgets/test-gadget/)** — `testGadget()` utility for isolated gadget tests\n- **Agent mocking** — Test full agent flows without API calls\n\n## Quick Start\n\n### Library\n\n```bash\nnpm install llmist\nexport OPENAI_API_KEY=\"sk-...\"  # or ANTHROPIC_API_KEY, GEMINI_API_KEY, HF_TOKEN\n```\n\n```typescript\nimport { LLMist, Gadget, z } from 'llmist';\n\nclass DialUp extends Gadget({\n  description: 'Simulates connecting to the internet via 56k modem',\n  schema: z.object({\n    phoneNumber: z.string().describe('ISP dial-up number'),\n    baud: z.enum(['14400', '28800', '33600', '56000']).default('56000'),\n  }),\n}) {\n  execute(params: this['params']): string {\n    return `ATDT ${params.phoneNumber}... CONNECT ${params.baud}. You've got mail!`;\n  }\n}\n\nconst answer = await LLMist.createAgent()\n  .withModel('sonnet')\n  .withGadgets(DialUp)\n  .askAndCollect('Connect me to AOL');\n```\n\n### CLI\n\n```bash\nnpm install -g @llmist/cli\n\n# Quick completion\nllmist complete \"Explain TypeScript generics\"\n\n# Run agent with local gadgets\nllmist agent \"Search for files\" --gadgets ./my-gadgets/\n\n# Use BrowseWeb subagent from Dhalsim for web automation\nllmist agent \"Find the iPhone 16 Pro price on apple.com\" --gadgets dhalsim/BrowseWeb\n```\n\nSee [Dhalsim](https://github.com/zbigniewsobiecki/dhalsim) for browser automation gadgets.\n\n### Testing\n\n```bash\nnpm install -D @llmist/testing\n```\n\n```typescript\nimport { testGadget, mockLLM, createMockClient } from '@llmist/testing';\n\n// Test gadgets in isolation\nconst result = await testGadget(new Calculator(), { a: 5, b: 3 });\nexpect(result.result).toBe('8');\n\n// Mock LLM responses for agent tests\nmockLLM()\n  .whenMessageContains('hello')\n  .returns('Hi there! How can I help?')\n  .register();\n\nconst agent = LLMist.createAgent()\n  .withClient(createMockClient());\n\nconst response = await agent.askAndCollect('hello');\n// Deterministic result, no API calls\n```\n\n## Documentation\n\nBrowse documentation at [llmist.dev](https://llmist.dev).\n\n## Examples\n\nAll examples are in the [`examples/`](/examples/) directory:\n\n```bash\nnpx tsx examples/01-basic-usage.ts\n```\n\nSee [`examples/README.md`](/examples/README.md) for the full list.\n\n## Development\n\n```bash\nnpm install\nnpm run build     # Build all packages\nnpm run test      # Test all packages\nnpm run lint      # Lint and format\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](/CONTRIBUTING.md) for guidelines.\n\n## License\n\nMIT - see [LICENSE](/LICENSE)\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/llmist\"\u003enpm\u003c/a\u003e •\n  \u003ca href=\"https://github.com/zbigniewsobiecki/llmist\"\u003eGitHub\u003c/a\u003e •\n  \u003ca href=\"https://github.com/zbigniewsobiecki/llmist/issues\"\u003eIssues\u003c/a\u003e\n\u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzbigniewsobiecki%2Fllmist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzbigniewsobiecki%2Fllmist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzbigniewsobiecki%2Fllmist/lists"}