Cognipeer Agent Server
A production-ready serving layer that registers, versions, and exposes multiple AI agents as secure, streaming-enabled REST services with Swagger/OpenAPI documentation.
Key Features
Registers and manages multiple agents within a central serving catalogue.
Exposes agents as standardised RESTful endpoints for application integration.
Streams real-time agent responses via Server-Sent Events.
Auto-generates interactive API documentation and testing interfaces.
Secures endpoints using token-based and JWT authentication models.
Controls agent lifecycle through versioning, release, and publishing workflows.
Persists conversations, messages, and metadata in scalable databases.
Supports document ingestion and attachment handling within agent interactions.
Architecture
Framework-agnostic serving layer that turns any agent into a production REST API.
Framework Adapters
Express, Next.js App Router, and more — use what you know.
Storage Providers
PostgreSQL and MongoDB out of the box with auto-migration.
Auth Providers
Token-based and JWT authentication with pluggable strategies.
Swagger / OpenAPI
Auto-generated interactive API docs and testing interface.
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /agents | List all agents |
GET | /agents/:agentId | Agent details |
GET | /conversations | List conversations |
POST | /conversations | Create conversation |
GET | /conversations/:id | Conversation details & messages |
POST | /conversations/:id/messages | Send message |
POST | /files | Upload file |
GET | /files/:fileId/content | Download file |
Quick Start (Express)
import express from 'express';
import {
createAgentServer,
createPostgresProvider,
createExpressMiddleware,
} from '@cognipeer/agent-server';
const storage = createPostgresProvider({
connectionString: 'postgresql://user:pass@localhost:5432/mydb',
});
const agentServer = createAgentServer({
basePath: '/api/agents',
storage,
swagger: { enabled: true, path: '/docs' },
auth: { enabled: false },
});
agentServer.registerSDKAgent('assistant', myAgent, {
description: 'A helpful assistant',
});
const app = express();
app.use(express.json());
await storage.connect();
app.use(createExpressMiddleware(agentServer));
app.listen(3000);Cognipeer Agent Server vs Alternatives
| Product | Primary Role | Multi-Agent Serving | Streaming (SSE) | Built-in Auth | Built-in Storage | File Handling | OpenAPI / Swagger | Framework Adapters |
|---|---|---|---|---|---|---|---|---|
Cognipeer Agent Server | Agent → REST API Infrastructure | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Custom FastAPI / Express | DIY API Layer | △ | △ | △ | △ | △ | △ | ✓ |
OpenAI Assistants API | Managed Runtime Endpoint | ✕ | ✓ | ✓ | ✓ | △ | ✕ | ✕ |
LangServe (LangChain) | LangChain App Serving | △ | △ | △ | △ | △ | △ | △ |