A programmable AI coding assistant designed for automation and integration
API-first • CodeAct tool calling • Multi-agent workflows • Self-hostable
Most AI coding tools lock you into their interface and workflows. Construct is built for integration and automation. Construct gives you full programmatic control.
- Programmatic control: Script every operation, integrate with existing workflows
- Extensibility: Build custom agents, access everything via API
- Vendor independence: Self-host, switch models, no lock-in
- Full visibility: Export all data, track costs, inspect every operation
Construct is an open-source AI coding assistant with an API-first architecture. Everything—agents, tasks, conversations, tool calls—is accessible programmatically. The CLI is just one client of the daemon's ConnectRPC API.
Instead of rigid JSON schemas, agents write executable JavaScript code to call tools. This enables loops, conditionals, and complex data processing in a single execution.
Example: Systematically checking and fixing route files:
// Find all route files
const routeFiles = find_file({
pattern: "**/*route*.ts",
path: "/project/src"
});
print(`Processing ${routeFiles.files.length} route files...`);
for (const file of routeFiles.files) {
// Check if this file needs authentication
const matches = grep({
query: "router\\.(get|post).*(?!authenticateToken)",
path: file
});
if (matches.total_matches > 0) {
print(`⚠️ ${file}: Found ${matches.total_matches} unprotected endpoints`);
// Build edits dynamically based on findings
const edits = [];
matches.matches.forEach(match => {
edits.push({
old: match.line,
new: match.line.replace(/(\([^,]+,\s*)/, '$1authenticateToken, ')
});
});
edit_file(file, edits);
print(`âś… Protected ${edits.length} endpoints`);
}
}One execution instead of dozens of separate tool calls. Research by Wang et al. (2024) demonstrates that code-based tool calling achieves up to 20% higher success rates compared to JSON and text-based approaches across 17 different language models.
See Tool Calling in Construct for a detailed technical analysis and full citation.
The CLI is just one client. The daemon exposes every operation via ConnectRPC.
Build your own IDE plugins, Slack bots, or automation scripts. Full programmatic control over agents, tasks, messages, models, and providers.
Construct's daemon can run anywhere - locally, on a remote server, or in cloud sandboxes. The architecture supports connecting to remote daemons, enabling:
Deploy daemon to cloud sandbox:
# Run daemon in isolated environment (Docker, E2B, Fly.io, etc.)
construct daemon run --listen-http 0.0.0.0:8080Use cases enabled by remote daemon support:
- Isolated execution: Run agents in sandboxed environments separate from your development machine
- Persistent agents: Long-running tasks that continue even when you disconnect
- Multi-client control: Multiple CLI instances can interact with the same daemon
- Cloud integration: Deploy on serverless platforms, Kubernetes, or container services
- HTTP/2 streaming: Real-time updates via ConnectRPC for interruptible agent runs
Unlike AI tools designed only for local use, Construct's API-first design makes it a natural fit for remote agent orchestration. Remote context switching and management commands coming soon.
Language SDKs for Python, TypeScript, and Go coming soon.
Three built-in agents optimized for different phases of work:
- plan (Opus) - Architecture & complex decisions
- edit (Sonnet) - Daily implementation work
- quick (Haiku) - Simple refactors
Switch between agents seamlessly. All agents share conversation history and workspace context.
Create custom agents:
construct agent create reviewer \
--model claude-opus \
--prompt "You review Go code for race conditions..."- Persistent tasks: Every conversation saved with full history and workspace context
- Resume anywhere:
construct resume --lastinstantly picks up where you left off - Non-interactive mode:
construct execfor scripting and CI/CD pipelines - Export everything:
construct message list --task <id> -o json > conversation.json
- Cost transparency: Track token usage and cost per task
- Zero dependencies: Single Go binary, just download and run
- Flexible deployment: Local daemon, remote server, or your own infrastructure
- Open source: Inspect the code, self-host, no vendor lock-in
Warning
Construct is in preview. Expect bugs, breaking changes and missing features as we actively develop toward a stable release. Report issues to help us improve.
macOS (Homebrew):
brew tap furisto/tap
brew install constructDownload pre-built binary:
Download the latest release for your platform from GitHub Releases.
Build from source:
git clone https://github.com/furisto/construct
cd construct/frontend/cli
go build -o construct
# Install to PATH (optional)
sudo mv construct /usr/local/bin/# 1. Install daemon (or run manually: construct daemon run --listen-unix /tmp/construct.sock)
construct daemon install
# 2. Configure provider (Anthropic example)
export ANTHROPIC_API_KEY="sk-ant-..."
construct modelprovider create anthropic --type anthropic
# 3. Start coding
construct new --agent edit# Start a new interactive session
construct new --agent plan
# Resume a previous conversation
construct resume --last
# Work in a specific directory
construct new --agent edit --workspace /path/to/project# Execute a task and exit
construct exec "Review this code for security issues" \
--agent reviewer \
--file src/auth.go
# Use piped input
cat error.log | construct exec "What's causing this error?"
# Include multiple files for context
construct exec "Analyze this architecture" \
--file design.md \
--file implementation.go \
--max-turns 10# List all agents
construct agent list
# Create specialized agents
construct agent create "debugger" \
--prompt "You are an expert at debugging code and finding issues" \
--model "gpt-4" \
--description "Debugging specialist"
construct agent create "reviewer" \
--prompt-file ./prompts/code-reviewer.txt \
--model "claude-3-5-sonnet"
# Edit agent configuration
construct agent edit reviewer
# Get agent details
construct agent get reviewer --output json# List and manage tasks
construct task list --agent coder
construct task get <task-id>
# Export conversation history
construct message list --task <task-id> -o json
# Configure defaults
construct config set cmd.new.agent "coder"Construct follows a daemon-based, client-server architecture designed for extensibility and programmatic access:
graph TD
CLI[CLI Client] -->|HTTP/2| API[API Layer<br/>ConnectRPC]
Custom[Custom Clients] -.->|HTTP/2| API
API --> TR[Task Reconciler]
TR --> INT[CodeAct Interpreter<br/>Sobek VM]
TR --> Provider[Model Providers<br/>Anthropic/OpenAI/etc]
TR --> DB[(SQLite Database)]
INT --> Tools[Tool Execution<br/>read_file, edit_file, grep, etc]
Key components:
- Daemon: Background service managing agent execution, state, and coordination
- ConnectRPC API: HTTP/2-based RPC exposing all operations via Protocol Buffers
- Task Reconciler: Orchestrates conversation flows between models and tool execution
- CodeAct Interpreter: Executes JavaScript-based tool calls in sandboxed environment
- Storage: SQLite database for persisting all state
See Architecture Documentation for detailed technical deep dive.
Construct is under active development. Planned features grouped by category:
Integration & APIs
- Language SDKs - Python, TypeScript, and Go client libraries
- Remote daemon support - CLI commands for managing and switching between remote contexts
- MCP support - Model Context Protocol integration
Model Providers
- More providers - Bedrock, Gemini, and additional model providers
- Complete privacy mode - Use local models with zero telemetry
Agent Capabilities
- Agent delegation - Agents can collaborate and delegate work to specialized agents
- Virtual agents - Agents that adapt behavior based on the model they use
- Long-horizon tasks - Enhanced support for complex, multi-day tasks
Security & Safety
- Fine-grained permissions - Control which tools each agent can access
- Sandboxing - Isolate agent execution in secure containers
- Checkpoints - Create snapshots of repository state before agent modifications
See GitHub Issues for detailed feature requests and progress tracking.
- Architecture Documentation - Detailed technical deep dive into Construct's design
- Tool Calling in Construct - Technical deep dive on JavaScript-based tool calling
- CLI Reference - Complete reference for all CLI commands
- API Reference (Coming soon)
- User Guide (Coming soon)
- Documentation: Check the docs/ directory for guides and references
- GitHub Discussions: Ask questions and discuss ideas
- GitHub Issues: Report bugs and request features
Found a bug? Please open an issue with:
- Clear description of the problem
- Steps to reproduce
- Your environment (OS, Go version, Construct version)
- Relevant logs or error messages
See CONTRIBUTING.md for detailed guidelines on reporting issues.
Contributions are welcome! Please see CONTRIBUTING.md for detailed guidelines on:
- Development setup and workflow
- Coding standards and best practices
- Testing requirements
- Pull request process
- Reporting issues
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Copyright 2025 Thomas Schubart


