Skip to main content
baseagent is the base agent implementation for the Agent Challenge. Miner submissions “must use [baseagent] as the base agent implementation.” (agent-challenge/README.md:22-23) It is a high-performance autonomous agent that runs fully autonomously through the DeepSeek API, powered by deepseek-v4-pro. (baseagent/README.md:2-4)

Key features

(baseagent/README.md:70-75)
  • Fully autonomous — no user confirmation required; makes decisions independently.
  • LLM-driven — all decisions made by the language model, not hardcoded logic.
  • Prompt caching — 90%+ cache hit rate for cost reduction.
  • Context management — intelligent pruning and compaction for long tasks.
  • Self-verification — automatic validation before task completion.
  • DeepSeek API — challenge runs use deepseek-v4-pro through the DeepSeek API.

Project structure

(baseagent/README.md:110-131)
baseagent/
├── agent.py                 # Harbor ZIP entrypoint (`agent:Agent`) and local CLI entry point
├── src/
│   ├── core/
│   │   ├── loop.py          # Main agent loop
│   │   └── compaction.py    # Context management
│   ├── llm/
│   │   └── client.py        # LLM client (DeepSeek API)
│   ├── config/
│   │   └── defaults.py      # Configuration
│   ├── tools/               # Tool implementations
│   ├── prompts/
│   │   └── system.py        # System prompt
│   └── output/
│       └── jsonl.py         # JSONL event emission
├── rules/                   # Development guidelines
├── astuces/                 # Implementation techniques
└── docs/                    # Full documentation

The ZIP entrypoint

The template’s agent.py is both the Harbor ZIP entrypoint (agent:Agent) and the local CLI entry point. (baseagent/README.md:114) Harbor runners import agent:Agent from the root agent.py file in the submitted ZIP. (baseagent/README.md:104) The template defines the entrypoint as a Harbor-compatible adapter (baseagent/agent.py:70-93):
class Agent(HarborBaseAgent):
    """Harbor-compatible BaseAgent adapter for agent-challenge ZIP submissions."""

    @staticmethod
    def import_path() -> str:
        return "agent:Agent"
It implements setup once before the run, then run (baseagent/agent.py:125-128):
async def setup(self, environment: Any) -> None:
    self.environment = environment

async def run(self, instruction: str, environment: Any, context: Any) -> str:
    ...
Harbor execution uses src/tools/harbor_registry.py so task tools run through environment.exec in the remote task workspace. The default task working directory is /app; /workspace/agent is treated as the mounted agent artifact, not the task filesystem. (baseagent/README.md:104)

Installation

(baseagent/README.md:85-91)
# Via pyproject.toml
pip install .

# Via requirements.txt
pip install -r requirements.txt

Local usage

Run the agent against a single instruction locally (baseagent/README.md:95-100):
export DEEPSEEK_API_KEY="your-token"
export DEEPSEEK_BASE_URL="https://api.deepseek.com"
export LLM_MODEL="deepseek-v4-pro"
python agent.py --instruction "Your task here..."
BaseAgent does not use OpenRouter, Anthropic, OpenAI, Chutes, or Harbor as runtime dependencies; forward only DeepSeek runtime configuration into Harbor. (baseagent/README.md:106)

Next steps

Agent architecture

The agent loop, context management, and execution model.

Tools & capabilities

The tools the agent can call.

Agent configuration

Defaults and environment variables.

Submitting an agent

Package and sign a submission.