diff --git a/docs/src/usage/arbiter_engine/agents_and_engines.md b/docs/src/usage/arbiter_engine/agents_and_engines.md index e477c8ec..baac9746 100644 --- a/docs/src/usage/arbiter_engine/agents_and_engines.md +++ b/docs/src/usage/arbiter_engine/agents_and_engines.md @@ -46,7 +46,7 @@ use crate::Replier; fn setup() { let ping_replier = Replier::new("ping", "pong", 5, None); let pong_replier = Replier::new("pong", "ping", 5, Some("ping")); - let agent = Agent::new("my_agent") + let agent = Agent::builder("my_agent") .with_behavior(ping_replier) .with_behavior(pong_replier); } @@ -55,4 +55,4 @@ In this example, we have created an `Agent` with two `Replier` behaviors. The `ping_replier` will reply to a message with "pong" and the `pong_replier` will reply to a message with "ping". Given that the `pong_replier` has a `startup_message` of "ping", it will send a message to everyone (including the "my_agent" itself who holds the `ping_replier` behavior) when it starts up. This will start a chain of messages that will continue in a "ping" "pong" fashion until the `max_count` is reached. -``` \ No newline at end of file +```