# Agent initialization

**URL:** https://discourse.julialang.org/t/agent-initialization/117682
**Category:** Modelling & Simulations
**Created:** [July 31, 2024, 2:45pm UTC](https://discourse.julialang.org/t/agent-initialization/117682 "2024-07-31T14:45:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![geoffD](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@geoffD](https://discourse.julialang.org/u/geoffD)
#### Post date: [July 31, 2024, 2:45pm UTC](https://discourse.julialang.org/t/agent-initialization/117682/1 "2024-07-31T14:45:10Z")

</div>

Good morning, everyone. I have a model in which the @agent struct statement contains about 25 parameters for the agent. I would like to set this up such that I can specify default values and then overwrite one or two of them later with add\_agent, without having to specify the entire list of parameters in add\_agent. Is this possible?

Secondly, when I am initializing an agent with parameters that are all non-default values, I end up with a long string of values that are challenging to track/validate:

`add_agent!(Sheep, model, 1,0,1,0,0,0,0,false,true,0,1)`

Is there a way to make this into key/value pairs?

`add_agent!(Sheep, model, :energy=>2, :hair_color=>blue, :height=>27 etc)`

Thanks!
