Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions content_creator/byLLM/approach_2/agent_core.jac
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ walker supervisor {
return None;
}
def route_to_agent(utterance: str, history: str) -> AgentTypes abs;
can supervise with `root entry {
memory_list = [root --> (`?Memory)];
can supervise with Root entry {
memory_list = [root --> (?:Memory)];
if not memory_list {
memory_list = root ++> Memory();
}
Expand Down Expand Up @@ -168,7 +168,7 @@ walker agent {
return None;
}
def route_to_node(utterance: str, history: str) -> RoutingNodes abs;
can execute with `root entry {
can execute with Root entry {
self.session = &(self.session_id);
routed_node = self.route_to_node(self.utterance, self.session.get_history());
node_cls = self.get_node_class(routed_node.value);
Expand All @@ -177,7 +177,7 @@ walker agent {
return;
}
node_inst = node_cls();
visit [-->(`?node_cls)] else {
visit [-->](?:node_cls) else {
attached_routed_node = here ++> node_inst;
visit attached_routed_node;
}
Comment on lines +180 to 183
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

node_cls here is a runtime variable (resolved via get_node_class). Using it inside a typed traversal filter ((?:node_cls)) is not a valid node type reference in the new filter syntax, and will either fail to compile or never match, causing duplicate nodes to be attached every time. Consider querying outgoing nodes first and filtering with a predicate (e.g., via .filter(...)) or redesigning this to use a static node type / enum-to-type mapping.

Suggested change
visit [-->](?:node_cls) else {
attached_routed_node = here ++> node_inst;
visit attached_routed_node;
}
attached_routed_node = here ++> node_inst;
visit attached_routed_node;

Copilot uses AI. Check for mistakes.
Expand All @@ -188,14 +188,14 @@ walker get_all_sessions {
obj __specs__ {
static has auth: bool = False;
}
can get_all_sessions with `root entry {
memory_list = [here --> (`?Memory)];
can get_all_sessions with Root entry {
memory_list = [here --> (?:Memory)];
if not memory_list {
report "No sessions found.";
disengage;
}
memory = memory_list[0];
session_list = [memory --> (`?Session)];
session_list = [memory --> (?:Session)];
report [{
"id": jid(session),
"created_at": session.created_at
Expand Down
18 changes: 9 additions & 9 deletions content_creator/byLLM/approach_2/main.jac
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import from agent_core { Memory, Session }
import from byllm.llm { Model }
import sys;

glob llm = Model(model_name="gpt-4o", verbose=False);
glob llm = Model(model_name="gpt-4o-mini", config={"verbose": False});
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Model supports a top-level verbose parameter; putting "verbose" inside the config dict likely has no effect (and may diverge from how other modules configure logging). Prefer passing verbose=False directly, and reserve config for advanced settings like api_base, http_client, etc. (See jac-gpt-fullstack/services/docs/reference/plugins/byllm.md Model parameters table.)

Suggested change
glob llm = Model(model_name="gpt-4o-mini", config={"verbose": False});
glob llm = Model(model_name="gpt-4o-mini", verbose=False);

Copilot uses AI. Check for mistakes.


enum AgentTypes {
Expand Down Expand Up @@ -74,7 +74,7 @@ node PlannerAgent(Agent) {
visitor.session.current_state["planning_complete"] = True;

print("Plan created, moving to writing stage");
visit [<--](`?Supervisor);
visit [<--](?:Supervisor);
}
}

Expand All @@ -101,7 +101,7 @@ node WriterAgent(Agent) {
visitor.session.current_state["review_complete"] = False;

print("Content created, moving to review stage");
visit [<--](`?Supervisor);
visit [<--](?:Supervisor);
}
}

Expand Down Expand Up @@ -133,7 +133,7 @@ node ReviewAgent(Agent) {

if not content {
print("No content to review, returning to supervisor");
visit [<--](`?Supervisor);
visit [<--](?:Supervisor);
return;
}

Expand Down Expand Up @@ -168,7 +168,7 @@ node ReviewAgent(Agent) {
}
}

visit [<--](`?Supervisor);
visit [<--](?:Supervisor);
}
}

Expand Down Expand Up @@ -206,12 +206,12 @@ walker agent_executor {

disengage;
} else {
visit [-->](`?Agent)(?agent_type == next_agent);
visit [-->](?:Agent, agent_type == next_agent);
}
}

can init_graph with `root entry {
memory_list = [root --> (`?Memory)];
can init_graph with Root entry {
memory_list = [root --> (?:Memory)];
if not memory_list {
memory_list = root ++> Memory();
}
Expand All @@ -229,7 +229,7 @@ walker agent_executor {

print(f"Starting workflow for: {self.utterance}");

visit [-->](`?Supervisor) else {
visit [-->](?:Supervisor) else {
router_node = here ++> Supervisor();
router_node ++> PlannerAgent();
router_node ++> WriterAgent();
Expand Down