Skip to content

Commit 8a6959f

Browse files
authored
docs: Add FAQ section for user guidance (#35)
* docs: add FAQ section for common questions * docs: Add FAQ section for user guidance
1 parent 05bb441 commit 8a6959f

1 file changed

Lines changed: 99 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,105 @@ OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 gitclaw -p "test"
729729

730730
Contributions are welcome! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
731731

732+
## ❓ FAQ
733+
734+
### General
735+
736+
**What is Gitclaw?**
737+
Gitclaw (formerly GitAgent) is a git-native AI agent framework where the agent IS a git repository. Identity, rules, memory, tools, and skills are all version-controlled files, enabling "agents as repos" paradigm.
738+
739+
**How does Gitclaw differ from other agent frameworks?**
740+
Unlike frameworks that scatter configuration across application code, Gitclaw makes the agent itself a git repo:
741+
- Fork an agent → inherit personality, rules, tools
742+
- Branch → create alternate personality versions
743+
- `git log` → see agent's memory evolution
744+
- Diff → track rule changes over time
745+
746+
**What is the "agents as repos" concept?**
747+
Your agent lives in a git repository with structured files:
748+
- `agent.yaml` — model, tools, runtime config
749+
- `SOUL.md` — personality and identity
750+
- `RULES.md` — behavioral constraints
751+
- `memory/` — git-committed memory with full history
752+
- `tools/` — declarative YAML tool definitions
753+
- `skills/` — composable skill modules
754+
- `hooks/` — lifecycle hooks
755+
756+
### Installation & Setup
757+
758+
**What are the requirements?**
759+
Node.js 18+ (or 20+ recommended), npm, and git. Install globally with `npm install -g gitclaw`.
760+
761+
**How do I set up API keys?**
762+
Run the installer for guided setup:
763+
```bash
764+
bash <(curl -fsSL "https://raw.githubusercontent.com/open-gitagent/gitagent/main/install.sh")
765+
```
766+
Or set manually:
767+
```bash
768+
export OPENAI_API_KEY="sk-..."
769+
```
770+
771+
**Which LLM providers are supported?**
772+
- OpenAI (GPT-4o, GPT-4o-mini, etc.)
773+
- Anthropic (Claude models via native SDK)
774+
- Any OpenAI-compatible provider
775+
776+
Use `--model` flag to override: `gitclaw --model anthropic:claude-sonnet-4-5-20250929`
777+
778+
### Core Concepts
779+
780+
**What is the SDK and how do I use it?**
781+
The SDK provides programmatic access via `query()` function that streams agent events:
782+
```typescript
783+
import { query } from "gitclaw";
784+
for await (const msg of query({ prompt: "hello", model: "openai:gpt-4o-mini" })) {
785+
if (msg.type === "delta") process.stdout.write(msg.content);
786+
}
787+
```
788+
789+
**How do local repo mode sessions work?**
790+
Clone a GitHub repo, run an agent on it, auto-commit to a session branch:
791+
```bash
792+
gitclaw --repo https://github.com/org/repo --pat ghp_xxx "Fix the bug"
793+
```
794+
Resume with: `gitclaw --repo URL --session gitclaw/session-xxx "Continue"`
795+
796+
**What hooks are available?**
797+
Hooks are lifecycle scripts or programmatic handlers in `hooks/` directory. They trigger on agent events like tool execution, session start/end, or memory updates.
798+
799+
### Development
800+
801+
**How do I create custom tools?**
802+
Define tools in `tools/` directory using declarative YAML format. Each tool specifies name, description, parameters, and execution logic.
803+
804+
**How do I add skills?**
805+
Create skill modules in `skills/` directory. Skills are composable and can be imported from installed packages or defined locally.
806+
807+
**What telemetry options are available?**
808+
OpenTelemetry integration for observability:
809+
- Set `OTEL_EXPORTER_OTLP_ENDPOINT` for auto-enable
810+
- Use `OTEL_TRACES_EXPORTER=console` for local debugging
811+
- Jaeger quickstart with Docker
812+
813+
### Troubleshooting
814+
815+
**Why is my agent not responding?**
816+
- Check API key is set (`OPENAI_API_KEY` or equivalent)
817+
- Verify network connectivity to LLM provider
818+
- Use `--verbose` flag for detailed logs
819+
- Check `agent.yaml` model configuration
820+
821+
**How do I debug agent behavior?**
822+
- Use console exporter: `OTEL_TRACES_EXPORTER=console gitclaw -p "test"`
823+
- Check spans in Jaeger: `docker run -p 16686:16686 -p 4318:4318 jaegertracing/all-in-one`
824+
- Inspect `memory/` directory for agent state
825+
826+
**Where can I get help?**
827+
- GitHub Issues: https://github.com/open-gitagent/gitagent/issues
828+
- Examples: See README SDK section and CLI options
829+
- Contributing: See CONTRIBUTING.md for guidelines
830+
732831
## License
733832

734833
This project is licensed under the [MIT License](./LICENSE).

0 commit comments

Comments
 (0)