Tork Admin Console
Embeddable React UI for managing AI governance. Configure tools, agents, policies, PII rules, and handle human-in-the-loop approvals.
Dashboard
Stats and activity overview
HITL Config
Human-in-the-loop settings
Tool Management
Configure allowed tools
PII Rules
Data protection settings
Console Tabs
Installation
Install the Admin Console package from npm.
@torknetwork/admin-console@1.0.0Environment Setup
Configure your API key as an environment variable.
Security Note
Never commit API keys to version control. Use environment variables and add .env* to your .gitignore.
Basic Usage
Drop in the TorkAdminConsole component.
Props Reference
Available configuration options.
Framework Integration
Examples for popular React frameworks
Individual Tab Components
Build custom layouts with individual tab exports.
Import individual tabs for custom layouts. Create your own sidebar, header, or embed specific tabs in different parts of your application.
API Hooks
Access Tork API directly with React Query hooks.
Use createTorkAPI() to get hooks for fetching data, creating resources, and managing approvals. All hooks are powered by React Query.
Theming
Customize colors and styling.
Protecting Admin Routes
Secure your admin console with authentication.
Wrap the Admin Console with your authentication provider. Pass the authenticated user's email as reviewerId to track who approves actions.
TypeScript Types
Available type definitions.
Available API Hooks
useDashboardStatsuseHITLConfiguseUpdateHITLConfiguseToolsuseCreateTooluseUpdateTooluseDeleteTooluseAgentsuseCreateAgentuseUpdateAgentuseDeleteAgentusePoliciesuseCreatePolicyuseUpdatePolicyuseDeletePolicyusePIIRulesuseUpdatePIIRulesuseApprovalsuseApproveActionuseRejectActionuseAuditLogsBest Practices
Protect the admin route
Always require authentication before rendering the Admin Console.
Use environment variables
Never hardcode API keys. Use NEXT_PUBLIC_, VITE_, or REACT_APP_ prefixes.
Set meaningful reviewerId
Pass the authenticated user's email for audit trail tracking.
Use dynamic imports for SSR
In Next.js Pages Router, use dynamic() with ssr: false to avoid hydration issues.
Match theme to your app
Use the theme prop to match your application's color scheme.
Next Steps
Connect your agents to Tork and explore the SDK integrations.