Skip to content

Commit 5cb154f

Browse files
Enhance README with detailed value proposition and JavaScript tool calling examples
• Clarify core differentiators: transparency, programmatic control, extensibility, and vendor independence • Add "Why Construct?" section highlighting advantages over black-box AI assistants • Expand overview to emphasize API-first architecture and open-source nature • Document JavaScript-based tool calling with practical multi-step example • Show how agents can write loops, conditionals, and complex data processing logic Co-authored-by: construct-agent <noreply@construct.sh>
1 parent eabc7ae commit 5cb154f

1 file changed

Lines changed: 200 additions & 73 deletions

File tree

README.md

Lines changed: 200 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,129 @@
22
<img src="logo.jpeg" alt="Construct Logo" width="600"
33
</p>
44

5-
An API-first, multi-agent coding assistant designed for superior tool calling performance.
5+
<p align="center">
6+
<strong>An open-source AI coding assistant built for engineers who demand full control</strong>
7+
</p>
8+
9+
<p align="center">
10+
API-first • Superior tool calling • Multi-agent workflows • Complete transparency
11+
</p>
12+
13+
---
14+
15+
## Why Construct?
16+
17+
Most AI coding tools are black boxes. You interact through a web interface or thin CLI wrapper, with limited visibility and minimal control over the system.
18+
19+
Construct is different:
20+
21+
- **Full transparency**: See every tool call, export all data, understand costs
22+
- **Programmatic control**: Script every operation, integrate with existing workflows
23+
- **Extensibility**: Build custom agents, access everything via API
24+
- **Vendor independence**: Self-host, switch models, no lock-in
625

726
## Overview
827

9-
Construct is a next-generation coding assistant that breaks away from traditional black-box AI assistants. Built with an API-first approach, it offers unparalleled customization and extensibility while supporting multiple collaborative agents that can work together on complex tasks.
28+
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.
1029

1130
## Key Features
1231

13-
### API-first Architecture
14-
Everything in Construct can be configured via API, making it highly customizable and integrable with existing workflows and tools. This is in stark contrast to traditional coding assistants that operate as black boxes with limited configuration options.
32+
### Agents Write JavaScript to Call Tools
33+
34+
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.
35+
36+
**Example:** Systematically checking and fixing route files:
37+
38+
```javascript
39+
// Find all route files
40+
const routeFiles = find_file({
41+
pattern: "**/*route*.ts",
42+
path: "/project/src"
43+
});
44+
45+
print(`Processing ${routeFiles.files.length} route files...`);
46+
47+
for (const file of routeFiles.files) {
48+
// Check if this file needs authentication
49+
const matches = grep({
50+
query: "router\\.(get|post).*(?!authenticateToken)",
51+
path: file
52+
});
53+
54+
if (matches.total_matches > 0) {
55+
print(`⚠️ ${file}: Found ${matches.total_matches} unprotected endpoints`);
56+
57+
// Build edits dynamically based on findings
58+
const edits = [];
59+
matches.matches.forEach(match => {
60+
edits.push({
61+
old: match.line,
62+
new: match.line.replace(/(\([^,]+,\s*)/, '$1authenticateToken, ')
63+
});
64+
});
65+
66+
edit_file(file, edits);
67+
print(`✅ Protected ${edits.length} endpoints`);
68+
}
69+
}
70+
```
71+
72+
One execution instead of dozens of separate tool calls. Research shows this approach achieves 20% higher success rates vs JSON tool calling.
73+
74+
See [Tool Calling in Construct](docs/tool_calling.md) for a detailed technical analysis.
75+
76+
### API-First Architecture
77+
78+
The CLI is just one client. The daemon exposes every operation via ConnectRPC.
79+
80+
**Example:** Trigger code reviews from CI:
81+
82+
```python
83+
from construct import Client
84+
85+
client = Client()
86+
task = client.tasks.create(agent="reviewer", workspace=".")
87+
result = client.messages.create(
88+
task_id=task.id,
89+
content="Review this PR for security issues"
90+
)
91+
```
92+
93+
Build your own IDE plugins, Slack bots, or automation scripts. Full programmatic control over agents, tasks, messages, models, and providers.
94+
95+
Language SDKs for Python, TypeScript, and Go coming soon.
96+
97+
### Multiple Specialized Agents
98+
99+
Three built-in agents optimized for different phases of work:
15100

