Docs
Any site that publishes llms-full.txt. Fetched once an hour, split into pages and searched by term.
DocsPluginBill is a Swift package that runs an LLM agent over your docs, your repository and your own account data. It answers in Discord tickets, forum threads, DMs and an HTTP chat endpoint. Tools are granted per conversation and bound to the person asking, and every step is written to a hash-chained log before it runs.
phone stopped syncing since yesterday
charged twice this month??
how do I share a folder read-only
signed back in, it works now
PDF export downloads a file called .pdf
Each replay follows the package's loop for a sample consumer app, and the log shows events in the order Bill writes them: tool calls and results, then the step that made them. Expand a row to see the model's input or output.
Four sources it reads, and the four tools that change anything outside the conversation. Each write is audited before it runs.
Any site that publishes llms-full.txt. Fetched once an hour, split into pages and searched by term.
DocsPluginA GitHub App token narrowed to one repository, with contents, pull requests and metadata read and issues write. Denied path globs are checked before every read.
GitHubPlugin · PathPolicyYour plugin. It builds its tools per conversation from requester.accountId, so no tool takes a user id.
Plugin.tools(for:)Earlier tickets, feedback and email from the same person, read through the same plugin.
history:readHands the conversation to a person with a summary of what was checked. The core prompt requires it for money, bans, data requests, legal and security.
Sets priority and labels from an allow-list you configure, and adds internal notes.
Takes a quote that has to appear in the requester's latest message, or the close is refused.
Opens a GitHub issue with your labels. The prompt requires a duplicate search and a confirmed cause first.
Each tool declares a scope. A Policy grants a conversation its scopes from the surface, whether the requester is linked, and their consent. Tools outside the grant aren't sent to the model, and a call to one fails and is audited as denied. This explorer runs SurfacePolicy's rules.
15 of 16 tools offered to the model. The rest don't exist as far as it knows, and refuse to run if it asks anyway.
Every event stores the SHA-256 of the event before it. These are computed in your browser over sorted-key JSON. Edit a field, forge a hash or delete an event to make AuditLog.verify fail. Writes are queued in order, and when one fails, the action it records doesn't run.
The core system prompt is sent before your product prompt. A product prompt adds knowledge and rules; it can't remove these. Redaction of secrets in tool output, replies and the audit log happens in code, not in the prompt.
BillAI ports the core of Vercel's AI SDK to Swift. The agent, plugins and Discord front desk are built on it, and it works on its own.
let bill = Bill(
model: OpenAICompatibleModel.openRouter("openai/gpt-6-luna", apiKey: key),
productPrompt: try String(contentsOfFile: "prompt.md", encoding: .utf8),
plugins: [
DocsPlugin(source: "https://docs.example.com/llms-full.txt"),
GitHubPlugin(github: app, paths: PathPolicy(deny: ["apps/admin/**"])),
Accounts(db: db),
DeskPlugin(desk: HelpDesk(db: db), labels: ["bug", "billing", "account"]),
],
policy: SurfacePolicy(detailConsent: { await consented($0) }),
audit: AuditLog(sink: PostgresAuditSink(client: db))
)
let reply = try await bill.respond(to: conversation)Add the package, write a plugin for your account data and a Desk for your ticket system, and deploy it anywhere Swift runs.
.package(url: "https://github.com/dillon1000/bill.git", from: "0.1.0")