{"id":47978733,"url":"https://github.com/zoobz-io/chit","last_synced_at":"2026-04-04T10:59:38.387Z","repository":{"id":345520779,"uuid":"1136947222","full_name":"zoobz-io/chit","owner":"zoobz-io","description":"Conversation lifecycle controller for LLM-powered applications","archived":false,"fork":false,"pushed_at":"2026-03-20T20:01:48.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-04T10:59:38.035Z","etag":null,"topics":["chatbot","conversation","go","golang","llm","zoobzio"],"latest_commit_sha":null,"homepage":"https://chit.zoobz.io","language":"Go","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/zoobz-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","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":"2026-01-18T16:40:43.000Z","updated_at":"2026-03-20T19:59:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zoobz-io/chit","commit_stats":null,"previous_names":["zoobz-io/chit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zoobz-io/chit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoobz-io%2Fchit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoobz-io%2Fchit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoobz-io%2Fchit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoobz-io%2Fchit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoobz-io","download_url":"https://codeload.github.com/zoobz-io/chit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoobz-io%2Fchit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31397056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"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":["chatbot","conversation","go","golang","llm","zoobzio"],"created_at":"2026-04-04T10:59:37.503Z","updated_at":"2026-04-04T10:59:38.368Z","avatar_url":"https://github.com/zoobz-io.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chit\n\n[![CI Status](https://github.com/zoobz-io/chit/workflows/CI/badge.svg)](https://github.com/zoobz-io/chit/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/zoobz-io/chit/graph/badge.svg?branch=main)](https://codecov.io/gh/zoobz-io/chit)\n[![Go Report Card](https://goreportcard.com/badge/github.com/zoobz-io/chit)](https://goreportcard.com/report/github.com/zoobz-io/chit)\n[![CodeQL](https://github.com/zoobz-io/chit/workflows/CodeQL/badge.svg)](https://github.com/zoobz-io/chit/security/code-scanning)\n[![Go Reference](https://pkg.go.dev/badge/github.com/zoobz-io/chit.svg)](https://pkg.go.dev/github.com/zoobz-io/chit)\n[![License](https://img.shields.io/github/license/zoobz-io/chit)](LICENSE)\n[![Go Version](https://img.shields.io/github/go-mod/go-version/zoobz-io/chit)](go.mod)\n[![Release](https://img.shields.io/github/v/release/zoobz-io/chit)](https://github.com/zoobz-io/chit/releases)\n\nConversation lifecycle controller for LLM-powered applications.\n\nManage user conversations, orchestrate pluggable processors, and stream responses — while keeping internal reasoning separate from what users see.\n\n## The Conversation Belongs to You\n\nYour processor receives input and read-only history. What it does with an LLM is its own business.\n\n```go\n// Processor handles reasoning — how it talks to LLMs is an implementation detail\nprocessor := chit.ProcessorFunc(func(ctx context.Context, input string, history []chit.Message) (chit.Result, error) {\n    // history is the user-facing conversation (read-only)\n    // Internal LLM calls, chain-of-thought, tool use — none of it pollutes history\n    response := callYourLLM(input, history)\n    return \u0026chit.Response{Content: response}, nil\n})\n\n// Emitter streams output to the user\nemitter := \u0026StreamingEmitter{writer: w}\n\n// Chat manages the lifecycle\nchat := chit.New(processor, emitter)\n\n// Handle user input — chit manages history, you manage reasoning\nchat.Handle(ctx, \"What's the weather in Tokyo?\")\n```\n\nThe user sees a clean conversation. Your processor can have elaborate internal dialogues with the LLM — retries, tool calls, multi-step reasoning — and none of it leaks through.\n\n## Install\n\n```bash\ngo get github.com/zoobz-io/chit\n```\n\nRequires Go 1.24+.\n\n## Quick Start\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"fmt\"\n\n    \"github.com/zoobz-io/chit\"\n)\n\n// SimpleEmitter collects messages for demonstration\ntype SimpleEmitter struct {\n    Messages []chit.Message\n}\n\nfunc (e *SimpleEmitter) Emit(_ context.Context, msg chit.Message) error {\n    e.Messages = append(e.Messages, msg)\n    fmt.Printf(\"[%s]: %s\\n\", msg.Role, msg.Content)\n    return nil\n}\nfunc (e *SimpleEmitter) Push(_ context.Context, _ chit.Resource) error { return nil }\nfunc (e *SimpleEmitter) Close() error                                  { return nil }\n\nfunc main() {\n    // Processor returns responses or yields for multi-turn\n    processor := chit.ProcessorFunc(func(_ context.Context, input string, history []chit.Message) (chit.Result, error) {\n        // First message — ask for clarification\n        if len(history) == 1 {\n            return \u0026chit.Yield{\n                Prompt: \"Which city would you like weather for?\",\n                Continuation: func(_ context.Context, city string, _ []chit.Message) (chit.Result, error) {\n                    return \u0026chit.Response{Content: fmt.Sprintf(\"Weather in %s: Sunny, 22°C\", city)}, nil\n                },\n            }, nil\n        }\n        return \u0026chit.Response{Content: \"Hello! How can I help?\"}, nil\n    })\n\n    emitter := \u0026SimpleEmitter{}\n    chat := chit.New(processor, emitter)\n\n    // First call yields, asking for more info\n    chat.Handle(context.Background(), \"What's the weather?\")\n    // [assistant]: Which city would you like weather for?\n\n    // Second call resumes with the answer\n    chat.Handle(context.Background(), \"Tokyo\")\n    // [assistant]: Weather in Tokyo: Sunny, 22°C\n\n    // History tracked automatically\n    fmt.Printf(\"Conversation has %d messages\\n\", len(chat.History()))\n}\n```\n\n## Capabilities\n\n| Feature | Description | Docs |\n|---------|-------------|------|\n| Processor Interface | Pluggable reasoning with read-only history | [Concepts](docs/1.learn/3.concepts.md) |\n| Yield \u0026 Continue | Multi-turn conversations via continuations | [Concepts](docs/1.learn/3.concepts.md) |\n| Pipeline Resilience | Retry, timeout, circuit breaker via [pipz](https://github.com/zoobz-io/pipz) | [Reliability](docs/2.guides/3.reliability.md) |\n| Emitter Abstraction | Stream responses, push resources | [Architecture](docs/1.learn/4.architecture.md) |\n| Signal Observability | Lifecycle events via [capitan](https://github.com/zoobz-io/capitan) | [Architecture](docs/1.learn/4.architecture.md) |\n| Testing Utilities | Mock processors and emitters | [Testing](docs/2.guides/1.testing.md) |\n\n## Why chit?\n\n- **Clean separation** — User conversation stays clean; internal LLM reasoning is processor's business\n- **Turn-taking built in** — Yield/Continue pattern for multi-turn without manual state management\n- **Pipeline-native** — Wrap with [pipz](https://github.com/zoobz-io/pipz) for retry, timeout, rate limiting, circuit breakers\n- **Observable** — Lifecycle signals via [capitan](https://github.com/zoobz-io/capitan) without instrumentation code\n- **Bring your own LLM** — Processor interface works with any LLM client or framework\n\n## Bring Your Own Reasoning\n\nChit manages the conversation lifecycle. How you reason is up to you.\n\n```go\n// Use zyn for typed LLM interactions\nprocessor := chit.ProcessorFunc(func(ctx context.Context, input string, history []chit.Message) (chit.Result, error) {\n    // Create internal session — separate from user history\n    session := zyn.NewSession()\n    session.Append(zyn.RoleSystem, \"You are a helpful assistant.\")\n\n    // Add user context\n    for _, msg := range history {\n        session.Append(zyn.Role(msg.Role), msg.Content)\n    }\n\n    // Call LLM — internal retries, tool use, etc. stay internal\n    response, _ := synapse.Process(ctx, session)\n    return \u0026chit.Response{Content: response}, nil\n})\n\n// Add resilience via pipz options\nchat := chit.New(processor, emitter,\n    chit.WithRetry(3),\n    chit.WithTimeout(30*time.Second),\n    chit.WithCircuitBreaker(5, time.Minute),\n)\n```\n\nYour processor implementation can use [zyn](https://github.com/zoobz-io/zyn) for typed synapses, raw API calls, or any other approach. Chit doesn't care — it just manages what the user sees.\n\n## Documentation\n\n- **Learn**\n  - [Overview](docs/1.learn/1.overview.md) — Purpose and design philosophy\n  - [Quickstart](docs/1.learn/2.quickstart.md) — Get started in minutes\n  - [Concepts](docs/1.learn/3.concepts.md) — Processors, results, emitters, history\n  - [Architecture](docs/1.learn/4.architecture.md) — Internal design and pipeline integration\n- **Guides**\n  - [Testing](docs/2.guides/1.testing.md) — Mock processors and emitters\n  - [Troubleshooting](docs/2.guides/2.troubleshooting.md) — Common issues and solutions\n  - [Reliability](docs/2.guides/3.reliability.md) — Retry, timeout, circuit breakers\n- **Reference**\n  - [API](docs/4.reference/1.api.md) — Complete function documentation\n  - [Types](docs/4.reference/2.types.md) — Message, Result, Response, Yield\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## License\n\nMIT License — see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoobz-io%2Fchit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoobz-io%2Fchit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoobz-io%2Fchit/lists"}