Tycono AI Company Builder

0.3.44 · active · verified Sun Apr 19

Tycono is an open-source, local-first framework for building and orchestrating multi-agent AI organizations, conceptualized as 'Company-as-Code'. It allows users to define AI agents, roles, and company hierarchies using declarative YAML and Markdown configurations, then watch them autonomously plan, execute, and learn from complex tasks. The system features a terminal-native user interface (TUI) for real-time supervision and manages persistent knowledge across sessions. The client library, `tycono`, is currently at version 0.3.44 and is under active development with frequent minor releases. Its companion, `tycono-server`, reached its first production-ready stable release at v0.1.0, providing a headless API backend. Key differentiators include its cost-efficiency features like 'Auto-Amend' for reducing LLM usage, and its ability to simulate and run entire AI companies for autonomous research and development.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to programmatically define an AI company with distinct roles and agents using assumed Tycono SDK APIs. It then initiates an autonomous task for the company, showcasing how to leverage LLMs (specifically Claude) for multi-agent collaboration. This example assumes 'tycono-server' is running to orchestrate the agents and requires an Anthropic API key.

import { defineCompany, executeTask } from 'tycono/api';
import { HumanAgent, ClaudeAgent, Role } from 'tycono/agents'; // Assuming agent types

const ANTHROPIC_API_KEY = process.env.ANTHROPIC_API_KEY ?? '';

if (!ANTHROPIC_API_KEY) {
  console.error('ANTHROPIC_API_KEY environment variable not set.');
  process.exit(1);
}

// Define roles within the company
const ceoRole = new Role('CEO', 'Oversees overall company strategy and delegates tasks.');
const engineerRole = new Role('Engineer', 'Implements technical solutions and writes code.');
const qaRole = new Role('QA', 'Tests and validates implemented solutions.');

// Define agents and assign them roles
const ceoAgent = new ClaudeAgent('Alice', 'claude-3-opus-20240229', ceoRole, ANTHROPIC_API_KEY);
const engineerAgent = new ClaudeAgent('Bob', 'claude-3-sonnet-20240229', engineerRole, ANTHROPIC_API_KEY);
const qaAgent = new ClaudeAgent('Charlie', 'claude-3-haiku-20240229', qaRole, ANTHROPIC_API_KEY);

// Define the company structure
const myAICorp = defineCompany({
  name: 'Innovation Inc.',
  description: 'An AI company focused on rapid prototyping and development.',
  roles: [ceoRole, engineerRole, qaRole],
  agents: [ceoAgent, engineerAgent, qaAgent],
  reportingStructure: [
    { from: engineerAgent, to: ceoAgent }, // Engineer reports to CEO
    { from: qaAgent, to: ceoAgent }      // QA reports to CEO
  ] // Simplified reporting for example
});

async function runAICompanyTask() {
  console.log(`Starting task for ${myAICorp.name}...`);
  try {
    const result = await executeTask(myAICorp, 'Develop a simple web-based calculator application.', {
      // Optional parameters for task execution, e.g., output directory, max steps
      outputDirectory: './projects/calculator-app',
      verbose: true
    });
    console.log('Task completed. Final output:', result.finalReport);
  } catch (error) {
    console.error('Error executing task:', error);
  }
}

runAICompanyTask();

view raw JSON →