{"id":38763395,"url":"https://github.com/pancsta/secai","last_synced_at":"2026-03-11T09:09:18.988Z","repository":{"id":287886856,"uuid":"965720676","full_name":"pancsta/secai","owner":"pancsta","description":"Reasoning AI Workflows (devtools included)","archived":false,"fork":false,"pushed_at":"2026-03-09T20:15:37.000Z","size":358,"stargazers_count":86,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-10T00:41:04.619Z","etag":null,"topics":["agents","ai","asyncmachine","bots","context","diagrams","graph","instructor","llm","management","reasoning","repl","sqlite","workflows"],"latest_commit_sha":null,"homepage":"https://ai-gents.work","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pancsta.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":"ROADMAP.md","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-04-13T19:06:36.000Z","updated_at":"2026-03-09T20:15:36.000Z","dependencies_parsed_at":"2026-01-17T12:38:38.755Z","dependency_job_id":null,"html_url":"https://github.com/pancsta/secai","commit_stats":null,"previous_names":["pancsta/secai"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/pancsta/secai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pancsta%2Fsecai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pancsta%2Fsecai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pancsta%2Fsecai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pancsta%2Fsecai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pancsta","download_url":"https://codeload.github.com/pancsta/secai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pancsta%2Fsecai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30376810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T06:09:32.197Z","status":"ssl_error","status_checked_at":"2026-03-11T06:09:17.086Z","response_time":84,"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":["agents","ai","asyncmachine","bots","context","diagrams","graph","instructor","llm","management","reasoning","repl","sqlite","workflows"],"created_at":"2026-01-17T11:59:03.975Z","updated_at":"2026-03-11T09:09:18.981Z","avatar_url":"https://github.com/pancsta.png","language":"Go","readme":"# secai\n\n**secai** is a Golang framework for _Reasoning AI Workflows_, implemented using a unique state machine which thrives in\ncomplexity. It's a solid foundation for complex, proactive, and **long-lived AI Agents** with deep and structured\nmemory. Each bot ships with embedded devtools and several UIs. The execution flow is graph-based, which allows for\nprecise behavior modeling of agents, including interruptions, concurrency, and fault tolerance.\n\nIt's a sophisticated replacement for frameworks like LangGraph and offers deeply relational consensus of state.\n\n* Demos\n  * [v0.5 - Fully Embedded](#v05---fully-embedded)\n  * [v0.4 - Local One](#v04---catch-up)\n  * [v0.2 - User Demo](#v02---user-demo)\n  * [v0.1 - Platform Demo](#v01---platform-demo)\n* [Features](#features)\n* [Implementation](#implementation)\n* [Try It](#try-it)\n  * [Schema Examples](#schema-examples)\n* [Documentation](#documentation)\n* [Getting Started](#getting-started)\n* [Differences](#differences)\n* [Scripting](#bash-scripts)\n\n## v0.5 - Fully Embedded\n\n[Live debugger](https://ai-gents.work/devtools) | [Live SQL](https://ai-gents.work/data-cook) | [Read logs](https://ai-gents.work/demo/cook.html)\n | [Browse files](https://ai-gents.work/demo)\n\n\u003cdiv align=\"center\" class=\"video\"\u003e\n    \u003ca href=\"https://ai-gents.work/assets/demo/imgs/demo.gif\"\u003e\n        \u003cimg width=\"420px\"\n            src=\"https://github.com/user-attachments/assets/a9fcd634-1b37-4add-800b-ca8c06865279\"\n            alt=\"AI-gent Cook\" /\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\n\u003ctable\u003e\n\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003eDebugger\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eREPL\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eDB\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eDB\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eLog\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://ai-gents.work/demo/imgs/am-dbg.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://ai-gents.work/demo/imgs/repl.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://ai-gents.work/demo/imgs/db1.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://ai-gents.work/demo/imgs/db2.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://ai-gents.work/demo/imgs/log.png\"/\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003eDashboard\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://ai-gents.work/demo/imgs/dashboard.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eClick to see the diagram\u003c/summary\u003e\n\n\u003cimg src=\"https://ai-gents.work/demo/_diagram.svg\" /\u003e\n\u003c/details\u003e\n\n## v0.4 - Local One\n\nAI-gent Cook on _qwen3-vl-30b_\n\n\u003cdiv align=\"center\" class=\"video\"\u003e\n    \u003ca href=\"https://ai-gents.work/assets/demo-v0.4/_demo.gif\"\u003e\n        \u003cimg width=\"420px\"\n            src=\"https://github.com/user-attachments/assets/a387b00f-c2ba-444c-9b58-381d1425edfb\"\n            alt=\"AI-gent Cook\" /\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eClick to see the diagram\u003c/summary\u003e\n\n\u003cimg src=\"https://ai-gents.work/assets/demo-v0.4/_diagram.svg\" /\u003e\n\u003c/details\u003e\n\n## v0.2 - User Demo\n\nScreenshots and [YouTube](https://youtu.be/rbwXg64poBE) are also available.\n\n\u003cp align=\"center\"\u003e\u003ca href=\"https://pancsta.github.io/assets/secai/demo2/secai-demo2.mp4\"\u003e\u003cimg src=\"https://pancsta.github.io/assets/secai/demo2/demo2.png?\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003e [!NOTE]\n\u003e User demo (7m captions-only) showcasing a cooking assistant which helps to pick a recipe from ingredients AND cook it.\n\n\u003cdetails\u003e\n  \u003csummary\u003eClick to see screenshots\u003c/summary\u003e\n\n\u003ctable\u003e\n\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003eIntro\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eAI-gent Cook\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eDebugger 1\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eDebugger 2\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eMemory \u0026 Stories\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/demo2/1.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/demo2/2.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/demo2/3.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/demo2/4.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/demo2/5.png\"/\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003eUser Interfaces\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eOutro\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u0026nbsp;\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u0026nbsp;\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u0026nbsp;\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/demo2/6.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/demo2/7.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u0026nbsp;\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e \n        \u0026nbsp;\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u0026nbsp;\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\n    \u003ctd align=\"center\" colspan=\"5\"\u003eDiagram\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" colspan=\"5\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/cook.svg\"/\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\n\u003c/table\u003e\n\u003c/details\u003e\n\n## v0.1 - Platform Demo\n\nScreenshots and [YouTube](https://youtu.be/0VJzO1S-gV0) are also available.\n\n\u003cp align=\"center\"\u003e\u003ca href=\"https://pancsta.github.io/assets/secai/demo1/secai-demo1.mp4\"\u003e\u003cimg src=\"https://pancsta.github.io/assets/secai/demo1/demo1.png\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003e [!NOTE]\n\u003e Platform demo (5m captions-only), showcasing all nine ways an agent can be seen, in addition to the classic chat view.\n\n\u003cdetails\u003e\n  \u003csummary\u003eClick to see screenshots\u003c/summary\u003e\n\n\u003ctable\u003e\n\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003eSVG graph\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eam-dbg\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eGrafana\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eJaeger\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eREPL\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/demo1/1.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/demo1/2.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/demo1/3.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/demo1/4.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/demo1/5.png\"/\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003eSQL\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eIDE\u003c/td\u003e\n    \u003ctd align=\"center\"\u003eBash\u003c/td\u003e\n    \u003ctd align=\"center\"\u003ePrompts\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u0026nbsp;\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/demo1/6.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/demo1/7.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/demo1/8.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/demo1/9.png\"/\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n        \u0026nbsp;\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\n    \u003ctd align=\"center\" colspan=\"5\"\u003eDiagram\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" colspan=\"5\"\u003e\n        \u003cimg src=\"https://pancsta.github.io/assets/secai/deepresearch.svg\"/\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\n\u003c/table\u003e\n\u003c/details\u003e\n\n## Features\n\n- multi-prompt agency\n  - a single agent/bot is built of several AI prompts\n  - each state can have a prompt bound to it, with dedicated history and documents\n- atomic consensus with relations and negotiation\n  - eg states excluding each other can't be active simultaneously\n- dedicated DSL layer for bot schema \n  - suitable for non-coding authors\n- structured prompt input/output via JSON schemas\n- declarative flow definitions for non-linear flows\n- cancellation support (interrupts)\n- choice menu (list of offers)\n- prompt history\n  - embedded SQLite\n  - JSONL log\n  - \"latest prompt\" files\n- proactive stories with actors\n  - stories have actions and progress\n- LLM-sourced story switching (orienting)\n  - on prompts and timeouts\n- dynamic flow graph for the memory\n  - LLM creates an actionable state-machine\n- TUIs and WebAssembly PWAs for user interfaces\n\n### Goals\n\n- precision\n- correctness\n- granular debugging\n\n### Devtools\n\nAll devtools are available on the web, some also as TUIs, and some as regular files. Everything is shipped as a single\nfile.\n\n- debugger\n- REPL\n- diagrams (D2 SVGs)\n- DB browser\n- log viewer\n- observability (OpenTelemetry, Prometheus, Loki)\n\n### Tools\n\n- websearch (dockerized [searxng](https://github.com/searxng/searxng))\n- HTML scrape (embedded [colly](https://github.com/gocolly/colly))\n\n## Implementation\n\n- Golang \u0026 WASM\n- [asyncmachine-go](https://asyncmachine.dev) for graph control flow\n- [instructor-go](https://github.com/instructor-ai/instructor-go) for AI APIs\n- [invopop/jsonschema](https://github.com/invopop/jsonschema) for prompt schemas\n- [aRPC](https://asyncmachine.dev/rpc) for network transparency\n  - a single agent can span across multiple servers and browsers\n- [cview](https://codeberg.org/tslocum/cview) for TUIs\n- [go-app](https://go-app.dev/) for web UIs\n- [ncruces](https://github.com/ncruces/go-sqlite3) for SQLite\n\n### Architecture\n\n- Agent (actor)\n  - state-machine schema\n  - prompts\n  - tools\n- Tool (actor)\n  - state-machine schema\n- Memory\n  - state-machine schema\n- Prompt (state)\n  - params schema\n  - result schema\n  - history log\n  - documents\n- Stories (state)\n  - actors (state machines)\n  - actions\n  - progress\n- Document\n  - title\n  - content\n\n## Try It\n\n- [Download a binary release](https://github.com/pancsta/secai/releases/latest) of AI-gent Cook (Linux, macOS, Windows)\n\n```markdown\n$ ./ai-gent-cook\nAI-gent Cook v0.5.0\n\nWeb:\n- http://localhost:12854\n- http://localhost:12854/agent\n\nFiles:\n- config: config.kdl\n- log:    tmp-cook/cook.jsonl\n\nTUI:\n- http://localhost:7856\n- ssh localhost -p 7955 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no\n\nREPL:\n- http://localhost:13179\n- ./cook repl\n\nLog:\n- http://localhost:12858\n- ./cook log --tail\n- tail -f tmp-cook/cook.jsonl -n 100 | fblog -d -x msg -x time -x level\n\nDebugger:\n- http://localhost:13178\n- files: http://localhost:13171\n- ssh localhost -p 13172 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no\n\nDB:\n- Base: http://localhost:13180\n- Agent: http://localhost:13181\n- History: http://localhost:13182\n\nhttps://AI-gents.work\n```\n## Schema Examples\n\nCode snippets from state and prompt schemas of `examples/cook`. Both schemas are pure and debuggable Golang code.\n\n### State Schema\n\n```go\n// CookStatesDef contains all the states of the Cook state machine.\ntype CookStatesDef struct {\n\t*am.StatesBase\n\n\t// ...\n\n\t// prompts\n\n\tRestoreJokes string\n\tGenJokes     string\n\tJokesReady   string\n\n\tGenSteps string\n\t// StepsReady implies the steps have been translated into actionable memory.\n\tStepsReady string\n\n\tGenStepComments   string\n\tStepCommentsReady string\n\n\t// inherit from AgentLLM\n\t*ssllm.AgentLLMStatesDef\n}\n\n// ...\n\n// CookSchema represents all relations and properties of CookStates.\nvar CookSchema = SchemaMerge(\n\t// inherit from AgentLLM\n\tssllm.LLMAgentSchema,\n\tam.Schema{\n        \n\t\t// gen AI\n\n\t\tssC.RestoreJokes: {\n\t\t\tAuto:    true,\n\t\t\tRequire: S{ssC.DBReady, ssC.CharacterReady},\n\t\t\tRemove:  sgC.Jokes,\n\t\t},\n\t\tssC.GenJokes: {\n\t\t\tRequire: S{ssC.CharacterReady, ssC.DBReady},\n\t\t\tRemove:  sgC.Jokes,\n\t\t\tTags:    S{ssbase.TagPrompt},\n\t\t},\n\t\tssC.JokesReady: {Remove: sgC.Jokes},\n\n\t\tssC.GenSteps: {\n\t\t\tAuto:    true,\n\t\t\tRequire: S{ssC.StoryCookingStarted},\n\t\t\tRemove:  S{ssC.StepsReady},\n\t\t\tTags:    S{ssbase.TagPrompt},\n\t\t},\n\t\tssC.StepsReady: {\n\t\t\tRequire: S{ssC.RecipeReady},\n\t\t\tRemove:  S{ssC.GenSteps},\n\t\t},\n\n\t\tssC.GenStepComments: {\n\t\t\tAuto:    true,\n\t\t\tRequire: S{ssC.StoryCookingStarted, ssC.StepsReady},\n\t\t\tRemove:  S{ssC.StepCommentsReady},\n\t\t\tTags:    S{ssbase.TagPrompt},\n\t\t},\n\t\tssC.StepCommentsReady: {Remove: S{ssC.GenStepComments}},\n\n\t\tssC.Orienting: {\n\t\t\tMulti: true,\n\t\t\tTags:  S{ssbase.TagPrompt},\n\t\t},\n\t\tssC.OrientingMove: {},\n\t})\n```\n\n### Prompt Schema\n\nThe comments attached to `Params*` and `Result*` are sent over to AI models.\n\n```go\n// RECIPE\n\ntype PromptRecipePicking = secai.Prompt[ParamsRecipePicking, ResultRecipePicking]\n\nfunc NewPromptRecipePicking(agent shared.AgentBaseAPI) *PromptRecipePicking {\n\treturn secai.NewPrompt[ParamsRecipePicking, ResultRecipePicking](\n\t\tagent, ss.StoryRecipePicking, `\n\t\t\t- You're a database of cooking recipes.\n\t\t`, `\n\t\t\t1. Suggest recipes based on user's ingredients.\n\t\t\t2. If possible, find 1 extra recipe, which is well known, but 1-3 ingredients are missing.\n\t\t\t3. Summarize the propositions using the character's personality.\n\t\t`, `\n\t\t\t- Limit the amount of recipes to the requested number (excluding the extra recipe).\n\t\t\t- Include an image URL per each recipe\n\t\t`)\n}\n\ntype Recipe struct {\n\tName  string\n\tDesc  string\n\tSteps string\n}\n\ntype ParamsRecipePicking struct {\n\t// List of available ingredients.\n\tIngredients []Ingredient\n\t// The number of recipes needed.\n\tAmount int\n}\n\ntype ResultRecipePicking struct {\n\t// List of proposed recipes\n\tRecipes []Recipe\n\t// Extra recipe with unavailable ingredients.\n\tExtraRecipe Recipe\n\t// Message to the user, summarizing the recipes. Max 3 sentences.\n\tSummary string\n}\n\n// ...\n\nvar StoryRecipePicking = \u0026shared.Story{\n\tStoryInfo: shared.StoryInfo{\n\t\tState: ss.StoryRecipePicking,\n\t\tTitle: \"Recipe Picking\",\n\t\tDesc:  \"The bot offers some recipes, based on the ingredients.\",\n\t},\n\tAgent: shared.StoryActor{\n\t\tTrigger: amhelp.Cond{\n\t\t\tIs:  am.S{ss.Ready, ss.IngredientsReady},\n\t\t\tNot: am.S{ss.RecipeReady},\n\t\t},\n\t},\n}\n```\n\nRead the full [state schema](examples/cook/states/ss_cook.go) and [prompt schema](examples/cook/schema/sa_cook.go).\n\n## Documentation\n\n- secai: [API](https://pkg.go.dev/github.com/pancsta/secai) / [Docs](https://github.com/pancsta/secai/wiki/Developer-Docs)\n- [asyncmachine-go](https://asyncmachine.dev): [API](https://pkg.go.dev/github.com/pancsta/asyncmachine-go/pkg/machine) / [Docs](https://github.com/pancsta/asyncmachine-go/blob/main/docs/manual.md)\n- [instructor-go](https://github.com/instructor-ai/instructor-go): [API](https://pkg.go.dev/github.com/instructor-ai/instructor-go) / [Docs](https://go.useinstructor.com/)\n- [cview](https://codeberg.org/tslocum/cview): [API](https://pkg.go.dev/codeberg.org/tslocum/cview)\n\n## Getting Started\n\nWe can use one of the examples as a starting template. It allows for further semver updates of the base framework.\n\n1. Choose the source example\n   - `export SECAI_EXAMPLE=cook`\n   - `export SECAI_EXAMPLE=research` (broken since `v0.4.0`)\n2. `git clone https://github.com/pancsta/secai.git`\n3. install task `./secai/scripts/deps.sh`\n4. copy the agent `cp -R secai/examples/$SECAI_EXAMPLE MYAGENT`\n5. `cd MYAGENT \u0026\u0026 go mod init github.com/USER/MYAGENT`\n6. get fresh configs\n   1. `task sync-taskfile`\n   2. `task sync-configs`\n7. start it `task start`\n8. look around `task --list-all`\n9. configure the bot `$EDITOR config.kdl`\n\n## Differences\n\n**secai** differs from other AI agents / workflows frameworks in the way it treats AI prompts. Most frameworks call each\nprompt an \"agent\", while **secai** treats prompts as simple DB queries with IoC (Inversion of Control). Tool usage\nhappens manually through typesafe params / results. This approach increases determinism, safety, and overfall control.\nThis multi-prompt workflow forms an actual **bot** / **agent**. This does not mean agents can't be composed into larger\ngroups, which happens simply on the state level (via piping / aRPC), as the underlying workflow engine (asyncmachine)\ndoesn't depend on AI at all.\n\nThe flow graph, unlike in regular workflows, is not path-based - each node (state) can be activated anytime (same as calling a function),\nand the edges between nodes are meant to resolve the **state consensus**. It's a directed multi-graph of states with a \nnegotiation phase.\n\n## Scripting\n\n`arpc` offers CLI access to remote agents, including subscription. It's perfect for quick and simple integrations, scripts, or experiments.\n\nExample: `$ arpc -f tmp/research.addr -- when . Requesting \u0026\u0026 echo \"REQUESTING\"`\n\n1. Connect to the address from `tmp/research.addr`\n2. When the last connected agent (`.`) goes into state `Requesting`\n3. Print \"REQUESTING\" and exit\n\n## License\n\nTo help keep AI open, this project migrated to **GPL** starting from `v0.3.0`.\n\n## Acknowledgements\n\n- [AtomicAgents](https://github.com/BrainBlend-AI/atomic-agents)\n- [SecretAgent Soma.fm](https://somafm.com/secretagent/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpancsta%2Fsecai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpancsta%2Fsecai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpancsta%2Fsecai/lists"}