Issues and pull requests are welcome. Please read this guide before opening a PR.
git clone https://github.com/skyforce77/tinyagents.git
cd tinyagents
go mod downloadGo 1.24 or later is required. No additional build tools are needed for the core library; examples with external services (Ollama, Anthropic, OpenAI) require the respective credentials and running services.
go test -race ./...
go vet ./...CI runs both commands on every push and pull request. A PR cannot merge while either command reports failures. If you add a new package, add tests in the same commit — a package without tests will block the CI race check.
golangci-lint run is also expected to pass. Install it with:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest- One commit per roadmap deliverable. Commit subjects follow the pattern used in
the existing history:
M0.X:,M1.X:,M2.X:,M3.X:,M4.X:,M5.X:. If your change does not map to a milestone, use a plain imperative subject. - Subject line: 72 characters maximum, imperative mood ("Add…", "Fix…", "Remove…").
- Body lines: wrap at 72 characters. Explain why, not just what.
- Never include a
Co-Authored-By:trailer.
M3.2: add Debate team coordinator
Two debater agents exchange N rounds of arguments and then an arbiter
agent produces a final verdict. All three speak Prompt/Response, so
Debate nests inside any other team coordinator.
- Target
master. Rebase ontomasterbefore opening the PR; do not mergemasterinto your branch (no merge commits). - Link the related issue in the PR description when one exists.
- Each PR should do one thing. Refactoring, feature work, and test fixes belong in separate PRs unless they are inseparable.
- Keep the diff reviewable: prefer smaller, focused commits over one large squash.
go vet ./...andgolangci-lint runmust both pass.- Prefer interfaces over concrete types at package boundaries.
- Every exported symbol must have a godoc comment. Match the voice and style of
pkg/supervisor/restart.goorpkg/mailbox/mailbox.go: short first sentence ending with a period, expand with additional paragraphs when needed. - Avoid abbreviations in exported names (
maxRestartsis fine in a struct field;mris not). Single-letter variables are acceptable inside short closures. - Do not add
//nolintdirectives without a comment explaining the exception.
- Every new package needs at least one
_test.gofile that exercises the public API under the race detector (go test -race). - Use
net/http/httptestfor adapters that call external HTTP APIs; do not make real network calls in tests. - Do not use
time.Sleepas a synchronization mechanism. Poll with a deadline (context.WithTimeout) or use channels instead. - Table-driven tests are preferred for coverage of multiple input shapes.
When opening a bug report, please include:
- Go version (
go version) - OS and architecture
- A minimal, self-contained reproduction (ideally a single
main.goor a test) - The full error output and any relevant log lines
- Expected behaviour vs. actual behaviour
Use the bug report template.
By contributing to tinyagents, you agree that your changes will be licensed under the GNU Affero General Public License v3.0 (AGPL-3.0), the same license that governs the rest of the project.