{"id":30770083,"url":"https://github.com/ostafen/suricata","last_synced_at":"2025-09-04T23:05:04.703Z","repository":{"id":310102058,"uuid":"1037993396","full_name":"ostafen/suricata","owner":"ostafen","description":"Type-safe AI agents for Go. Suricata combines LLM intelligence with Go’s strong typing, declarative YAML specs, and code generation to build safe, maintainable, and production-ready AI agents.","archived":false,"fork":false,"pushed_at":"2025-08-15T17:48:47.000Z","size":1368,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-15T19:39:52.175Z","etag":null,"topics":["ai-agents","ai-framework","code-generation","developer-tools","go","go-templates","golang","large-language-models","llm","prompt-engineering","sdk-go","structured-prompts","type-safety","yaml"],"latest_commit_sha":null,"homepage":"","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/ostafen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2025-08-14T12:55:54.000Z","updated_at":"2025-08-15T17:48:51.000Z","dependencies_parsed_at":"2025-08-15T19:39:58.739Z","dependency_job_id":"76810ad9-f876-4835-817c-7d261e8bd345","html_url":"https://github.com/ostafen/suricata","commit_stats":null,"previous_names":["ostafen/suricata"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ostafen/suricata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ostafen%2Fsuricata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ostafen%2Fsuricata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ostafen%2Fsuricata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ostafen%2Fsuricata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ostafen","download_url":"https://codeload.github.com/ostafen/suricata/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ostafen%2Fsuricata/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273685604,"owners_count":25149722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ai-agents","ai-framework","code-generation","developer-tools","go","go-templates","golang","large-language-models","llm","prompt-engineering","sdk-go","structured-prompts","type-safety","yaml"],"created_at":"2025-09-04T23:03:13.084Z","updated_at":"2025-09-04T23:05:04.686Z","avatar_url":"https://github.com/ostafen.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg alt=\"Logo\" src=\"assets/logo.png\" width=\"300px\"\u003e\n\u003c/p\u003e\n\u003ch2 align=\"center\"\u003eType-Safe AI Agents for Go.\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n  ⚠️ \u003cstrong\u003eNote:\u003c/strong\u003e Suricata is in early development. Some bugs may exist. Please report issues!\n\n\n## Why Suricata?\n\nMost LLM integrations rely on unstructured text—hard to maintain, easy to break, and impossible to type-check. **Suricata fixes this** by:\n\n- Generating strongly typed Go code for every message and tool\n\n- Providing compile-time guarantees with fewer runtime surprises\n\n- Separating business logic from orchestration for cleaner code\n\nInstead of wiring prompts and parsing JSON, you declare everything in YAML, generate Go stubs, and let Suricata handle orchestration.\nAgents can dynamically choose tools at runtime—while you keep full control and type safety.\n\nAdding a new tool? Define it in YAML and regenerate—no runtime edits needed. Suricata follows Go idioms, so your agents feel native.\n\n**In short**: Suricata blends LLM intelligence, Go type safety, and a declarative workflow—giving you confidence to build production-ready AI agents.\n\n## Features\n\n- **Type-Safe by Design** – Define messages in YAML, generate Go types with compile-time guarantees.\n\n- **Declarative Agents** – Describe behavior and prompts in YAML; Suricata handles orchestration.\n\n- **Dynamic Tooling** – Register tools once, let agents choose at runtime.\n\n- **Idiomatic Go Code** – Automatic stub generation, Go templates for dynamic prompts, and easy testing.\n\n## Quickstart\n\nGetting started with Suricata is simple: **declare your agents and tools in YAML, generate Go code, and start building type-safe AI workflows.**\n\n### 1. Define Your Specification\n\nCreate a `hello-spec.yml` file describing your **messages**, **tools**, and **agents**:\n\n```yaml\n\nversion: 0.0.1\npackage: example.hello\n\nmessages:\n  SayHelloAllRequest:\n    fields:\n      - name: names\n        type: string\n        repeated: true\n  SayHelloAllReply:\n    fields:\n      - name: ok\n        type: bool\n  SayHelloToolRequest:\n    fields:\n      - name: name\n        type: string\n  SayHelloToolReply:\n    fields:\n      - name: ok\n        type: bool\n\ntools:\n  SayHelloTool:\n    description: \"Say hello to a given name\"\n    input: SayHelloToolRequest\n    output: SayHelloToolReply\n\nagents:\n  HelloAgent:\n    instructions: |\n      You are a helpful and precise assistant. Your role is to say hello to people.\n    actions:\n      SayHelloAll:\n        description: \"Say hello to all names given as input\"\n        input: SayHelloAllRequest\n        output: SayHelloAllReply\n        prompt: |\n           {{- /* Use Go templating for dynamic prompts */ -}}\n          Please say hello to all the following names:\n          {{- range .Names }}\n          - {{ . }}\n          {{- end }}\n    tools:\n      - SayHelloTool\n```\n\nThis file is your **single source of truth**:\n\n- **Messages** define type-safe request and response payloads.\n- **Tools** describe external functions the agent can call.\n- **Agents** specify behavior, actions, and prompts using Go templates for dynamic content.\n\n### 2. Generate Go Code\n\nRun the generator to produce fully typed Go stubs:\n\n```bash\nsuricata gen hello-spec.yml\n```\n\nThis creates:\n\n- Strongly typed structs for messages\n- Interfaces for tools\n- An idiomatic Go client for your agent\n\n### 3. Implement and Run\n\nUse the generated code in your Go app:\n\n```golang\nfunc main() {\n\tinvoker := ollama.NewInvoker(\n\t\tollama.DefaultBaseURL,\n\t\t\"granite3.3:8b\",\n\t\tollama.Options{\n\t\t\tNumCtx:      131072,\n\t\t\tTemperature: 0.1,\n\t\t},\n\t)\n\n\thelloAgent := hello.NewHelloAgent(invoker, \u0026tools{})\n\n\tres, err := helloAgent.SayHelloAll(context.Background(), \u0026hello.SayHelloAllRequest{\n\t\tNames: []string{\"Pippo\", \"Pluto\"},\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(res.Ok)\n}\n\ntype tools struct{}\n\nfunc (t *tools) SayHelloTool(ctx context.Context, in *hello.SayHelloToolRequest) (*hello.SayHelloToolReply, error) {\n\tfmt.Println(\"Hello \" + in.Name)\n\n\treturn \u0026hello.SayHelloToolReply{Ok: true}, nil\n}\n```\n\nThat's it — you've built a type-safe AI agent that can dynamically select tools while keeping your Go code clean and maintainable.\n\n## 📄 License\n\n`MIT` License. See `LICENSE` for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fostafen%2Fsuricata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fostafen%2Fsuricata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fostafen%2Fsuricata/lists"}