Skip to content

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.

Your first API call Your first agent

Three ways in

  • Use the agents


    Ready-made assistants for Office, Chrome, the desktop and Nextcloud, built on these SDKs.

    The agents

  • 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.

    .NET SDK · TypeScript SDK

  • 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.

    Get started

First lines of code

Fadenstack speaks the OpenAI API. Point a client at your server's /v1 with a Fadenstack key:

curl -s "$FADEN_BASE_URL/chat/completions" \
  -H "Authorization: Bearer $FADEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "team-assistant",
    "messages": [{"role": "user", "content": "Summarise the benefits of a shared AI system in two sentences."}]
  }'

Your first API call

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);

The .NET SDK

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 TypeScript SDK

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();

Standalone mode

What you can do

  • Call the API


    Point any OpenAI client at your server's /v1 with a Fadenstack key, and your app gets the organisation's models under its rules.

    Your first API call

  • 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.

    Your first agent

  • Give it tools


    Register an MCP server once on the Fadenstack server, and every chat and agent that is allowed can use its tools.

    MCP servers

  • Share how to work


    Skills are versioned instructions your teams share: checklists, formats, procedures. Every chat and agent can use them.

    Skills

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.

Your software Desktop applicationOffice add-inBrowser extensionWeb pageService or script
SDK, on the device
Chat panela ready chat for your UIFadenstack.UI.WpfFadenstack.UI.Avalonia@fadenstack/ui-react@fadenstack/ui-vue
View modelsa chat without a UI frameworkFadenstack.UI@fadenstack/ui
Agenttool loop, approvals, sessions, outcomesFadenstack.Agents@fadenstack/agents
Your toolshost tools, local MCP servers and skillsFadenstack.Mcp@fadenstack/mcpFadenstack.Skills@fadenstack/skills
Provenancemarks AI output and keeps its recordFadenstack.Provenance@fadenstack/provenance
Key storeencrypts the device's data on macOS and LinuxFadenstack.Secrets
Clientthe gateway, sign-in, typed errorsFadenstack.Client@fadenstack/client
Without an SDK
Any OpenAI clientwith a Fadenstack key
HTTPS: the OpenAI-compatible /v1, agent sign-in and events
Fadenstack server Gateway: limits, personal data, auditAgents: instructions, model, knowledgeSkillsMCP tools
Models The organisation's GPU machinesProviders it allows
With a server, the agent's instructions, model and knowledge stay on the server; the SDK never receives them. In standalone mode the app ships the agent's definition and the SDK talks to the person's own model endpoint instead. @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.

  1. Limitsrate limits, and budgets where the server sets them
  2. Skills and toolsthe ones the caller may use
  3. Personal dataredacted where the policy says so
  4. Modelon the organisation's machines, or at a provider it allows
  5. 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.