Code Agent Builder • Rust AI Agent SDK
CodeAgentBuilder: Builder for CodeAgent
CodeAgentBuilder
Defined in the agents module.
Rust AI Agent SDK
Builder for CodeAgent
Fields
| Name | Type | Description |
|---|---|---|
name | Option<String> | – |
model | Option<String> | – |
config | CodeConfig | – |
instructions | Option<String> | – |
verbose | bool | – |
Methods
name
fn name(mut self, name: impl Into<String>) -> SelfSet the agent name
Parameters:
| Name | Type |
|---|---|
name | impl Into<String> |
model
fn model(mut self, model: impl Into<String>) -> SelfSet the model
Parameters:
| Name | Type |
|---|---|
model | impl Into<String> |
config
fn config(mut self, config: CodeConfig) -> SelfSet the config
Parameters:
| Name | Type |
|---|---|
config | CodeConfig |
instructions
fn instructions(mut self, instructions: impl Into<String>) -> SelfSet instructions
Parameters:
| Name | Type |
|---|---|
instructions | impl Into<String> |
build
fn build(self) -> Result<CodeAgent>Build the CodeAgent
Source
View on GitHubpraisonai/src/agents/mod.rs at line 848