✨ PORTAL: PROJECT OPERATION TECHNOLOGY ANYWHERE LIBRARY

The Complete AI Development Library

Build production-grade AI applications with type-safe tools, streaming responses, multi-provider support, and enterprise-grade integrations. Everything you need for intelligent applications, anywhere.

Trusted by developers and enterprises

TypeScript First
Framework Agnostic
Zero Vendor Lock-in
Open Source

Powerful AI Capabilities

Everything you need to build sophisticated AI applications with confidence and control

🔐
Type-Safe AI Tools
Define tools once with schemas and execute them automatically across server and client with full type inference
ToolsType Safety
Streaming Responses
Real-time streaming of AI responses with chunked data processing for instant feedback and interactivity
StreamingPerformance
🔄
Multi-Provider Support
Unified interface across OpenAI, Anthropic, Google Gemini, Ollama, and custom adapters with zero lock-in
AdaptersFlexibility
🤖
Agentic Architecture
Advanced tool calling loops with approval flows, error handling, and iterative reasoning for autonomous AI
AgentsAdvanced
🎨
Multimodal Content
Support for text, images, audio, documents, and thinking tokens in a unified message format
ContentRich Media
🏢
Production Ready
Devtools integration, observability hooks, error boundaries, and enterprise-grade reliability patterns
EnterpriseMonitoring

Advanced Tool System

Comprehensive tool architecture for building intelligent, responsive AI applications

Server Tools
Execute backend functions safely with schema validation
🗄️

Database Queries

Type-safe database access

🌐

API Calls

Invoke external services

📁

File Operations

Read and write files safely

⚙️

Computations

Heavy processing tasks

Client Tools
User-facing interactions and approvals
🎨

UI Components

Render dynamic interfaces

⌨️

User Input

Collect and validate input

Approvals

Request user confirmation

🔔

Notifications

Alert and inform users

Agentic Loops
Autonomous reasoning and execution
🔗

Tool Calling

Chain tool executions

🛟

Error Recovery

Handle and recover from errors

🧠

Context Management

Maintain state across calls

💭

Reasoning Tokens

Extended thinking capabilities

Multi-Provider Support

Unified interface across leading AI providers with zero vendor lock-in

🤖Popular
OpenAI
Industry-leading language models with vision and reasoning capabilities

Available Models:

  • GPT-4o
  • GPT-4 Turbo
  • GPT-4
  • GPT-3.5
🧠Advanced
Anthropic Claude
Advanced models with extended thinking and superior safety properties

Available Models:

  • Claude 3.5 Sonnet
  • Claude 3 Opus
  • Claude 3 Haiku
🔍Multimodal
Google Gemini
Multimodal models with strong reasoning across text, code, and images

Available Models:

  • Gemini 2.0
  • Gemini Pro
  • Gemini Vision
🏠Local
Ollama
Run open-source models locally with full control and privacy

Available Models:

  • Llama 2
  • Mistral
  • Neural Chat
  • Custom Models
⚙️Extensible
Custom Adapters
Implement custom adapters for proprietary or specialized models

Available Models:

  • Build Your Own
  • Extend PORTAL
  • Integration Ready
🚀Flexible
Together AI
Access multiple open-source models and fine-tuning capabilities

Available Models:

  • All Together Models
  • Multiplexing Support

Code Examples

Get started with PORTAL in minutes. Choose from basic chat, tool-calling, streaming, or React integration patterns.

import { chat } from "@portal/ai"
import { openai } from "@portal/adapters"

const response = await chat({
  model: "openai/gpt-4o",
  messages: [
    { role: "user", content: "Hello, what can you do?" }
  ]
})

console.log(response.content)

Resources & Support

Everything you need to master PORTAL and build powerful AI applications

Complete Documentation

Comprehensive guides covering all PORTAL features, APIs, adapters, and best practices for production AI applications.

GitHub Repository

Full source code, examples, issues tracker, and contribution guidelines for PORTAL AI. Follow development and contribute.

API Reference

Complete API documentation with TypeScript types, function signatures, and detailed parameter descriptions.

Community Discord

Join thousands of developers building with PORTAL. Get help, share projects, and connect with the community.

Playground

Interactive sandbox to experiment with PORTAL features, test different adapters, and prototype AI applications.

Examples Repository

Ready-to-use examples covering chat interfaces, tool calling, streaming, multimodal content, and more.