1use crate::context::ContextPolicy;
4
5#[derive(Debug, Clone)]
7pub struct AgentConfig {
8 pub max_iterations: usize,
10
11 pub context_policy: ContextPolicy,
13}
14
15impl Default for AgentConfig {
16 fn default() -> Self {
17 Self {
18 max_iterations: 10_000,
19 context_policy: ContextPolicy::default(),
20 }
21 }
22}
23
24impl AgentConfig {
25 #[must_use]
27 pub fn new() -> Self {
28 Self::default()
29 }
30
31 #[must_use]
33 pub const fn with_max_iterations(mut self, limit: usize) -> Self {
34 self.max_iterations = limit;
35 self
36 }
37
38 #[must_use]
40 pub const fn with_context_policy(mut self, policy: ContextPolicy) -> Self {
41 self.context_policy = policy;
42 self
43 }
44}