PLAYBOOK · OEM & EMBEDDED AI
Put agentic AI inside your own product — not beside it.
Your customers already live in your software. Sending them to a separate AI console breaks that. This playbook embeds VDF AI Agent Hub into an existing enterprise product: one shared JWT secret bridges identity, an App Registry entry publishes your endpoints as agent tools, and bearer_passthrough keeps every read inside the permissions your product already enforces.
Software vendors reach the same fork sooner or later. Build an AI layer in-house and you inherit provider keys, routing, evaluation, token accounting, and an on-prem story you never planned for. Resell someone else's console and your product becomes a tab your customer leaves. The third path is embedding a platform that was designed to be someone else's back end — which is what the App Registry, the JWT bridge, and per-app agent scoping exist for.
The problem
An AI feature that lives outside your product isn't your feature
Bolted-on assistants ask for a second login, see none of the row-level permissions your application spent years getting right, and force a data export to be useful at all. The moment a customer's security review reaches that export, the roadmap item stalls.
The VDF AI approach
Agent Hub as your back end, your UI as the surface
Register your application once. Agent Hub then knows how to call you back — with the end user's own bearer token, against endpoints you declared, limited to the agents you allowed. Your product stays the front door and the system of record.
WHY THIS MATTERS NOW
The hard part isn't the model — it's the identity boundary
Every embedded-AI project eventually reduces to one question: when the agent reads a record, whose permissions applied? Answer it with a service account and you have quietly built a data-exfiltration path that any competent security review will find. Answer it with the end user's own credential and the feature inherits an authorisation model your customers already accepted.
VDF AI answers it with token forwarding. A tool row marked tool_type='http' and auth_method='bearer_passthrough' is invoked with the caller's token in the Authorization header. Your endpoint decodes the same token, resolves the same user, and returns the same slice of data your UI would have shown. The agent gains no privilege it was not handed at the door.
WHAT YOU NEED TO START
Prerequisites for an embedded pilot
Your product
- An HTTP API with per-user authorisation
- Ability to verify an HS256 JWT server-side
- Two or three endpoints worth exposing as tools
- A place in the UI for a conversational panel
VDF AI surface
- Agent Hub reachable from your backend
ENABLE_DB_REGISTRY=truefor DB-backed agentsJWT_SECRET_KEYshared with your issuer- CORS origins pinned to your product domains
People
- One backend engineer for the token bridge
- One product owner to choose the first workflow
- An admin to register the app and scope agents
REFERENCE ARCHITECTURE
Two directions across one trust boundary
existing session
mints HS256 JWT · app_id claim
/api/agent/execute
tool_type=http
same token forwarded
row-level scope preserved
multi-step orchestration
audit trail · per-tenant tokens
PICK A DEPTH FIRST
Three ways to embed, in increasing order of commitment
Depth 1 · Capability call
Your feature calls one agent
A single server-side call to /api/agent/execute behind an existing button: summarise this case, draft this reply, classify this document. No new UI paradigm, no tool registration. Typically live in days.
Depth 2 · Grounded assistant
Agents read your product back
Register the app, publish a tool manifest, and the agent can pull live records mid-conversation under the user's own token. This is where answers stop being generic and start being about this customer's data.
Depth 3 · Platform OEM
You resell the whole stack
Networks, domains, private RAG, and model routing ship inside your product on the customer's infrastructure. Your commercial packaging sits on top of per-tenant usage records that the platform already keeps.
PLAYBOOK · STEP BY STEP
From a product with no AI to an embedded agent surface
Choose the first workflow, not the first feature
Pick a screen where users already lose time assembling context — a case detail page, a supplier record, a ticket queue. Embedded AI earns its place by removing the tab-switching around one screen, and that screen tells you exactly which endpoints become tools in step 3.
Bridge identity with one shared secret
Your backend already knows who the user is. Sign a short-lived HS256 token with the same JWT_SECRET_KEY the Agent Hub verifies with, and include an app_id claim so the platform knows which product is calling.
import jwt, time
def vdf_token(user, app_id="acme-erp", ttl=900):
now = int(time.time())
return jwt.encode(
{
"user_id": str(user.id), # or "sub" / "uid"
"app_id": app_id, # identifies YOUR product
"iat": now,
"exp": now + ttl,
},
JWT_SECRET_KEY,
algorithm="HS256",
) Agent Hub reads user_id, sub, or uid — first match wins — and scopes responses to that identity. Send it as Authorization: Bearer <token>.
Publish a tool manifest from your product
Expose one endpoint that describes the capabilities you are willing to lend an agent. Each entry is an endpoint you already own plus a JSON Schema for its parameters.
GET /api/tools/manifest
{
"tools": [
{
"name": "acme_supplier_profile",
"description": "Return the full supplier record, contracts and open risks for a supplier id.",
"http_method": "GET",
"endpoint": "/api/tools/acme_supplier_profile",
"auth_method": "bearer_passthrough",
"parameters_schema": {
"type": "object",
"properties": { "supplier_id": { "type": "string" } },
"required": ["supplier_id"]
}
}
]
} Write descriptions for a planner, not for a developer. The description and schema are what the platform reads when deciding whether this tool answers the sub-task in front of it.
Register the app and sync its tools
Registration is a server-side operation performed by an operator or your installer. It records the callback base URL, the manifest location, and the agent allowlist, then upserts every manifest entry into the shared tool catalogue.
from app.services.app_registry_service import register_app, fetch_and_sync_tools
register_app(
app_id="acme-erp",
display_name="Acme ERP",
callback_base_url="https://erp.acme.internal",
allowed_agents=["supplier_risk_analyst", "contract_summarizer"],
)
fetch_and_sync_tools("acme-erp")
# -> {"app_id": "acme-erp", "tools_synced": 4, "manifest_url": "..."} Re-run the sync whenever your manifest changes; entries are upserted by tool name, so a new release adds capabilities without a migration.
Scope what the embedded surface may do
Three controls stack, and you should set all three before the first customer sees the panel:
- allowed_agents on the registered app — requests carrying your
app_idcan only reach the agents on that list. - Domains — each domain carries its own context instructions, tool preferences, model hints, and a
regulatedflag that forces routing to approved models only. - Themes — the catalogue grouping that decides which agents your customers actually see listed in your UI.
Call the agent from your own screen
Keep the call server-side so the shared secret never reaches a browser. Carry session_id back into the next turn and the conversation keeps its thread.
curl -X POST "$AGENTHUB/api/agent/execute" \
-H "Authorization: Bearer $VDF_JWT" \
-H "Content-Type: application/json" \
-d '{
"agent_name": "supplier_risk_analyst",
"prompt": "Summarise open risks for supplier 41822 before tomorrow renewal call.",
"context": { "client_id": "acme-erp", "session_id": "6f0e…" }
}' The response carries output, the provider and model that served it, a token usage block, and an execution_id you can store next to your own record for traceability.
Meter it the way you intend to sell it
Every metered call resolves the user, company, and plan, estimates the request, reserves that estimate so concurrent calls cannot overshoot a hard limit, executes, then records the provider's actual usage. Decide early whether AI is bundled into your existing tiers or sold as an add-on — the per-tenant records support either, but retrofitting the commercial model is harder than choosing it.

