MCPcopy
hub / github.com/stitionai/devika / create_state

Method create_state

src/state.py:47–55  ·  view source on GitHub ↗
(self, project: str)

Source from the content-addressed store, hash-verified

45 }
46
47 def create_state(self, project: str):
48 with Session(self.engine) as session:
49 new_state = self.new_state()
50 new_state["step"] = 1
51 new_state["internal_monologue"] = "I'm starting the work..."
52 agent_state = AgentStateModel(project=project, state_stack_json=json.dumps([new_state]))
53 session.add(agent_state)
54 session.commit()
55 emit_agent("agent-state", [new_state])
56
57 def delete_state(self, project: str):
58 with Session(self.engine) as session:

Callers 1

executeMethod · 0.80

Calls 3

new_stateMethod · 0.95
emit_agentFunction · 0.90
AgentStateModelClass · 0.85

Tested by

no test coverage detected