Repository navigation
v1.0.0 – Go Agent API (Eino Workflow + LiteLLM + Full Stack)
Pre-releasev1.0.0 – Initial Stable Release
This marks the first stable pre production-ready release of go-agent-api.
The project now includes a complete AI agent backend stack built with:
- Go 1.22+
- PostgreSQL 16
- Redis 7
- Eino (LangGraph-style workflow engine)
- LiteLLM (OpenAI-compatible tool calling)
- Docker & Docker Compose full-stack setup
Everything builds cleanly, passes go vet, and the compiled binary (~18MB) builds successfully.
🚀 Highlights
🧠 Eino Workflow Engine
Full multi-agent workflow engine implemented using a DAG architecture:
- 6 workflow nodes:
routerthinkactobservehuman_approvalresponse
- Conditional branching
- Keyword-based agent routing
- Tool execution loop
- Human-in-the-loop approval flow
- Metrics tracking
- Deterministic state handling
Files:
agent_state.gochatbot_graph.go
🏗 Domain-Driven Architecture
Domain Entities
user.go— Roles (admin/user/agent), permission helperstoken.go— API/access/refresh tokens, rate limits, model/tool access controlconversation.go— Aggregate root with workflow state & approval lifecyclemessage.go— OpenAI-compatible message + tool call support
Value Objects
email.go— Validated + normalized emailmessage_role.go— Type-safe rolestool_call.go— JSON-validated tool calls
Domain Events
message_created.gotool_executed.goconversation_completed.go
Domain Services
auth_domain_service.goconversation_domain_service.go
Repository Interfaces (Pure Go)
- UserRepository
- TokenRepository
- ConversationRepository
- MessageRepository
Zero framework dependencies.
🔐 Authentication & Authorization
JWT Manager:
- Access + Refresh token generation
- Validation
- API key hashing
Use Cases:
- login
- refresh_token
- validate_token
- create_user
Role-based tool & model access enforcement.
💬 Chat & Agent System
OpenAI-compatible Chat API:
- Tool calling support
- Streaming (SSE)
- Conversation persistence
- Human approval for tool execution
- Multi-agent routing
Use Cases:
- send_message (streaming supported)
- get_conversation
- list_conversations
- approve_action
🛠 Built-in Tools
- Calculator
- Web search
- Tool registry system
- Structured execution pipeline
- Approval workflow support
🗄 Infrastructure
PostgreSQL (Full Implementation)
Connection pooling + full CRUD repositories:
- Users
- Tokens
- Conversations
- Messages
- Tool executions
Includes:
- JSONB workflow state
- GIN index on tags
- Soft delete support
- Partial indexes
- Updated_at triggers
- Status check constraints
- UUID primary keys
SQL Migrations (10 files)
- users
- user_tokens
- conversations
- messages
- tool_executions
Each with up/down migrations.
⚡ Redis Integration
- Caching
- Rate limiting
- Workflow state support
- Graceful degradation
- Namespaced keys
🤖 LiteLLM Integration
Full OpenAI-compatible client:
- Chat
- Streaming (SSE)
- Tool call support
- Configurable models:
- GPT-4o
- GPT-4o-mini
- Claude 3.5 Sonnet
Files:
openai_format.go- LiteLLM client implementation
🌐 HTTP Layer
Middleware:
- Authentication
- Rate limiting
- Logging
- Recovery
- CORS
- Request ID
Handlers:
- health
- auth
- chat (OpenAI-compatible)
- tools
Standardized JSON + SSE responses.
🐳 Docker & Dev Experience
Multi-stage Docker build (scratch-based)
- Go 1.24 builder
- Minimal runtime image
docker-compose stack:
- API
- PostgreSQL 16
- Redis 7
- LiteLLM
- Migration runner
- Health checks
- Resource limits
🧰 Developer Tooling
- Makefile (20+ targets)
.env.exampleconfig.example.yamlair.toml(hot reload)migrate.sh- Clean
.gitignore
Commands:
- build
- run
- test
- lint
- migrate
- docker
- dev-deps
- clean
🧱 Error Handling
errors.go:
- AppError type
- Wrap/Unwrap support
- Sentinel errors:
- NotFound
- Unauthorized
- TokenExpired
- RateLimitExceeded
- etc.
📊 Production Readiness
- Clean compilation
go vetpasses- Deterministic workflow engine
- Repository abstraction
- No framework lock-in
- OpenAI-compatible API surface
- Streaming support
- Fully containerized stack
🏁 Versioning
This is the first stable v1.0.0 release.
Future releases will follow Semantic Versioning:
- MAJOR – breaking changes
- MINOR – new features
- PATCH – fixes
🔮 What's Next
- Observability (metrics/tracing)
- Distributed workflow execution
- Multi-tenant support
- Extended tool ecosystem
- Horizontal scaling strategies
Thank you for using go-agent-api 🚀