Documentation
Everything you need to integrate NjiraAI into your AI agents.
Getting Started
Guides
Context Propagation
Request/trace correlation across async boundaries.
Core concepts
The shared model across the TypeScript and Python SDKs.
Enforcement (Tool Boundary)
How to enforce allow/block/modify decisions at safe boundaries.
Agent Integration Proxy
Protect remote agents by pointing them to the Njira Gateway.
Model Cascade
Optimize performance and cost with tiered model selection.
Modes and Failure Behavior
Shadow vs active vs dry_run, and fail_open vs fail_closed.
Serverless and Flushing
Ensure traces are delivered in short-lived runtimes.
Tracing
Capture spans and events across LLMs, tools, chains, and retrievers.
Usage & Billing
Understand your usage quotas, metrics, and retention policies.
Integrations
CrewAI (Python)
Enforce at tool boundaries using CrewAI tool hooks (before/after).
Express (TypeScript)
Add NjiraAI middleware to Express apps for automatic context and tracing.
FastAPI (Python)
Add NjiraAI middleware to FastAPI apps for automatic context and tracing.
Fastify (TypeScript)
Add NjiraAI middleware to Fastify apps for automatic context and tracing.
LangChain.js (TypeScript)
Trace LangChain.js runs via callbacks and optionally enforce at tool boundaries.
LangChain (Python)
Trace LangChain runs via callbacks and optionally enforce at tool boundaries.
Next.js (TypeScript)
Use NjiraAI with Next.js App Router route handlers.
Examples
CrewAI Basic
Hook NjiraAI into CrewAI tool execution for enforcement and tracing.
Express Basic
A minimal Express app with NjiraAI enforcement and tracing.
FastAPI Basic
A minimal FastAPI app with NjiraAI enforcement and tracing.
LangChain Python Basic
Trace LangChain Python with NjiraAI callbacks and enforce at tool boundaries.
LangChain.js Basic
Trace LangChain.js with NjiraAI callbacks and enforce at tool boundaries.
Next.js Route Handler
Use NjiraAI with Next.js App Router API routes.