16-
### Multi-Agentic System
17-
Construct supports multiple agents by default that can work together on a task. The system handles agent handoffs and delegations automatically, allowing for specialized agents to tackle different aspects of a problem.
101+
- **plan** (Opus) - Architecture & complex decisions
102+
- **edit** (Sonnet) - Daily implementation work
103+
- **quick** (Haiku) - Simple refactors & formatting
18104

19-
### CodeAct Tool Calling
20-
Construct uses CodeAct tool calling with JavaScript for superior tool call performance. This approach provides more reliable and efficient tool execution compared to traditional methods.
105+
Switch between agents seamlessly. All agents share conversation history and workspace context.
21106

107+
**Create custom agents:**
108+
109+
```bash
110+
construct agent create reviewer \
111+
--model claude-opus \
112+
--prompt "You review Go code for race conditions..."
113+
```
114+
115+
### Full Terminal Experience
116+
117+
- **Persistent tasks**: Every conversation saved with full history and workspace context
118+
- **Resume anywhere**: `construct resume --last` instantly picks up where you left off
119+
- **Non-interactive mode**: `construct exec` for scripting and CI/CD pipelines
120+
- **Export everything**: `construct message list --task <id> -o json > conversation.json`
22121

23122
### Additional Features
24123

25-
- **Multiple Model Providers**: Support for various AI models including Anthropic, OpenAI, DeepSeek, and more
26-
- **Language SDKs**: SDKs available for multiple programming languages
27-
- **Model Context Protocol**: Enhanced context management for improved model performance
28-
- **Parallel Tool Use**: Execute multiple tools simultaneously for faster operations
29-
- **Checkpoints**: Save and restore the state of your work at any point
124+
- **Cost transparency**: Track token usage and cost per task
125+
- **Zero dependencies**: Single Go binary, just download and run
126+
- **Flexible deployment**: Local daemon, remote server, or your own infrastructure
127+
- **Open source**: Inspect the code, self-host, no vendor lock-in
30128

31129
## Architecture
32130

@@ -38,61 +136,51 @@ Construct is built with a modular architecture that separates concerns between:
38136

39137
The multi-agent system allows for specialized agents to collaborate on tasks, with the runtime managing message passing and coordination between agents.
40138

41-
## Getting Started
42-
43-
### Prerequisites
44-
45-
- Go 1.19 or later (for building from source)
46-
- A supported operating system (macOS, Linux)
139+
## Quick Start
47140

48141
### Installation
49142

50143
```bash
51-
# Clone the repository
144+
# Clone and build
52145
git clone https://github.com/furisto/construct
53-
cd construct
54-
55-
# Build the CLI
56-
cd frontend/cli
146+
cd construct/frontend/cli
57147
go build -o construct
58148

59-
# Install the daemon
60-
./construct daemon install
149+
# Install to PATH (optional)
150+
sudo mv construct /usr/local/bin/
61151
```
62152

63-
### Quick Start
64-
65-
1. **Install and start the daemon**:
66-
```bash
67-
construct daemon install
68-
```
69-
70-
2. **Create a model provider** (required before creating agents):
71-
```bash
72-
# For OpenAI
73-
construct modelprovider create "openai" --type openai --api-key "your-api-key"
74-
75-
# For Anthropic
76-
construct modelprovider create "anthropic" --type anthropic --api-key "your-api-key"
77-
```
78-
79-
3. **Create models**:
80-
```bash
81-
construct model create "gpt-4" --provider "openai" --context-window 8192
82-
construct model create "claude-3-5-sonnet" --provider "anthropic" --context-window 200000
83-
```
84-
85-
4. **Create your first agent**:
86-
```bash
87-
construct agent create "coder" --prompt "You are a helpful coding assistant" --model "claude-3-5-sonnet"
88-
```
89-
90-
5. **Start a conversation**:
91-
```bash
92-
construct new --agent coder
93-
# or ask a quick question
94-
construct ask "Help me write a hello world function in Python"
95-
```
153+
### Setup (5 minutes)
154+
155+
```bash
156+
# 1. Install daemon
157+
construct daemon install
158+
159+
# 2. Configure provider (Anthropic example)
160+
export ANTHROPIC_API_KEY="sk-ant-..."
161+
construct modelprovider create anthropic --type anthropic
162+
163+
# 3. Register models
164+
construct model create claude-sonnet-4 \
165+
--provider anthropic \
166+
--context-window 200000
167+
168+
construct model create claude-haiku-3.5 \
169+
--provider anthropic \
170+
--context-window 200000
171+
172+
# 4. Create agents
173+
construct agent create edit \
174+
--model claude-sonnet-4 \
175+
--prompt "You are a coding assistant who writes clean, well-documented code"
176+
177+
construct agent create quick \
178+
--model claude-haiku-3.5 \
179+
--prompt "You are a fast coding assistant for quick tasks"
180+
181+
# 5. Start coding
182+
construct new --agent edit
183+
```
96184

