ttasks-net is an experimental .NET port of the ttasks task runtime. It provides typed tasks, dependency graphs, executors, stores, and an ASP.NET chat harness that lets an LLM plan work while the host controls capabilities, validation, execution, and persistence.
The project explores a safer pattern for LLM-assisted task execution:
- model plans graph shape and summarizes results
- host owns tool/capability policy
- executable payloads are resolved host-side
- reusable task templates accumulate in a task library
- graph runs, task payloads, outputs, errors, and metadata are inspectable
| Project | Purpose |
|---|---|
Ttasks.Core | Core task model, graph scheduler, executor, events, in-memory store, SQLite store, and LLM session integration. |
Ttasks.ChatApp | ASP.NET chat experiment with routing, graph planning, capability policies, task library, admin pages, and SQLite persistence. |
Ttasks.Tests | xUnit coverage for the core runtime, conformance behavior, stores, LLM integration, and chat app experiment. |
- task types for Bash, PowerShell, structured process argv, prompt, and agent work
- dependency-aware
TaskGraphexecution with parallel workers - retry, timeout, cancellation, blocking, and result capture
- in-memory and SQLite-backed stores
- LLM prompt handlers through GitHub Copilot SDK integration
- browser chat app with per-page shared sessions and replacement system prompt
- SQLite-backed allowed-tool capability boundary seeded from config and editable at runtime (prefix is the policy)
- task library with parameterized process templates and success-only promotion of planner-authored suggestions
- bounded repair loop that retries with failure observations before giving up
- complete-result planning guidance for "all/total/count/complete" requests
- admin pages for graphs/tasks, allowed tools, and task-library items
- .NET 8 SDK
- PowerShell for built-in PowerShell task execution and scripts
- GitHub Copilot access for LLM-backed prompt/chat flows
- Optional CLIs for chat app capabilities:
teamsmailcalendaraz
Clone and test:
git clone https://github.com/ipdelete/ttasks-net.git
cd ttasks-net
dotnet test .\TtasksNet.slnxRun the chat app:
dotnet run --project C:\src\ttasks-net\Ttasks.ChatApp\Ttasks.ChatApp.csproj --urls http://127.0.0.1:5123Open:
- chat: http://127.0.0.1:5123
- graphs/tasks admin: http://127.0.0.1:5123/admin
- capability inventory: http://127.0.0.1:5123/admin/capabilities
- task library: http://127.0.0.1:5123/admin/library
If dotnet test fails on Windows because Ttasks.ChatApp.exe is locked, stop the running app process by PID and rerun the command.
usingTtasks.Core;usingCoreTask=Ttasks.Core.Task;varexecutor=TaskExecutor.WithBuiltInHandlers();vargraph=newTaskGraph("Example graph");varread=CoreTask.Powershell("Get-Date",title:"Read date");varsummarize=CoreTask.Prompt("Summarize the upstream result.",title:"Summarize");graph.Add(read);graph.Add(summarize,after:[read]);graph.Run(executor);Prompt tasks require a prompt handler registration, such as the LLM session handler used by the chat app.
Use CoreTask.Process(new ProcessCommand("tool", "arg1", "arg2")) for external CLI tools when arguments should bypass shell quoting and variable expansion. Keep CoreTask.Powershell(...) for actual PowerShell scripts.
The chat app separates planning from execution:
- The router decides whether a turn is a direct answer or graph work.
- Capability providers expose host-approved work for the turn.
- Full-tool capabilities can use tool docs to create in-memory candidate task templates.
- The planner receives only concrete capability IDs and descriptions.
- The validator rejects unsafe graph plans and malformed capability payloads.
- The builder resolves capability IDs to executable tasks.
- The executor runs only payloads from the current host-approved capability set.
- Failed validation/execution can loop back through bounded candidate repair and replanning.
- Successful full-tool candidates selected by the winning graph are promoted to the task library.
- Complete-result requests are guided to prove coverage with documented count/all/paging mechanisms before reporting exact totals.
- SQLite persistence makes graph and task runs inspectable through admin pages.
See .aidocs for developer documentation.
- Chat app overview
- Chat turn lifecycle
- Capability system
- Task library
- Admin and persistence
- Safety model
- Adding capabilities
Run all tests:
dotnet test C:\src\ttasks-net\TtasksNet.slnxRuntime chat app data is written under Ttasks.ChatApp\data\ and is ignored by git.
This repository is experimental. APIs and chat app architecture may change as the .NET port and capability model evolve.
Licensed under the Apache License 2.0.