Containerized web service platform for building and orchestrating agentic workflows.
agent-lab provides a Go-based web service architecture for developing intelligent agentic workflows. Built on the foundation of:
- go-agents - LLM integration core
- go-agents-orchestration - Workflow patterns
- document-context - Document processing
agent-lab/
├── cmd/
│ ├── server/ # HTTP server entry point and composition
│ └── migrate/ # Database migration CLI
├── internal/ # Private packages
│ ├── config/ # Configuration management
│ ├── database/ # Database connection management
│ ├── lifecycle/ # Startup/shutdown coordination
│ ├── middleware/ # HTTP middleware
│ ├── routes/ # Route registration
│ ├── providers/ # Provider domain system
│ └── agents/ # Agents domain system
├── pkg/ # Public packages
│ ├── handlers/ # HTTP response utilities
│ ├── openapi/ # OpenAPI spec utilities
│ ├── pagination/ # Pagination utilities
│ ├── query/ # SQL query builder
│ └── repository/ # Database helpers
├── web/ # Web assets
│ └── docs/ # API documentation (Scalar UI)
├── tests/ # Black-box tests
├── compose/ # Docker Compose files
└── config.toml # Base configuration
# Start PostgreSQL
docker compose -f compose/postgres.yml up -d
# Run database migrations
go run ./cmd/migrate -dsn "postgres://agent_lab:agent_lab@localhost:5432/agent_lab?sslmode=disable" -up
# Build and run server
go build -o bin/server ./cmd/server
./bin/server
# Health check (liveness)
curl http://localhost:8080/healthz
# Readiness check (subsystems operational)
curl http://localhost:8080/readyz
# API documentation (Scalar UI)
open http://localhost:8080/docsConfiguration loads from config.toml with optional environment-specific overlays (config.{env}.toml) and environment variable overrides.
Set SERVICE_ENV to load an overlay:
SERVICE_ENV=dev ./bin/server # Loads config.dev.tomlSee config.toml for available settings.
# Run all tests
go test ./tests/... -v
# Run with coverage
go test ./tests/... -coveragent-lab includes sample workflows that demonstrate live agent integration. Test these via the Scalar API documentation at http://localhost:8080/docs.
- Ensure the server is running
- Create an agent profile via
POST /api/agents(or use an existing one) - Note the agent's UUID for use in workflow params
List registered workflows:
GET /api/workflows
Single-node workflow that summarizes input text using an AI agent.
Endpoint: POST /api/workflows/summarize/execute
Request Body (for Scalar interface):
{
"params": {
"agent_id": "<AGENT_UUID>",
"text": "The quick brown fox jumps over the lazy dog. This sentence contains every letter of the alphabet and is commonly used for typing practice."
}
}Optional Parameters:
system_prompt- Override the default summarization prompttoken- Runtime API token override
Multi-node workflow that performs step-by-step reasoning: analyze → reason → conclude.
Endpoint: POST /api/workflows/reasoning/execute
Request Body (for Scalar interface):
{
"params": {
"agent_id": "<AGENT_UUID>",
"problem": "If all roses are flowers and some flowers fade quickly, can we conclude that some roses fade quickly?"
}
}Optional Parameters:
analyze_system_prompt- Override the analyze node promptreason_system_prompt- Override the reason node promptconclude_system_prompt- Override the conclude node prompttoken- Runtime API token override
List all runs:
GET /api/workflows/runs
Get a specific run:
GET /api/workflows/runs/{run_id}
View execution stages (for multi-node workflows):
GET /api/workflows/runs/{run_id}/stages
- ARCHITECTURE.md - Technical specifications and design patterns
- AGENTS.md - Agents API guide with curl examples
- CLAUDE.md - Development conventions and workflow
- PROJECT.md - Project roadmap and milestones
- _context/web-service-architecture.md - Architectural philosophy
All rights reserved.