NEURONAGENT/Agent Runtime

NeuronAgent

REST API and WebSocket agent runtime system with long-term memory, tool execution, and streaming responses. Integrates seamlessly with NeuronDB.

curl
Quickstart
curl http://localhost:8080/api/v1/health
REST APIWebSocketLong-term MemoryTool Execution
NeuronAgent
Agent Runtime
NeuronAgent: AI Agent Runtime for PostgreSQL

Architecture

AI agent runtime architecture with state management, memory store, and tool execution

NeuronAgent Architecture

API Layer

REST API | WebSocket | Health Check

Agent State Machine

  • • State Persistence
  • • Task Execution
  • • Recovery & Retry
  • • State Transitions

Session Management

  • • Session Lifecycle
  • • Context Management
  • • Message History
  • • Multi-tenancy

Tool Registry

  • • SQL Tools
  • • HTTP Tools
  • • Code Execution
  • • Shell Commands

Memory Store

  • • HNSW Vector Search
  • • Context Retrieval
  • • Long-term Memory
  • • Semantic Search

Job Queue

  • • Background Jobs
  • • Retry Logic
  • • Poison Handling
  • • SKIP LOCKED

NeuronDB Integration

Vector Search | Embeddings | LLM Operations | PostgreSQL

NeuronAgent Runtime

Build autonomous agents with memory and tool execution

NeuronAgent
console • demo
v1.0ready
Create & manage agents
REST API for agent lifecycle management
HTTP
Agent Creationdemo
POST /api/v1/agents { "name": "support-agent", "system_prompt": "You are a helpful support agent...", "model": "gpt-4", "tools": ["sql", "http", "search"], "memory_config": { "enabled": true, "max_context": 10 } } // Response { "id": "agent_123", "status": "active" }
Results5 rows
idcategory
1agent_123: support-agent, status: activeagent
2agent_456: sales-agent, status: activeagent
3agent_789: support-agent, status: idleagent
4agent_101: support-agent, status: activeagent
5Total agents: 4, Active: 3summary
Performance
Query Time
8.42ms
Latency (P95)
12.5ms
QPS
8.2k
Status
ready
Query Statistics
Execution
Rows Returned5
Cache Hit96%
PlanOptimized
Connection
Databaseneuronagent
Versionv1.0
Statusactive
Summary
Total Queries1,247
Success Rate99.8%
Avg Latency8.2ms
Agent Runtime Features

Why NeuronAgent

Agent State Machine

InitRunningCompleteError
  • Complete state machine for autonomous task execution
  • State persistence, recovery, and transition management
  • Supports complex workflows with conditional branching
  • State validation and error handling
  • Multi-agent collaboration with shared state management
  • Workflow engine for orchestrating multi-step agent tasks

Long-term Memory

Q
  • HNSW-based vector search for context retrieval
  • Semantic search across historical conversations and knowledge base
  • Memory persistence across sessions
  • Temporal relevance weighting for context ranking

Tool System

SQLHTTPCodeShellRegistry
  • Extensible tool registry: SQL, HTTP, Code, and Shell operations
  • Tool execution with timeout, validation, and error handling
  • Streaming responses for long-running operations
  • Custom tool registration API

REST API & WebSocket

REST APIGET POST PUTWebSocketReal-timeServerStreaming
  • Full CRUD API for agents, sessions, and messages
  • WebSocket support for real-time streaming responses
  • RESTful endpoints with OpenAPI documentation
  • Rate limiting and authentication middleware

Background Jobs

QueueWorker 1Worker 2Worker 3
  • PostgreSQL-based job queue with worker pool
  • Retries and poison message handling
  • SKIP LOCKED for concurrent processing
  • Crash recovery and job state persistence
  • Tenant-aware job isolation

Authentication & Security

🔒API KeyRBACRate Limiter
  • API key-based authentication with rate limiting
  • Role-based access control (RBAC)
  • Request validation and sanitization
  • Audit logging for security compliance
  • Multi-tenant isolation at the database level

Session Management

Session 1ActiveSession 2ActiveSession 3IdleMessage HistoryContext preserved
  • Session lifecycle management with context preservation
  • Message history tracking and pagination
  • Multi-agent session support
  • Session timeout and cleanup policies

NeuronDB Integration

NeuronAgentNeuronDBIntegrationVector | Embeddings | LLM
  • Deep integration with NeuronDB for embeddings generation
  • Vector search and LLM operations
  • Direct SQL tool access to NeuronDB functions
  • Efficient context retrieval using HNSW indexes

Multi-Agent Collaboration

Agent 1Agent 2Agent 3Shared StateMemory & Context
  • Multi-agent collaboration with shared state and communication
  • Agent-to-agent messaging and coordination
  • Distributed task execution across multiple agents
  • Shared memory and context across agent sessions

Workflow Engine

StartTask 1Task 2Task 3End
  • Workflow engine for orchestrating complex multi-step tasks
  • Conditional branching and parallel execution
  • Task dependencies and scheduling
  • Workflow state management and recovery

Human-in-the-Loop (HITL)

Agent👤Approval
  • Human-in-the-loop integration for approval workflows
  • Interactive prompts for user feedback and guidance
  • Manual intervention points in automated processes
  • Human review and approval mechanisms

Budget Management

Budget DashboardTokens: 1.2MAPI: 5.4KCost: $4575% Used
  • Budget management with cost tracking per agent and session
  • Token usage monitoring and limits
  • API call budget enforcement
  • Cost analytics and reporting

Evaluation Framework

SuccessLatencyQualityA/B TestBenchmarkPerformance
  • Evaluation framework for agent performance assessment
  • Metrics collection: success rate, latency, quality scores
  • A/B testing capabilities for agent configurations
  • Automated testing and benchmarking tools

Capabilities

Agent runtime features

CapabilityDescriptionPerformanceProduction Ready
Agent State MachineState persistence, recovery, transitionsSub-second state changes
Long-term MemoryHNSW vector search, semantic retrievalMillisecond context lookup
Tool RegistrySQL, HTTP, Code, Shell toolsConcurrent execution
REST APIFull CRUD operations for agents, sessionsHigh-throughput requests
WebSocketReal-time streaming responsesLow-latency streaming
Background JobsJob queue with retries, SKIP LOCKEDNon-blocking async ops
Multi-Agent CollaborationShared state, agent-to-agent messagingDistributed task execution
Workflow EngineMulti-step task orchestration, conditional branchingParallel execution support
Human-in-the-Loop (HITL)Approval workflows, interactive promptsManual intervention support
Budget ManagementCost tracking, token limits, API call budgetsReal-time cost analytics
Evaluation FrameworkPerformance metrics, A/B testing, benchmarkingAutomated testing tools
AuthenticationAPI keys, rate limiting, RBACOAuth-ready
Get Started

Build AI Agents with NeuronAgent

Deploy NeuronAgent. Create autonomous agent systems with persistent memory, tool execution, and streaming responses.