The Agent Loop
The "brain" of seekr is a sophisticated implementation of the ReAct (Reasoning and Acting) pattern. While natively optimized for DeepSeek's high-reasoning models, it fully supports multiple LLMs via OpenAPI structured integrations.
The Reasoning Loop
- Input: The agent receives a task and its current system prompt.
- Reasoning: It analyzes the task, previous actions, and observations.
- Action: It selects one or more tools and provides the necessary arguments. seekr leverages multi-tool parallelism to execute independent actions concurrently.
- Observation: The results of the tool executions are fed back into the agent's context.
System Prompts
seekr uses carefully crafted system prompts that define its capabilities, limitations, and "personality". These prompts are designed to minimize hallucinations and ensure the agent stays on task.
Memory Management
As the conversation grows, seekr manages its token context using a sliding-window pruning strategy. It preserves the system prompt and initial task context while rotating out the oldest intermediate messages to stay within the model's context limits (typically keeping the last 100 messages). This ensures long-running sessions remain stable and responsive.