Ship it wherever your product ships
The same containers install inside a customer's perimeter. For an on-prem release, hand your installer three values — the Agent Hub base URL, the shared JWT secret, and the callback base URL your product answers on — then register the app during setup. Air-gapped customers additionally pin routing to local models; see the Day 1 Docker quickstart for the base install.
OUTCOMES
What your product gains, and what it does not inherit
stays the product. Customers never leave to use the AI capability you shipped.
to manage: provider credentials, routing, and fallbacks stay inside the platform.
usage records arrive ready to map onto your own pricing and entitlements.
SEEMR REFERENCE
Your customers get better routing without you shipping a release
Model choice inside an embedded surface is not a decision you want to hard-code into your product. SEEMR selects per node from the models a customer's policy permits, and improves that selection from observed run outcomes — so an on-prem deployment that adds a local model starts benefiting from it without a change on your side.
FREQUENTLY ASKED QUESTIONS
What product teams ask before embedding the platform
Does my product need its own AI team to embed Agent Hub?
No. The integration surface is three things: mint a JWT your Agent Hub trusts, publish a tool manifest describing endpoints you already have, and call POST /api/agent/execute. Everything model-side — provider keys, routing, retries, token accounting — stays inside the platform.
Do end users need a second login for the AI features?
They should not. Your product signs a short-lived HS256 token with the shared JWT_SECRET_KEY and sets user_id (or sub) plus an app_id claim. Agent Hub verifies the signature and treats that user as the caller, so the AI surface inherits the session the user already has.
How do agents read customer data without us exporting it?
Through bearer_passthrough. When an agent invokes one of your registered HTTP tools, the caller's own token is forwarded to your endpoint. Your service answers with exactly the rows that user is allowed to see. Nothing is copied into a separate AI store to make the feature work.
Can we restrict which agents an embedded surface may call?
Yes. The registered app carries an allowed_agents list. When the request arrives with your app_id claim, Agent Hub filters agent access to that list, so a customer-facing module cannot reach an internal finance agent even if someone guesses its name.
Can we present it as our own product rather than VDF AI?
Yes. Agent Hub is API-first, so the surface your customers see is your UI. Domains and themes organise the agent catalogue you expose, and your product keeps its own naming, layout, and permissions model.
How is usage metered when we resell this inside our product?
Each metered call resolves user, company, and plan, estimates tokens, reserves them in Redis, executes, then records actual provider usage in Postgres. You get per-tenant consumption data you can map to your own commercial packaging.
What happens when we ship on-premises with our product?
The same containers run inside the customer's perimeter. Point both services at the same JWT_SECRET_KEY, set an explicit CORS origin list for your product domain, and register the app with its internal callback base URL. No outbound dependency is required for the integration path itself.
RELATED PLAYBOOKS
Continue with related VDF AI patterns
GET IN TOUCH
You Have Questions
Tell us what you’re trying to achieve—governed AI Networks, enterprise RAG, deep integrations, or on‑premise deployment. We’ll help you map the right architecture, security posture, and rollout path. If you’re moving beyond AI pilots and need scalable, auditable execution, reach out—our team is ready to help.