began replacing agent column with agent_id column / table

not working yet
fixed crashes since replacing agent column with agent_id