diff --git a/.claude/settings.local.json b/.claude/settings.local.json deleted file mode 100644 index 51913d2..0000000 --- a/.claude/settings.local.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "permissions": { - "allow": [ - "Bash(tree:*)", - "Bash(find:*)", - "Bash(.gitignore)", - "Bash(mkdir:*)", - "Bash(git clone:*)", - "Bash(cmake:*)", - "Bash(where:*)", - "Bash(\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\bin\\cmake.exe\" ..)", - "Bash(\"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\bin\\cmake.exe\" --build . --config Debug)", - "Bash(git fetch:*)", - "Bash(git describe:*)", - "Bash(git checkout:*)", - "Bash(dir:*)", - "Bash(python -m pytest:*)", - "Bash(python -m venv:*)", - "Bash(python -m pip install:*)", - "Bash(git add:*)", - "Bash(git commit:*)", - "Bash(git push:*)", - "Bash(gh pr create:*)" - ], - "deny": [], - "ask": [] - } -} diff --git a/python/agent_runtime/agent.py b/python/agent_runtime/agent.py index 316601e..55a3ff4 100644 --- a/python/agent_runtime/agent.py +++ b/python/agent_runtime/agent.py @@ -13,6 +13,7 @@ @dataclass class Observation: """Represents an agent's observation of the world.""" + timestamp: datetime data: Dict[str, Any] source: str = "world" @@ -21,6 +22,7 @@ class Observation: @dataclass class Action: """Represents an action the agent wants to take.""" + tool_name: str parameters: Dict[str, Any] reasoning: Optional[str] = None @@ -29,6 +31,7 @@ class Action: @dataclass class AgentState: """Internal state of an agent.""" + agent_id: str goals: List[str] = field(default_factory=list) observations: List[Observation] = field(default_factory=list) @@ -87,7 +90,7 @@ def perceive(self, observation: Dict[str, Any], source: str = "world") -> None: # Keep only recent observations to manage memory if len(self.state.observations) > self.memory_capacity: - self.state.observations = self.state.observations[-self.memory_capacity:] + self.state.observations = self.state.observations[-self.memory_capacity :] logger.debug(f"Agent {self.state.agent_id} received observation from {source}") @@ -113,9 +116,7 @@ def decide_action(self) -> Optional[Action]: if action: self.state.action_history.append(action) - logger.info( - f"Agent {self.state.agent_id} decided action: {action.tool_name}" - ) + logger.info(f"Agent {self.state.agent_id} decided action: {action.tool_name}") return action diff --git a/python/agent_runtime/tool_dispatcher.py b/python/agent_runtime/tool_dispatcher.py index 7cb32bd..a3788c9 100644 --- a/python/agent_runtime/tool_dispatcher.py +++ b/python/agent_runtime/tool_dispatcher.py @@ -13,6 +13,7 @@ @dataclass class ToolSchema: """Schema definition for a tool.""" + name: str description: str parameters: Dict[str, Any] # JSON schema for parameters @@ -154,11 +155,13 @@ def export_schemas_json(self) -> str: """ schemas = [] for schema in self.schemas.values(): - schemas.append({ - "name": schema.name, - "description": schema.description, - "parameters": schema.parameters, - "returns": schema.returns, - }) + schemas.append( + { + "name": schema.name, + "description": schema.description, + "parameters": schema.parameters, + "returns": schema.returns, + } + ) return json.dumps(schemas, indent=2) diff --git a/python/backends/base.py b/python/backends/base.py index 2fa6256..d2b3622 100644 --- a/python/backends/base.py +++ b/python/backends/base.py @@ -10,6 +10,7 @@ @dataclass class BackendConfig: """Configuration for LLM backend.""" + model_path: str temperature: float = 0.7 max_tokens: int = 512 @@ -20,6 +21,7 @@ class BackendConfig: @dataclass class GenerationResult: """Result from LLM generation.""" + text: str tokens_used: int finish_reason: str # "stop", "length", "error" diff --git a/python/backends/llama_cpp_backend.py b/python/backends/llama_cpp_backend.py index e4e5a02..3cf3b47 100644 --- a/python/backends/llama_cpp_backend.py +++ b/python/backends/llama_cpp_backend.py @@ -37,7 +37,9 @@ def _load_model(self) -> None: logger.info("Model loaded successfully") except ImportError: - logger.error("llama-cpp-python not installed. Install with: pip install llama-cpp-python") + logger.error( + "llama-cpp-python not installed. Install with: pip install llama-cpp-python" + ) raise except Exception as e: logger.error(f"Failed to load model: {e}")