97185
## Usage Examples
98186

@@ -109,21 +197,22 @@ construct resume --last
109197
construct new --agent coder --workspace /path/to/project
110198
```
111199

112-
### Quick Questions with Context
200+
### Non-Interactive Mode
113201

114202
```bash
115-
# Ask a simple question
116-
construct ask "What is the time complexity of quicksort?"
117-
118-
# Include files for context
119-
construct ask "Review this code for bugs" --file main.go --file utils.go
203+
# Execute a task and exit
204+
construct exec "Review this code for security issues" \
205+
--agent reviewer \
206+
--file src/auth.go
120207

121208
# Use piped input
122-
cat error.log | construct ask "What's causing this error?"
209+
cat error.log | construct exec "What's causing this error?"
123210

124-
# Complex analysis with multiple turns
125-
construct ask "Analyze this architecture and suggest improvements" \
126-
--agent architect --max-turns 10 --file architecture.md
211+
# Include multiple files for context
212+
construct exec "Analyze this architecture" \
213+
--file design.md \
214+
--file implementation.go \
215+
--max-turns 10
127216
```
128217

129218
### Agent Management
@@ -184,18 +273,56 @@ construct config set cmd.ask.max-turns 10
184273
construct config get cmd.new.agent
185274
```
186275

187-
## Documentation
276+
## Roadmap
277+
278+
Construct is actively developed. Planned features:
188279

189-
For more detailed documentation, please refer to:
280+
- **MCP support** - Model Context Protocol integration
281+
- **More providers** - Bedrock, Gemini, and additional model providers
282+
- **Agent delegation** - Agents can send messages to and delegate work to other agents
283+
- **Fine-grained permissions** - Control which tools each agent can use
284+
- **Complete privacy mode** - No analytics, no telemetry
285+
- **Language SDKs** - Python, TypeScript, and Go client libraries
190286

287+
See [GitHub Issues](https://github.com/furisto/construct/issues) for detailed feature requests and progress tracking.
288+
289+
## Documentation
290+
291+
- [Tool Calling in Construct](docs/tool_calling.md) - Technical deep dive on JavaScript-based tool calling
191292
- [CLI Reference](docs/cli_reference.md) - Complete reference for all CLI commands
192293
- [API Reference](https://docs.construct.sh/api) (Coming soon)
193294
- [User Guide](https://docs.construct.sh/guide) (Coming soon)
194295

296+
## Support
297+
298+
### Getting Help
299+
300+
- **Documentation**: Check the [docs/](docs/) directory for guides and references
301+
- **GitHub Discussions**: Ask questions and discuss ideas
302+
- **GitHub Issues**: Report bugs and request features
303+
304+
### Reporting Issues
305+
306+
Found a bug? Please [open an issue](https://github.com/furisto/construct/issues/new) with:
307+
- Clear description of the problem
308+
- Steps to reproduce
309+
- Your environment (OS, Go version, Construct version)
310+
- Relevant logs or error messages
311+
312+
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines on reporting issues.
313+
195314
## Contributing
196315

197-
Contributions are welcome! Please feel free to submit a Pull Request.
316+
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines on:
317+
318+
- Development setup and workflow
319+
- Coding standards and best practices
320+
- Testing requirements
321+
- Pull request process
322+
- Reporting issues
198323

199324
## License
200325

201-
[License information will be provided here]
326+
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
327+
328+
Copyright 2025 Thomas Schubart

0 commit comments

Comments
 (0)