Documentation
Your stack.Already supported.
Python, TypeScript, OpenAI, LangChain, n8n.Two clients with no runtime dependencies, adapters that record the calls you already make, and an n8n recipe with no code at all.
Message usPython
Standard library only, Python 3.9 or later. AgentClient uses the agent’s ingest key; Client uses a scoped bfk_ service token (read or write). Idempotent calls retry on network errors and 5xx; ingestion retries only when every message has an id. Errors raise ApiError with status, code and message.
from blue_falnoa import AgentClient, Client
bf = AgentClient(url, "bfa_…") # ingest key of one agent
bf.send_messages("c1", [{"id": "m1", "role": "user", "content": "Hello"}])
bf.search_knowledge("refund window")
Client(url, "bfk_…").approve(occurrence_id, reason="Checked") # service token, write scopeTypeScript
Uses fetch, Node 18 or later or a browser. The same two clients, with ApiError carrying status and code.
import { AgentClient, Client } from "@blue-falnoa/sdk";
const bf = new AgentClient(url, "bfa_…");
await bf.sendMessages("c1", [{ id: "m1", role: "user", content: "Hello" }]);
console.log(await bf.doctor());
await new Client(url, "bfk_…").approve(occurrenceId, "Checked");OpenAI
record_openai (Python) and recordOpenAI (TypeScript) send the last question, the answer and the tokens of a chat completion.
from blue_falnoa import AgentClient, record_openai
bf = AgentClient(url, "bfa_…")
messages = [{"role": "user", "content": "Where is my order?"}]
response = openai.chat.completions.create(model="gpt-4o-mini", messages=messages)
record_openai(bf, "order-123", messages, response) # question, answer and tokensLangChain
A callback handler. Pass it in callbacks and each call is recorded.
from blue_falnoa import AgentClient, LangChainHandler
bf = AgentClient(url, "bfa_…")
llm.invoke("Where is my order?", config={"callbacks": [LangChainHandler(bf, "order-123")]})n8n
No special node: an HTTP Request node with the ingest key as a header is enough.
HTTP Request node
Method: POST
URL: https://YOUR-INSTANCE/api/agent/v1/conversations/{{ $execution.id }}/messages
Header: Authorization = Bearer bfa_…
Body (JSON):
{
"messages": [
{ "role": "user", "content": "{{ $json.question }}" },
{ "role": "assistant", "content": "{{ $json.answer }}" }
]
}The adapters read response objects and are tested against fakes, not against live providers. The SDK sources are provided by us and are not on public package registries.
All guides
Quickstart
Create a key, send a message and see the agent connected.
Agent API
Conversations, knowledge search, the doctor check and A2A steps.
Action gateway
request_approval: pay, send or delete only after a person approves.
Offline verification
Verify an evidence bundle offline with bf-verify, or in your browser.
