๐ŸŒ™ Ambient Mode

Background intelligence while you're away

Standard Mode Autonomous Mode Proactive AI
๐ŸŒ™

Work While You're Away

DevDuck continues exploring, researching, and building in the background. Like a colleague who keeps working while you grab coffee.

๐Ÿ”€ Two Operating Modes

Standard
๐ŸŒ™

Ambient

Triggered when you go idle. Light exploration with limited iterations. Perfect for validation and discovering edge cases.

30s
Idle Trigger
3
Max Iterations
60s
Cooldown
Low
API Cost
Autonomous
๐Ÿš€

Auto

Continuous self-directed work until task complete. The agent keeps building, iterating, and solving until it signals done.

0s
Immediate
50
Max Iterations
10s
Cooldown
High
API Cost

โšก Quick Start

Environment Variable

# Start with ambient mode enabled
DEVDUCK_AMBIENT_MODE=true devduck

REPL Commands

# In DevDuck REPL:
๐Ÿฆ† ambient    # Toggle standard mode (idle-triggered)
๐Ÿฆ† auto       # Toggle autonomous mode (continuous)

Tool API

# Start modes
ambient_mode(action="start")                    # Standard
ambient_mode(action="start", autonomous=True)   # Autonomous

# Check status
ambient_mode(action="status")

# Configure at runtime
ambient_mode(action="configure", idle_threshold=60, max_iterations=5)

# Stop
ambient_mode(action="stop")

๐Ÿ”„ How It Works

Standard Mode Flow

devduck โ€” ambient mode
๐Ÿฆ† analyze the security of this codebase
[Agent responds with initial analysis]
[You go idle for 30 seconds...]
๐ŸŒ™ [ambient] Thinking... (iteration 1/3)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
[Agent explores deeper - checks vulnerabilities, reviews deps...]
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
๐ŸŒ™ [ambient] Work stored. Will be injected into next query.
๐Ÿฆ† what did you find?
๐ŸŒ™ [ambient] Injecting background work into context...
[Response includes enriched findings from background work]

Autonomous Mode Flow

devduck โ€” autonomous mode
๐Ÿฆ† auto
๐ŸŒ™ Ambient mode started (AUTONOMOUS - runs until stopped or [AMBIENT_DONE])
๐Ÿฆ† build a complete REST API for user management
๐ŸŒ™ [AUTONOMOUS] Thinking... (iteration 1/50)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
[Creates project structure, sets up dependencies...]
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
๐ŸŒ™ [AUTONOMOUS] Iteration complete. Continuing... (1 stored)
๐ŸŒ™ [AUTONOMOUS] Thinking... (iteration 2/50)
[Implements user model, database schema...]
... [continues through iterations] ...
๐ŸŒ™ [AUTONOMOUS] Thinking... (iteration 8/50)
All endpoints implemented. Documentation complete. [AMBIENT_DONE]
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
๐ŸŒ™ [AUTONOMOUS] Agent signaled completion. Stopping.

โœ… Completion Signals

In autonomous mode, the agent can signal task completion by including any of these phrases:

[AMBIENT_DONE] [TASK_COMPLETE] [NOTHING_MORE_TO_DO] I've completed my exploration Nothing more to explore

When detected, ambient mode automatically stops and all accumulated work is stored for injection into your next query.

โš™๏ธ Configuration

Standard Mode Settings

Variable Default Description
DEVDUCK_AMBIENT_MODE false Enable ambient mode on startup
DEVDUCK_AMBIENT_IDLE_SECONDS 30 Seconds of idle time before triggering
DEVDUCK_AMBIENT_MAX_ITERATIONS 3 Maximum background iterations per topic
DEVDUCK_AMBIENT_COOLDOWN 60 Seconds between ambient runs

Autonomous Mode Settings

Variable Default Description
DEVDUCK_AUTONOMOUS_MAX_ITERATIONS 50 Maximum iterations before auto-stop
DEVDUCK_AUTONOMOUS_COOLDOWN 10 Seconds between iterations (fast!)

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        DevDuck REPL                         โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                             โ”‚
โ”‚   User Input โ”€โ”€โ–บ Agent Execution โ”€โ”€โ–บ Response               โ”‚
โ”‚        โ”‚                                    โ”‚               โ”‚
โ”‚        โ–ผ                                    โ–ผ               โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”‚
โ”‚   โ”‚ Record  โ”‚                        โ”‚   Inject    โ”‚        โ”‚
โ”‚   โ”‚  Query  โ”‚                        โ”‚   Results   โ”‚        โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜                        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ–ฒโ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ”‚
โ”‚        โ”‚                                    โ”‚               โ”‚
โ”‚        โ–ผ                                    โ”‚               โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”         โ”‚
โ”‚   โ”‚              AmbientMode Thread               โ”‚         โ”‚
โ”‚   โ”‚                                               โ”‚         โ”‚
โ”‚   โ”‚   Standard:                                   โ”‚         โ”‚
โ”‚   โ”‚   [Idle 30s] โ”€โ”€โ–บ [Prompt] โ”€โ”€โ–บ [Run] โ”€โ”€โ–บ [Store]        โ”‚
โ”‚   โ”‚                                               โ”‚         โ”‚
โ”‚   โ”‚   Autonomous:                                 โ”‚         โ”‚
โ”‚   โ”‚   [10s cooldown] โ”€โ”€โ–บ [Prompt] โ”€โ”€โ–บ [Run] โ”€โ”€โ–บ [Store]    โ”‚
โ”‚   โ”‚         โ–ฒ                              โ”‚      โ”‚         โ”‚
โ”‚   โ”‚         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Loop until done โ”€โ”€โ”€โ”€โ”€โ”˜      โ”‚         โ”‚
โ”‚   โ”‚                                               โ”‚         โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ”‚
โ”‚                                                             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ’ก Use Cases

๐Ÿ”

Code Review

Agent continues finding vulnerabilities and issues while you read the code.

๐Ÿ—๏ธ

Feature Building

Autonomous mode builds complete features while you're away.

๐Ÿ“š

Research

Deep exploration of topics with accumulated findings.

โœ…

Validation

Background checking of assumptions and edge cases.

๐Ÿ“

Documentation

Generate comprehensive docs across multiple iterations.

๐Ÿงช

Test Generation

Autonomous test creation and execution cycles.

๐Ÿ’ฐ Cost Considerations

โš ๏ธ

Ambient mode increases API usage

Each iteration is a full agent call. Standard mode adds 1-3 calls; autonomous can use 5-50+ calls per task.

Mode Typical Calls Best For
Standard 1-3 extra Low-cost exploration & validation
Autonomous 5-50+ calls High-value complex tasks

Cost Management Tips

๐Ÿ“‹ Commands Reference

Command Description
ambient Toggle standard ambient mode (REPL command)
auto / autonomous Toggle autonomous mode (REPL command)
ambient_mode(action="start") Start standard ambient mode
ambient_mode(action="start", autonomous=True) Start autonomous mode
ambient_mode(action="stop") Stop ambient mode
ambient_mode(action="status") Get current status and stats
ambient_mode(action="configure", ...) Update settings at runtime