Agent-aware provenance for memory tools
Add provenance field to Agent, set to "agent:{name}" for forked
subconscious agents. Memory tools (write, link_add, supersede,
journal_new, journal_update) now read provenance from the Agent
context when available, falling back to "manual" for interactive use.
AutoAgent passes the forked agent to dispatch_with_agent so tools
can access it.
Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
74f8952399
commit
9e49398689
4 changed files with 36 additions and 18 deletions
|
|
@ -355,7 +355,11 @@ impl AutoAgent {
|
|||
}
|
||||
format!("{}: {}", key, value)
|
||||
} else {
|
||||
agent_tools::dispatch(&call.function.name, &args).await
|
||||
let agent = match &*backend {
|
||||
Backend::Forked(a) => Some(a.clone()),
|
||||
_ => None,
|
||||
};
|
||||
agent_tools::dispatch_with_agent(&call.function.name, &args, agent).await
|
||||
};
|
||||
|
||||
dbglog!("[auto] {} result: {} chars", self.name, output.len());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue