Build on Fadenstack¶
Fadenstack is one AI system for an organisation, run by its IT on its own servers. Connect your apps to it, build agents into other software, or give it new tools: the server applies the organisation's rules to every request. The SDKs also run an agent on a person's own AI, without a server.
Three ways in¶
-
Use the agents
Ready-made assistants for Office, Chrome, the desktop and Nextcloud, built on these SDKs.
-
Build with the SDK
Put an agent into your own software. It works with the organisation's Fadenstack server, or straight with a model endpoint the person chooses: standalone mode.
-
Run the complete package
The Fadenstack server governs every chat, agent and app: the models on your machines, the rules, personal data and the audit.
First lines of code¶
Fadenstack speaks the OpenAI API. Point a client at your server's /v1 with a Fadenstack key:
An agent inside a desktop application, an add-in or a service, with a tool from the host:
using Fadenstack;
using Fadenstack.Agents;
using var client = FadenstackClient.ForAgent(new Uri("https://ai.example.internal"), "my-assistant", out var tokens);
// First run: sign in once for this user on this device (see Your first agent).
using var agent = FadenstackAgent.CreateBuilder()
.UseClient(client)
.UseAgent("my-assistant")
.AddTools(new PageTools())
.Build();
var session = await agent.StartSessionAsync();
var result = await session.SendAsync("What is on page 7?");
Console.WriteLine(result.Text);
An agent in a web page, a browser extension or Node, streaming its answer:
import { FadenstackClient } from "@fadenstack/client";
import { FadenstackAgent } from "@fadenstack/agents";
const { client, tokens } = FadenstackClient.forAgent({ serverUrl: "https://ai.example.internal", agent: "my-assistant" });
// First run: sign in on behalf of the user (see Your first agent).
const agent = FadenstackAgent.createBuilder().useClient(client).addTools(readTicket).build();
const session = await agent.startSession();
for await (const event of session.stream("What is ticket T-1042 about?")) {
if (event.type === "text") process.stdout.write(event.text);
}
The same agent without a server, on a model endpoint the person chose (standalone mode). The app ships the agent's definition:
using Fadenstack.Agents;
using Fadenstack.Endpoints;
using var agent = FadenstackAgent.CreateBuilder()
.UseEndpoint(new ModelEndpoint
{
BaseUrl = new Uri("http://localhost:11434/v1"), // Ollama on this computer
Model = "qwen3:14b",
Dialect = EndpointDialect.Ollama,
})
.UseLocalProfile(AgentDefinition.FromJson(File.ReadAllText("my-assistant.json")))
.AddTools(new PageTools())
.Build();
What you can do¶
-
Call the API
Point any OpenAI client at your server's
/v1with a Fadenstack key, and your app gets the organisation's models under its rules. -
Build an agent
Put an assistant into a desktop application, an Office add-in, a browser extension or a web page. The SDKs run the agent on the device; the server governs it.
-
Give it tools
Register an MCP server once on the Fadenstack server, and every chat and agent that is allowed can use its tools.
-
Share how to work
Skills are versioned instructions your teams share: checklists, formats, procedures. Every chat and agent can use them.
How the SDKs fit together¶
The .NET and TypeScript SDKs have the same layers. Each package brings the ones below it, so you add only the top one you need.
Fadenstack.UI.WpfFadenstack.UI.Avalonia@fadenstack/ui-react@fadenstack/ui-vueFadenstack.UI@fadenstack/uiFadenstack.Agents@fadenstack/agentsFadenstack.Mcp@fadenstack/mcpFadenstack.Skills@fadenstack/skillsFadenstack.Provenance@fadenstack/provenanceFadenstack.SecretsFadenstack.Client@fadenstack/client/v1, agent sign-in and events@fadenstack/testing adds a fake server for tests and demos.What the server does for every request¶
Whether a request comes from the chat, an agent or your app, it takes the same path. Your code sends a request and gets an answer, or an outcome that says why there is none.
- Limitsrate limits, and budgets where the server sets them
- Skills and toolsthe ones the caller may use
- Personal dataredacted where the policy says so
- Modelon the organisation's machines, or at a provider it allows
- Recordusage and an audit entry
What you need¶
- A Fadenstack server. Your organisation's, or one you install: see Get started on the website.
- A key or an agent. An API key for plain API calls, or an agent registered on the server for the SDKs. Get started shows both.
- Or, for standalone mode, a model endpoint. Ollama or LM Studio on the person's computer, a vLLM server in their network, or an OpenAI-compatible cloud; your app ships the agent's definition. See Standalone mode.