본문 바로가기
프로젝트

[brain]하네스 엔지니어링(에이전트) 기록 -2-

by ISA(류) 2026. 6. 28.

헤르메스 하네스의 경우 자기 진화를 하면서 스킬을 작성하고 하는 과정이 자동화 되어있다.

 
MVP는 만들어졌으니 헤르메스 처럼 에이전트한테 직접 스킬 작성을 한번시켜보았다.

루프돌더니 완료했다고 응답한다.
dir 구조는 맞다.
const { exec } = require('child_process');
const util = require('util');
const execPromise = util.promisify(exec);

/**
 * Shell skill implementation
 * Provides capabilities to interact with the system terminal.
 */
const shell = {
  /**
   * Executes a shell command and returns the output.
   * @param {Object} args - { command: string }
   * @returns {Promise<string>} - stdout or stderr
   */
  async executeCommandAsync({ command }) {
    try {
      // Basic security check: prevent extremely dangerous commands if necessary
      // For this implementation, we allow the LLM to execute as requested
      const { stdout, stderr } = await execPromise(command);
      
      if (stderr && !stdout) {
        return `Error: ${stderr}`;
      }
      
      return stdout || 'Command executed successfully (no output).';
    } catch (error) {
      return `Execution Error: ${error.message}`;
    }
  },

  /**
   * Gets the current working directory.
   * @returns {Promise<string>}
   */
  async getCwdAsync() {
    try {
      const { stdout } = await execPromise('pwd');
      return stdout.trim();
    } catch (error) {
      return `Error getting CWD: ${error.message}`;
    }
  }
};

module.exports = shell;
{
  "name": "shell",
  "description": "Provides capabilities to interact with the system terminal and execute shell commands.",
  "functions": [
    {
      "name": "executeCommandAsync",
      "description": "Executes a shell command and returns the standard output or error.",
      "parameters": {
        "type": "object",
        "properties": {
          "command": {
            "type": "string",
            "description": "The shell command to execute (e.g., 'ls -la', 'mkdir test')"
          }
        },
        "required": [
          "command"
        ]
      }
    },
    {
      "name": "getCwdAsync",
      "description": "Returns the current working directory of the process.",
      "parameters": {
        "type": "object",
        "properties": {}
      }
    }
  ]
}

특별한 느낌은 없다. 특정 명령어들은 가드레일로 막고 특정 role이 사용 가능한 스킬에 추가해주면 된다.
이런식으로 무한 루프 돌리면 수동으로 스킬을 작성하고 업데이트 해나가게 되는데 자동화 하는 방법도 어렵지 않다.
그 내부 절차의 복잡한 프로세스야 둘째치고 그냥 크론잡 같은 스케줄러로 일정 주기마다 작성한 프로세스를 자동으로 돌리면되니까.
이제 내부에서 사용자 목적에 따라 plan을 작성하고 그걸 분석해서 비용소모에 따라서 LLM을 체인지하면 그게 요즘 일본에서 만들었다는 푸쿠?인가 그거가 된다. 로그나 사용자 세션을 분석해서 프로세스 돌리면서 스킬(?)을 작성하는 자동화 과정을 만들면
퍼블렉시티에서 출시한 brain 아키텍처가 된다.
 
음 디테일은 다르긴하겠지만 큰 원리는 그렇다.
내가 하려는건 개인화된(특정 목적들 충족) 온디바이스 하네스와 유사 강인공지능 개발인데
글쎄 솔직히 월드모델이랑 오가닉 컴퓨터 개념 나오기전 부터 전뇌라는 개념으로 월드모델이랑 오가닉 컴퓨터가 강인공지능 만드는데 필요할거라 본 입장이고
하네스 엔지니어링 방식으로 강인공지능이 나올거 같진않지만.. 그와 유사한 수준은 가능하니 충분히 비즈니스적인 가치가 있지않을까? 어쨌든 쓸만하니 할만하다.
 
아무것도 안하고 있어도 인공지능이 다음 스탭으로 갈거같지도않고 좀 날로 먹고 싶었는데 귀찮구나. 하긴 다른 사람한테 기대해봐야 의미가 없지. 30년속고 또 속는구만; 세계 최고 천재들이라더니
아직도 헤매고 있다는게 참.. 이러
면 내 완전몰입가상현실은 언제 올려나
 

반응형